-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Separate unknown -webkit-prefixed pseudo-elements from known #22274
Separate unknown -webkit-prefixed pseudo-elements from known #22274
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
I'm somewhat surprised there are no test failures here. I guess that means we have to add some WPTs for |
254fd86
to
2e112e7
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
With #22279 landing, I think it would be good to try to generate |
2e112e7
to
86f9f8e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
86f9f8e
to
85e1b80
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Looks great overall! I mostly have nits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to register your new C++ file like https://searchfox.org/wubkat/rev/e0c29e7e482a4a452c92c394677358659c71eace/Source/WebCore/CMakeLists.txt#2555 to fix the GTK build fwiw
85e1b80
to
b167f6e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b167f6e
to
cc80aea
Compare
This comment was marked as outdated.
This comment was marked as outdated.
78b321c
to
8af8147
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
EWS run on previous version of this PR (hash 8af8147) |
Something is wrong. It looks like the test case is no longer passing. I thought it was just a Glib thing, but it seems to impact all builds, it's just not causing a failure for some reason. I suspect that one of the WebKitUnknown removals is the cause, but I haven't investigated. |
8af8147
to
498d79c
Compare
EWS run on current version of this PR (hash 498d79c) |
|| pseudoElement() == CSSSelector::PseudoElement::UserAgentPartLegacyAlias | ||
|| pseudoElement() == CSSSelector::PseudoElement::WebKitUnknown); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move down pseudoElement() == CSSSelector::PseudoElement::UserAgentPart
to have some alphabetic ordering?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that all compile down to the same thing? I thought these might be ordered this way for perf reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add a comment if that's the case. The temptation of re-ordering is easy.
But I doubt it makes a noticeable difference tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to leave this as-is for now. There's already enough subtle changes in this patch. And there's a FIXME for this function anyway so once that's addressed this can be addressed at the same time. (Or this change simply gets undone.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
https://bugs.webkit.org/show_bug.cgi?id=266947 Reviewed by Tim Nguyen. All UserAgentPartIds are moved into CSSPseudoSelectors.json and then generated from there from now on. This in combination with adding the WebKitUnknown pseudo-element identifier corrects @supports so it no longer claims certain -webkit-prefixed pseudo-elements are unsupported when they are in fact supported. Existing PseudoElement::UserAgentPart conditionals are amended to account for PseudoElement::WebKitUnknown. FIXMEs are added for areas that need further work. * LayoutTests/TestExpectations: * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/css/CSSPseudoSelectors.json: * Source/WebCore/css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::CSSSelector::parsePseudoElementName): * Source/WebCore/css/SelectorChecker.cpp: (WebCore::SelectorChecker::matchRecursively const): * Source/WebCore/css/parser/CSSSelectorParser.cpp: (WebCore::isPseudoClassValidAfterPseudoElement): (WebCore::CSSSelectorParser::containsUnknownWebKitPseudoElements): * Source/WebCore/css/parser/MutableCSSSelector.h: (WebCore::MutableCSSSelector::needsImplicitShadowCombinatorForMatching const): * Source/WebCore/css/process-css-pseudo-selectors.py: (InputValidator.validate_fields): * Source/WebCore/cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::constructFragmentsInternal): No need for an else branch here due to the early return usage. * Source/WebCore/html/shadow/UserAgentPartIds.cpp: Removed. * Source/WebCore/html/shadow/UserAgentPartIds.h: Removed. Canonical link: https://commits.webkit.org/272726@main
498d79c
to
405fb5b
Compare
Committed 272726@main (405fb5b): https://commits.webkit.org/272726@main Reviewed commits have been landed. Closing PR #22274 and removing active labels. |
This broke CMake builds... CMake Error at Source/cmake/WebKitMacros.cmake:118 (target_sources): |
I was hoping this wouldn't happen in practice, but that was probably foolish. We are going to have to fix https://bugs.webkit.org/show_bug.cgi?id=266984 first, then. |
Wait, sorry, I see you were able to fix it by just adding the missing OUTPUTs. Hmm... I was expecting that to have no effect. Interesting. |
@mcatanzaro note that I had listed the dependencies already. The OUTPUTs were removed as I rebased incorrectly. @philn thanks for fixing the build and sorry you had to do that! |
405fb5b
498d79c