Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9e59562c7c83a707bd837c5140827b19b4ea8045
https://github.com/WebKit/WebKit/commit/9e59562c7c83a707bd837c5140827b19b4ea8045
Author: Chris Dumez <[email protected]>
Date: 2026-01-06 (Tue, 06 Jan 2026)
Changed paths:
M Source/WebCore/css/CSSSelectorList.cpp
M Source/WebCore/css/CSSSelectorList.h
Log Message:
-----------
Simplify CSSSelectorList::componentCount() & CSSSelectorList::listSize()
https://bugs.webkit.org/show_bug.cgi?id=304964
Reviewed by Darin Adler.
Simplify CSSSelectorList::componentCount() & CSSSelectorList::listSize()
now that the selectors are stored in a FixedVector and we know the size.
In a follow-up, we should be able to get rid of the `m_isLastInSelectorList`
flag on CSSSelector but the CSSSelectorList iterator will need updating
first (which will require performance A/B testing).
This change also reduces the use of WTF_ALLOW_UNSAFE_BUFFER_USAGE and
thus improves code safety.
* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::listSize const):
(WebCore::CSSSelectorList::componentCount const):
* Source/WebCore/css/CSSSelectorList.h:
(WebCore::CSSSelectorList::componentCount const):
Canonical link: https://commits.webkit.org/305179@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications