Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e1396917113b7933f53699d3a90e24303c6b081a
https://github.com/WebKit/WebKit/commit/e1396917113b7933f53699d3a90e24303c6b081a
Author: Chris Dumez <[email protected]>
Date: 2026-01-11 (Sun, 11 Jan 2026)
Changed paths:
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/ElementRuleCollector.h
Log Message:
-----------
Avoid calling collectMatchingRulesForList() when rules is null or empty
https://bugs.webkit.org/show_bug.cgi?id=305297
Reviewed by Darin Adler.
Avoid calling collectMatchingRulesForList() when rules is null or empty.
This is done by making collectMatchingRulesForList() inline and having
to the checks before calling a non-inline collectMatchingRulesForListSlow()
function. This allows us to avoid calling collectMatchingRulesForListSlow()
over 60% of the time on Speedometer 3 and results in a 0.20-0.26%
progression overall.
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForListSlow):
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList): Deleted.
* Source/WebCore/style/ElementRuleCollector.h:
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):
Canonical link: https://commits.webkit.org/305434@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications