Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 64c77be99cd4c1ffd3c645e2208efc44a02229fb
https://github.com/WebKit/WebKit/commit/64c77be99cd4c1ffd3c645e2208efc44a02229fb
Author: Anne van Kesteren <[email protected]>
Date: 2026-02-23 (Mon, 23 Feb 2026)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/parsing/the-picker-icon-pseudo-element.tentative-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-parsing-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/slotted-parsing.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-and-slotted-invalidation-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-and-slotted-invalidation-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-and-slotted-invalidation.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-icon-and-slotted-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-icon-and-slotted-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/picker-icon-and-slotted.html
M Source/WebCore/css/parser/CSSSelectorParser.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/ElementRuleCollector.h
M Source/WebCore/style/RuleSet.cpp
Log Message:
-----------
Support user agent shadow root pseudo-elements after ::slotted
https://bugs.webkit.org/show_bug.cgi?id=308321
Reviewed by Antti Koivisto.
In CSSSelectorParser we generalize isTreeAbidingPseudoElement()
slightly so it can support both ordinary pseudo-elements and user agent
part pseudo-elements.
And in splitCompoundAtImplicitShadowCrossingCombinator() we add
isSlotted to the recursion condition so the compound is correctly
split.
In RuleSet we mirror the logic for ::part()::placeholder to route
selectors with ::slotted as preceding selector to
m_slottedPseudoElementRules.
In ElementRuleCollector we check if the shadow host is slotted, and if
so, collect ::slotted rules from the slot's scope.
SelectorChecker already handles the resulting selector chain correctly.
New tests are upstreamed here:
https://github.com/web-platform-tests/wpt/pull/57958
Canonical link: https://commits.webkit.org/308039@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications