[webkit-changes] [WebKit/WebKit] 95ffd8: [CSS] Fix :not(:has(...)) invalidation
Matthieu Dubet
noreply at github.com
Thu Oct 31 16:49:11 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 95ffd81b29e8337bbed14f19e229e5aca0579077
https://github.com/WebKit/WebKit/commit/95ffd81b29e8337bbed14f19e229e5aca0579077
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2024-10-31 (Thu, 31 Oct 2024)
Changed paths:
A LayoutTests/fast/css/invalidation-not-has-expected.txt
A LayoutTests/fast/css/invalidation-not-has.html
M Source/WebCore/style/ChildChangeInvalidation.cpp
M Source/WebCore/style/RuleSet.cpp
M Source/WebCore/style/RuleSet.h
M Source/WebCore/style/StyleInvalidator.cpp
M Source/WebCore/style/StyleInvalidator.h
Log Message:
-----------
[CSS] Fix :not(:has(...)) invalidation
https://bugs.webkit.org/show_bug.cgi?id=276867
rdar://122689282
Reviewed by Antti Koivisto.
Invalidation of :not(:has(...)) is special because while there can be no
element to actually invalidate, the rule matches.
For ChildChangeInvalidation, we thus propagate the isNegation flag to StyleInvalidator
to invalidate in case of non-matching the :has().
The other *Invalidation classes handle :not() differently, thus the
isNegation flag is purposedly not propagated to StyleInvalidator for them.
* LayoutTests/fast/css/invalidation-not-has-expected.txt: Added.
* LayoutTests/fast/css/invalidation-not-has.html: Added.
* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::ChildChangeInvalidation::invalidateForChangedElement):
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::evaluateDynamicMediaQueryRules):
* Source/WebCore/style/RuleSet.h:
* Source/WebCore/style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::Invalidator):
(WebCore::Style::Invalidator::collectRuleInformation):
(WebCore::Style::Invalidator::invalidateIfNeeded):
(WebCore::Style::Invalidator::invalidateUserAgentParts):
(WebCore::Style::Invalidator::addToMatchElementRuleSets):
(WebCore::Style::Invalidator::addToMatchElementRuleSetsRespectingNegation):
(WebCore::Style::Invalidator::invalidateWithScopeBreakingHasPseudoClassRuleSet):
* Source/WebCore/style/StyleInvalidator.h:
Canonical link: https://commits.webkit.org/285987@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list