Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cdba6f7e0a3223ec112881792d3b690b7640c1c0
https://github.com/WebKit/WebKit/commit/cdba6f7e0a3223ec112881792d3b690b7640c1c0
Author: Antti Koivisto <[email protected]>
Date: 2024-11-21 (Thu, 21 Nov 2024)
Changed paths:
A LayoutTests/fast/selectors/has-queryselector-performance-expected.txt
A LayoutTests/fast/selectors/has-queryselector-performance.html
M
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-css-nesting-shared-expected.txt
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/dom/SelectorQuery.cpp
M Source/WebCore/dom/SelectorQuery.h
Log Message:
-----------
Poor performance of querySelectorAll() with descendant selectors (:has())
https://bugs.webkit.org/show_bug.cgi?id=283222
rdar://140093151
Reviewed by Alan Baradlay.
We should provide a shared state when checking selector against multiple
elements in SelectorChecker
so it benefits from caching optimizations like style resolution does.
This also revealed a bug in the caching implementation (WPT
css/selectors/has-relative-argument.html).
* LayoutTests/fast/selectors/has-queryselector-performance-expected.txt: Added.
* LayoutTests/fast/selectors/has-queryselector-performance.html: Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/has-css-nesting-shared-expected.txt:
Set the matchedInsideScope bit unconditionally. If we are trying to match the
scope selector we have already matched
something inside the scope.
Test the element before skipping the subtree. The element itself may match even
if descendants are known to fail.
Provide SelectorMatchingState when checking multiple element using the
(non-compiled) slow path.
This allows caching across tests which is important for :has() performance.
* Source/WebCore/dom/SelectorQuery.h:
Canonical link: https://commits.webkit.org/286908@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes