Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4ef19b5fa4c093b11b221c8d8df3b5a3d9dd398d
https://github.com/WebKit/WebKit/commit/4ef19b5fa4c093b11b221c8d8df3b5a3d9dd398d
Author: Nipun Shukla <[email protected]>
Date: 2025-11-05 (Wed, 05 Nov 2025)
Changed paths:
M LayoutTests/fast/selectors/has-scope-breaking-classification-expected.txt
M LayoutTests/fast/selectors/has-scope-breaking-classification.html
A
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-is-child-combinator-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-is-child-combinator.html
A PerformanceTests/CSS/HasWithChildCombinatorInIs.html
M Source/WebCore/style/RuleFeature.cpp
Log Message:
-----------
Page freezes with many DOM manipulations and complex :has() selectors present
https://bugs.webkit.org/show_bug.cgi?id=281920
rdar://138431700
Reviewed by Matthieu Dubet and Antti Koivisto.
When evaluating :has(> :is(.x > .y)), child combinators within :is() are
scoped to the direct child's tree and don't require scope-breaking invalidation.
This avoids excessive DOM traversal on pages with many complex :has() selectors,
preventing page freezes during style recalculation.
* LayoutTests/fast/selectors/has-scope-breaking-classification-expected.txt:
* LayoutTests/fast/selectors/has-scope-breaking-classification.html:
*
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-is-child-combinator-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-is-child-combinator.html:
Added.
* PerformanceTests/CSS/HasWithChildCombinatorInIs.html: Added.
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::computeNextHasPseudoClassMatchElement):
Canonical link: https://commits.webkit.org/302587@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications