Skip to content

Conversation

@cdumez
Copy link
Contributor

@cdumez cdumez commented Jan 14, 2026

9bb1c47

Skip pure pseudo-element rules in some cases in collectMatchingRulesForListSlow()
https://bugs.webkit.org/show_bug.cgi?id=305465

Reviewed by NOBODY (OOPS!).

Skip pure pseudo-element rules in ElementRuleCollector::collectMatchingRulesForListSlow()
when we are not matching pseudo elements. This avoids going unnecessarily
through the matching logic and results in a 1.2% speedup on Speedometer 3.

* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForListSlow):
* Source/WebCore/style/RuleData.cpp:
(WebCore::Style::computeSubjectIsPurePseudoElement):
(WebCore::Style::RuleData::RuleData):
* Source/WebCore/style/RuleData.h:
(WebCore::Style::RuleData::subjectIsPurePseudoElement const):

9bb1c47

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win loading 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ❌ 🧪 wpe-wk2 loading 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 ⏳ 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
❌ 🧪 ios-wk2-wpt ❌ 🧪 api-mac-debug ✅ 🛠 wpe-cairo-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 vision ❌ 🧪 mac-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision-sim ❌ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🛠 tv ❌ 🧪 mac-intel-wk2
loading 🛠 tv-sim ✅ 🛠 mac-safer-cpp
✅ 🛠 watch
✅ 🛠 watch-sim

…orListSlow()

https://bugs.webkit.org/show_bug.cgi?id=305465

Reviewed by NOBODY (OOPS!).

Skip pure pseudo-element rules in ElementRuleCollector::collectMatchingRulesForListSlow()
when we are not matching pseudo elements. This avoids going unnecessarily
through the matching logic and results in a 1.2% speedup on Speedometer 3.

* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForListSlow):
* Source/WebCore/style/RuleData.cpp:
(WebCore::Style::computeSubjectIsPurePseudoElement):
(WebCore::Style::RuleData::RuleData):
* Source/WebCore/style/RuleData.h:
(WebCore::Style::RuleData::subjectIsPurePseudoElement const):
@cdumez cdumez self-assigned this Jan 14, 2026
@cdumez cdumez added the CSS Cascading Style Sheets implementation label Jan 14, 2026
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation merging-blocked Applied to prevent a change from being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants