Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 78f541198890a77f119dc63d8d80f376037cd781
https://github.com/WebKit/WebKit/commit/78f541198890a77f119dc63d8d80f376037cd781
Author: Matthieu Dubet <[email protected]>
Date: 2025-06-12 (Thu, 12 Jun 2025)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/cssjit/SelectorCompiler.cpp
Log Message:
-----------
[CSS] Don't compile functional pseudo-classes like :is() with contextually
invalid pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=293230
rdar://151605806
Reviewed by Simon Fraser.
This mostly reverts commit b9e946421ea6185c88ef9a881bbad23d4e8fb114 which is
buggy because it makes compiling :is(div::before) the same as compiling
:is(div).
(the ::before fragment is "optimized away" as never matching,
but the div fragment is still being compiled and potentially matched)
Most of those cases (pseudo-element in functional pseudo-classes) are already
prevented at parsing time,
but nesting resolution can create them after parsing.
The fix here is that whenever there is a pseudo-element (standalone or not) in
:is(),
we fallback to the SelectorChecker.
* LayoutTests/TestExpectations:
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Canonical link: https://commits.webkit.org/296144@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes