[webkit-changes] [WebKit/WebKit] ee0320: [CSS] Matched element should be within the @scope
Matthieu Dubet
noreply at github.com
Fri Nov 24 09:53:30 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ee0320f9080b7d19f60aee912ac8acd10464f418
https://github.com/WebKit/WebKit/commit/ee0320f9080b7d19f60aee912ac8acd10464f418
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/fast/css/scope-at-rule-expected.html
M LayoutTests/fast/css/scope-at-rule.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-deep-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-evaluation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-focus-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-hover-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-implicit-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-invalidation-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-nesting-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-proximity-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-specificity-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-cssom-expected.txt
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h
Log Message:
-----------
[CSS] Matched element should be within the @scope
https://bugs.webkit.org/show_bug.cgi?id=265241
rdar://118713295
Reviewed by Antti Koivisto.
This patch adds one part of the @scope matching algorithm: the matched element
has to be within the scope.
https://drafts.csswg.org/css-cascade-6/#scoped-styles
* LayoutTests/TestExpectations:
* LayoutTests/fast/css/scope-at-rule-expected.html:
* LayoutTests/fast/css/scope-at-rule.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-deep-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-evaluation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-focus-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-hover-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-implicit-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-invalidation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-nesting-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-proximity-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-specificity-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-cssom-expected.txt:
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::matchUARules):
(WebCore::Style::ElementRuleCollector::ruleMatches):
(WebCore::Style::ElementRuleCollector::scopeRulesMatch):
(WebCore::Style::ElementRuleCollector::matchAllRules):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::resolveSelectorListWithNesting):
(WebCore::Style::RuleSetBuilder::addStyleRule):
* Source/WebCore/style/RuleSetBuilder.h:
Canonical link: https://commits.webkit.org/271104@main
More information about the webkit-changes
mailing list