Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dd222ded80fd90dcad76a793fde7357493ab2719
https://github.com/WebKit/WebKit/commit/dd222ded80fd90dcad76a793fde7357493ab2719
Author: Matthieu Dubet <[email protected]>
Date: 2025-07-21 (Mon, 21 Jul 2025)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-shadow-expected.txt
M Source/WebCore/css/CSSSelector.cpp
M Source/WebCore/css/CSSSelector.h
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/cssjit/SelectorCompiler.cpp
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/RuleSet.cpp
M Source/WebCore/style/RuleSet.h
Log Message:
-----------
[CSS] Support @scope(:host)
https://bugs.webkit.org/show_bug.cgi?id=294521
rdar://153443869
Reviewed by Tim Nguyen.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-shadow-expected.txt:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::isScopePseudoClass const):
* Source/WebCore/css/CSSSelector.h:
Helper function
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
:scope can match :host
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
Disable selector compilation for :scope
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::Style::ElementRuleCollector::scopeRulesMatch):
Allow traversing the Shadow DOM boundary and track it for matching
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::hasHostOrScopePseudoClassSubjectInSelectorList):
(WebCore::Style::RuleSet::addRule):
(WebCore::Style::hasHostPseudoClassSubjectInSelectorList): Deleted.
* Source/WebCore/style/RuleSet.h:
(WebCore::Style::RuleSet::hasHostOrScopePseudoClassRulesInUniversalBucket
const):
(WebCore::Style::RuleSet::hasHostPseudoClassRulesInUniversalBucket const):
Deleted.
Add rules with :scope subject (which can potentially represent :host) to the
special
case for :host subject
Canonical link: https://commits.webkit.org/297670@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