Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

border-image-* returns the initial keyword instead of the initial value when setting border-image shorthand #6652

Conversation

darinadler
Copy link
Member

@darinadler darinadler commented Nov 18, 2022

c0c6ad1

border-image-* returns the initial keyword instead of the initial value when setting border-image shorthand
https://bugs.webkit.org/show_bug.cgi?id=244657
rdar://problem/99420050

Reviewed by Sam Weinig.

* LayoutTests/fast/borders/border-image-legacy.html: Expect initial values instead of the
keyword "initial" for specified style.

* LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-shorthand.sub-expected.txt:
Expect PASS.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-shorthand.sub-expected.txt:
Ditto.

* Source/WebCore/css/StyleProperties.cpp:
(WebCore::StyleProperties::borderImagePropertyValue const): Change the code that checks for
implicit values to not require use of the initial keyword.

* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeBorderImage): Set initial values using the actual values
rather than the initial keyword.

Canonical link: https://commits.webkit.org/257119@main

a2d03e8

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac   πŸ§ͺ api-gtk
βœ… πŸ›  tv   πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
❌ πŸ›  πŸ§ͺ merge βœ… πŸ›  watch   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@darinadler darinadler self-assigned this Nov 18, 2022
@darinadler darinadler added the CSS Cascading Style Sheets implementation label Nov 18, 2022
@darinadler darinadler force-pushed the eng/border-image--returns-the-initial-keyword-instead-of-the-initial-value-when-setting-border-image-shorthand branch from f5b4d1d to 59295d1 Compare November 18, 2022 22:40
Copy link
Contributor

@Loirooriol Loirooriol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informal LGTM.

Source/WebCore/css/parser/CSSPropertyParser.cpp Outdated Show resolved Hide resolved
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 19, 2022
Copy link
Contributor

@Loirooriol Loirooriol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot to upload the new version of the patch

Source/WebCore/css/parser/CSSPropertyParser.cpp Outdated Show resolved Hide resolved
Source/WebCore/css/parser/CSSPropertyParser.cpp Outdated Show resolved Hide resolved
@darinadler
Copy link
Member Author

I think you forgot to upload the new version of the patch

It’s coming, still testing it.

@darinadler darinadler removed the merging-blocked Applied to prevent a change from being merged label Nov 19, 2022
@darinadler darinadler force-pushed the eng/border-image--returns-the-initial-keyword-instead-of-the-initial-value-when-setting-border-image-shorthand branch from 59295d1 to c3854b1 Compare November 19, 2022 02:22
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 19, 2022
@darinadler darinadler added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Nov 19, 2022
@webkit-ews-buildbot webkit-ews-buildbot added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels Nov 19, 2022
@darinadler
Copy link
Member Author

I do not understand these compilation errors that we are seeing on multiple platforms. It says the types CSSBorderImageSliceValue and CSSBorderImageWidthValue are incomplete when trying to compile the new code in CSSPropertyParser.cpp but:

  1. Those types are already used elsewhere in CSSPropertyParser.cpp, in the same way, calling their create functions.
  2. The headers for both of those types are included at the top of CSSPropertyParser.cpp.

@Loirooriol
Copy link
Contributor

#6592 just moved the headers into CSSPropertyParserHelpers.cpp

@weinig
Copy link
Contributor

weinig commented Nov 20, 2022

I do not understand these compilation errors that we are seeing on multiple platforms. It says the types CSSBorderImageSliceValue and CSSBorderImageWidthValue are incomplete when trying to compile the new code in CSSPropertyParser.cpp but:

  1. Those types are already used elsewhere in CSSPropertyParser.cpp, in the same way, calling their create functions.
  2. The headers for both of those types are included at the top of CSSPropertyParser.cpp.

Pretty sure it merged in my change and now the #includes are a bit different.

@darinadler darinadler removed the merging-blocked Applied to prevent a change from being merged label Nov 28, 2022
@darinadler darinadler force-pushed the eng/border-image--returns-the-initial-keyword-instead-of-the-initial-value-when-setting-border-image-shorthand branch from c3854b1 to a2d03e8 Compare November 28, 2022 23:39
@@ -30,6 +30,8 @@
#include "config.h"
#include "CSSPropertyParser.h"

#include "CSSBorderImageSliceValue.h"
#include "CSSBorderImageWidthValue.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consumeBorderImageComponents is in CSSPropertyParserHelpers.cpp already, so you could move consumeBorderImage too and then no need to include the headers in both places.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d hate to delay landing this small change further for that, but I guess I could do it. At the time I started this change the file already included those headers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking on this

@darinadler darinadler added the merge-queue Applied to send a pull request to merge-queue label Nov 29, 2022
@webkit-commit-queue webkit-commit-queue force-pushed the eng/border-image--returns-the-initial-keyword-instead-of-the-initial-value-when-setting-border-image-shorthand branch from a2d03e8 to 03e94a8 Compare November 29, 2022 16:10
…ue when setting border-image shorthand

https://bugs.webkit.org/show_bug.cgi?id=244657
rdar://problem/99420050

Reviewed by Sam Weinig.

* LayoutTests/fast/borders/border-image-legacy.html: Expect initial values instead of the
keyword "initial" for specified style.

* LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-shorthand.sub-expected.txt:
Expect PASS.
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/border-image-shorthand.sub-expected.txt:
Ditto.

* Source/WebCore/css/StyleProperties.cpp:
(WebCore::StyleProperties::borderImagePropertyValue const): Change the code that checks for
implicit values to not require use of the initial keyword.

* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeBorderImage): Set initial values using the actual values
rather than the initial keyword.

Canonical link: https://commits.webkit.org/257119@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/border-image--returns-the-initial-keyword-instead-of-the-initial-value-when-setting-border-image-shorthand branch from 03e94a8 to c0c6ad1 Compare November 29, 2022 16:12
@webkit-commit-queue
Copy link
Collaborator

Committed 257119@main (c0c6ad1): https://commits.webkit.org/257119@main

Reviewed commits have been landed. Closing PR #6652 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 29, 2022
@webkit-commit-queue webkit-commit-queue merged commit c0c6ad1 into WebKit:main Nov 29, 2022
@darinadler darinadler deleted the eng/border-image--returns-the-initial-keyword-instead-of-the-initial-value-when-setting-border-image-shorthand branch November 29, 2022 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Cascading Style Sheets implementation
Projects
None yet
7 participants