You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix invalidation for class names within :nth-child() selector lists
https://bugs.webkit.org/show_bug.cgi?id=250551
rdar://104241960
Reviewed by Darin Adler.
There is an optimization in ClassChangeInvalidation that assumes only adding a class makes new elements match.
However, it is not true in the case of :nth-child(n of .class), removing the class name can make new elements match too.
Special case MatchElement::AnySibling (used by :nth-child() invalidation) to reflect this.
Tests:
- imported/w3c/web-platform-tests/css/selectors/invalidation/nth-child-of-class.html
- imported/w3c/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling.html
* LayoutTests/TestExpectations:
* Source/WebCore/style/ClassChangeInvalidation.cpp:
(WebCore::Style::ClassChangeInvalidation::computeInvalidation):
Canonical link: https://commits.webkit.org/258917@main
0 commit comments