Bug 233631 - [:has() pseudo-class] Cache :has() failures for subtrees
Summary: [:has() pseudo-class] Cache :has() failures for subtrees
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antti Koivisto
Keywords: InRadar
Depends on:
Blocks: 227702
  Show dependency treegraph
Reported: 2021-11-30 04:10 PST by Antti Koivisto
Modified: 2021-11-30 10:04 PST (History)
9 users (show)

See Also:

Patch (8.99 KB, patch)
2021-11-30 05:58 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
Patch for landing (8.94 KB, patch)
2021-11-30 08:51 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2021-11-30 04:10:33 PST
Add a temporary (style resolution/invalidation scoped) cache that remembers whether a given :has() argument has any matches in a subtree.
Comment 1 Antti Koivisto 2021-11-30 05:58:02 PST
Created attachment 445410 [details]
Comment 2 Simon Fraser (smfr) 2021-11-30 08:48:48 PST
Comment on attachment 445410 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=445410&action=review

> Source/WebCore/css/SelectorChecker.cpp:1252
> -    // FIXME: This is almost the worst possible implementation in terms of performance.
> +    // FIXME: This could be better in terms of performance.

Comment 3 Antti Koivisto 2021-11-30 08:51:39 PST
Created attachment 445422 [details]
Patch for landing
Comment 4 EWS 2021-11-30 10:03:35 PST
Committed r286302 (244661@main): <https://commits.webkit.org/244661@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445422 [details].
Comment 5 Radar WebKit Bug Importer 2021-11-30 10:04:26 PST