Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 471b601ae3753aa815c3fa06b219ed8b5cd3f446
https://github.com/WebKit/WebKit/commit/471b601ae3753aa815c3fa06b219ed8b5cd3f446
Author: Antti Koivisto <[email protected]>
Date: 2026-02-19 (Thu, 19 Feb 2026)
Changed paths:
M Source/WebCore/cssjit/SelectorCompiler.cpp
Log Message:
-----------
Optimize attribute selector case insensitive exact matching in selector JIT
https://bugs.webkit.org/show_bug.cgi?id=307542
rdar://169820087
Reviewed by Sam Weinig.
We would always end up with a function call for case insensitive matching.
While explicit use is rare many HTML attributes are implicitly matches case
insensitively.
This patch adds inlined path for case insensitive matching to JIT.
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::extraRegistersForAttributeNameTesting):
(WebCore::SelectorCompiler::extraRegistersForAttributeValueTesting):
Refactor to return register count.
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
Generate code for testing if string lengths differ and fail matching
immediately if so.
(WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
Deleted.
(WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
Deleted.
Canonical link: https://commits.webkit.org/307844@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications