This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
Fix style invalidation of IDs within :nth-child/:nth-last-child
https://bugs.webkit.org/show_bug.cgi?id=257848 rdar://110451692 Reviewed by Antti Koivisto. When IDs change within :nth-child / :nth-last-child, we have to use ruleset invalidation, for this: 1. we collect the ID features when MatchElement is AnySibling in RuleFeatureSet (:nth-child/last-child selectors) 2. we store the match element rulesets on IdChangeInvalidation, since we'll want to run ruleset invalidation both before & after (ID changes can affect siblings even when the new ID is not in the CSS) * LayoutTests/TestExpectations: * Source/WebCore/style/IdChangeInvalidation.cpp: (WebCore::Style::IdChangeInvalidation::invalidateStyle): (WebCore::Style::IdChangeInvalidation::invalidateStyleWithRuleSets): * Source/WebCore/style/IdChangeInvalidation.h: (WebCore::Style::IdChangeInvalidation::IdChangeInvalidation): (WebCore::Style::IdChangeInvalidation::~IdChangeInvalidation): * Source/WebCore/style/RuleFeature.cpp: (WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): Canonical link: https://commits.webkit.org/264986@main
- Loading branch information
Showing 4 changed files with 15 additions and 8 deletions.