[webkit-changes] [WebKit/WebKit] 0c0bfc: Invalidate :nth-child() selectors correctly when n...
Cameron McCormack
noreply at github.com
Sun Sep 3 20:52:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0c0bfc05ec5c27a7bd2176002fd581a4f3157f7e
https://github.com/WebKit/WebKit/commit/0c0bfc05ec5c27a7bd2176002fd581a4f3157f7e
Author: Cameron McCormack <heycam at apple.com>
Date: 2023-09-03 (Sun, 03 Sep 2023)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/style/ClassChangeInvalidation.cpp
M Source/WebCore/style/RuleFeature.cpp
M Source/WebCore/style/RuleFeature.h
M Source/WebCore/style/StyleInvalidator.cpp
Log Message:
-----------
Invalidate :nth-child() selectors correctly when not in subject position
https://bugs.webkit.org/show_bug.cgi?id=253941
rdar://106740353
Reviewed by Antti Koivisto.
We use MatchResult::AnySibling when an element that matches the selector
inside an :nth-child() pseudo-class changes. But when we process that
invalidation, it only invalidates the element itself. This means that
AnySibling is only correct when the :nth-child() is in the subject
position.
Introduce MatchResult::ParentAnySibling and AncestorAnySibling to
represent invalidations required for :nth-child() pseudo-classes
followed by child or descendant combinators.
Canonical link: https://commits.webkit.org/267600@main
More information about the webkit-changes
mailing list