Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 48505dc2500727a503310fcc9ae95a292bb2c4ba
https://github.com/WebKit/WebKit/commit/48505dc2500727a503310fcc9ae95a292bb2c4ba
Author: Antti Koivisto <[email protected]>
Date: 2026-04-22 (Wed, 22 Apr 2026)
Changed paths:
M LayoutTests/fast/selectors/has-invalidation-traversal-size-expected.txt
M LayoutTests/fast/selectors/has-invalidation-traversal-size.html
M Source/WebCore/style/RuleFeature.cpp
M Source/WebCore/style/RuleFeature.h
Log Message:
-----------
[:has() perf] Compute scope selector for :has() nested in logical pseudo-class
https://bugs.webkit.org/show_bug.cgi?id=312979
rdar://175323086
Reviewed by Alan Baradlay.
Better invalidation for cases like
.foo:not(:has(.bar)) .baz
* LayoutTests/fast/selectors/has-invalidation-traversal-size-expected.txt:
* LayoutTests/fast/selectors/has-invalidation-traversal-size.html:
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::collectFeaturesFromSelector):
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
Factor the parameters into a struct.
Track the outermost selector and use that as the scope selector.
(WebCore::Style::RuleFeatureSet::collectFeatures):
* Source/WebCore/style/RuleFeature.h:
(WebCore::Style::RuleFeatureSet::collectFeaturesFromSelector):
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
Deleted.
Canonical link: https://commits.webkit.org/311797@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications