Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d6d238642bbc3cc3fd28823eb12552f9bf7a73d8
https://github.com/WebKit/WebKit/commit/d6d238642bbc3cc3fd28823eb12552f9bf7a73d8
Author: Matthieu Dubet <[email protected]>
Date: 2025-09-04 (Thu, 04 Sep 2025)
Changed paths:
M LayoutTests/TestExpectations
M
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-cssom-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-expected.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-ref.html
M
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited.html
M Source/WebCore/css/CSSSelector.cpp
M Source/WebCore/css/CSSSelector.h
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/css/SelectorChecker.h
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/ElementRuleCollector.h
M Source/WebCore/style/RuleData.cpp
M Source/WebCore/style/RuleData.h
M Source/WebCore/style/RuleSet.cpp
Log Message:
-----------
[CSS] Support :visited as the scoping root selectors
https://bugs.webkit.org/show_bug.cgi?id=296947
rdar://157588890
Reviewed by Antti Koivisto.
We statically take the scoping root selectors into account
to determine if we are potentially resolving visited/link style.
We track wheter we have match visited during scoping root matching, and
pass this result to normal style rule matching.
* LayoutTests/TestExpectations:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-cssom-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-expected.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited-ref.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-visited.html:
Add slightly more complex case when the scoping root is a link, but the
matching is done with class selector.
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::hasExplicitPseudoClassScope const):
(WebCore::CSSSelector::hasScope const):
* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
(WebCore::SelectorChecker::determineLinkMatchType):
* Source/WebCore/css/SelectorChecker.h:
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::ruleMatches):
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::Style::ElementRuleCollector::scopeRulesMatch):
* Source/WebCore/style/ElementRuleCollector.h:
(WebCore::Style::ElementRuleCollector::ruleMatches):
* Source/WebCore/style/RuleData.cpp:
(WebCore::Style::RuleData::RuleData):
* Source/WebCore/style/RuleData.h:
(WebCore::Style::RuleData::RuleData):
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addStyleRuleWithSelectorList):
Canonical link: https://commits.webkit.org/299560@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