Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a7c33784e49fd6e3078d55d53e5f005feb9270d8
https://github.com/WebKit/WebKit/commit/a7c33784e49fd6e3078d55d53e5f005feb9270d8
Author: Antti Koivisto <[email protected]>
Date: 2026-04-23 (Thu, 23 Apr 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-sibling-insertion-removal-expected.txt
M Source/WebCore/style/ChildChangeInvalidation.cpp
M Source/WebCore/style/RuleFeature.cpp
M Source/WebCore/style/RuleFeature.h
Log Message:
-----------
[:has()] Fix failures in
css/selectors/invalidation/has-sibling-insertion-removal.html
https://bugs.webkit.org/show_bug.cgi?id=313151
<rdar://problem/175441568>
Reviewed by Alan Baradlay.
Invalidation fixes for sibling combinators.
*
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-sibling-insertion-removal-expected.txt:
* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::isSiblingHasRelation):
(WebCore::Style::ChildChangeInvalidation::invalidateForChangedElement):
Optimization that tries to detect that :has() state doesn't change does not work
with sibling combinators. Don't use it in this case.
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::isSiblingCombinator):
(WebCore::Style::isHasScopeBreakingCombinator):
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
Besides the subject selector also collect :has() invalidation selectors for
compounds that start a sibling combinator.
Sibling changes can affect elements in subtrees that are not part of the
mutation.
Reorganize and simplify the code.
(WebCore::Style::RuleFeatureSet::collectFeatures):
* Source/WebCore/style/RuleFeature.h:
Canonical link: https://commits.webkit.org/311893@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications