Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 197ddc80fe10e4d3bf8d2dcd12809af56d63577a https://github.com/WebKit/WebKit/commit/197ddc80fe10e4d3bf8d2dcd12809af56d63577a Author: Antti Koivisto <an...@apple.com> Date: 2025-08-26 (Tue, 26 Aug 2025)
Changed paths: M Source/WebCore/style/ChildChangeInvalidation.cpp 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: ----------- Limit the scope of invalidation traversal for `:has(> .changed) .subject` https://bugs.webkit.org/show_bug.cgi?id=297893 rdar://159173631 Reviewed by Simon Fraser. It is sufficient to traverse the subtree of the parent to invalidate in this case, rather than the entire DOM. This helps with GitHub performance as it uses selectors of this type. * Source/WebCore/style/ChildChangeInvalidation.cpp: (WebCore::Style::ChildChangeInvalidation::invalidateForChangedElement): * Source/WebCore/style/ClassChangeInvalidation.cpp: (WebCore::Style::ClassChangeInvalidation::computeInvalidation): * Source/WebCore/style/RuleFeature.cpp: (WebCore::Style::isSiblingOrSubject): (WebCore::Style::isScopeBreaking): (WebCore::Style::computeHasPseudoClassMatchElement): (WebCore::Style::computeSubSelectorMatchElement): Add two new MatchElement types for these cases: `:has(> .changed) .subject `:has(> .changed) > .subject * Source/WebCore/style/RuleFeature.h: * Source/WebCore/style/StyleInvalidator.cpp: (WebCore::Style::Invalidator::invalidateStyleWithMatchElement): Traverse only the required subtrees for the new types. Also document each invalidation traversal case. Canonical link: https://commits.webkit.org/299162@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes