Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bb87fca859f44d0dd6b1e0112d28fdbce4cbafd6
https://github.com/WebKit/WebKit/commit/bb87fca859f44d0dd6b1e0112d28fdbce4cbafd6
Author: Chris Dumez <[email protected]>
Date: 2026-04-03 (Fri, 03 Apr 2026)
Changed paths:
M Source/WebCore/style/ElementRuleCollector.cpp
Log Message:
-----------
Add missing early-exit in collectMatchingRulesForListSlow for @scope rules
https://bugs.webkit.org/show_bug.cgi?id=311339
Reviewed by Anne van Kesteren.
In StyleInvalidation mode, we only need to know whether any rule matches.
The isFirstMatchModeAndHasMatchedAnyRules() check enables this early-exit,
but the @scope code path with multiple scoping roots was missing it —
the `continue` bypassed the check, causing unnecessary rule processing.
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForListSlow):
Canonical link: https://commits.webkit.org/310505@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications