Bug 234341

Summary: [:has() pseudo-class] Use Bloom filter to quickly reject :has() selectors
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, dino, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 227702    
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing
none
Patch for landing
none
Patch for landing
none
Patch
none
Patch for landing none

Description Antti Koivisto 2021-12-15 02:55:33 PST
Fast reject for :has()
Comment 1 Antti Koivisto 2021-12-15 03:22:46 PST
Created attachment 447218 [details]
Patch
Comment 2 Antti Koivisto 2021-12-15 05:09:32 PST
Created attachment 447224 [details]
Patch
Comment 3 Dean Jackson 2021-12-15 09:27:24 PST
Comment on attachment 447224 [details]
Patch

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

> Source/WebCore/ChangeLog:48
> +        Add HasSelectorFilter which uses non-counting BloomFilter internally. The size of the filter is 64 bytes.

I don't understand how BloomFilter<14> is 64 bytes but I'll take your word for it.
Comment 4 Antti Koivisto 2021-12-15 09:30:52 PST
> I don't understand how BloomFilter<14> is 64 bytes but I'll take your word
> for it.

It is not!
Comment 5 Antti Koivisto 2021-12-15 09:42:37 PST
Created attachment 447244 [details]
Patch for landing
Comment 6 Antti Koivisto 2021-12-15 09:51:49 PST
Created attachment 447247 [details]
Patch for landing
Comment 7 EWS 2021-12-15 09:52:43 PST
Tools/Scripts/svn-apply failed to apply attachment 447247 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Comment 8 Antti Koivisto 2021-12-15 09:54:10 PST
It is now BloomFilter<12> and 512 bytes (hopefully)
Comment 9 Antti Koivisto 2021-12-15 10:00:15 PST
Created attachment 447249 [details]
Patch for landing
Comment 10 Simon Fraser (smfr) 2021-12-15 10:10:41 PST
Comment on attachment 447249 [details]
Patch for landing

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

> Source/WebCore/ChangeLog:18
> +        Use it to quikly reject selectors.

quikly -> quickly
Comment 11 Antti Koivisto 2021-12-15 10:48:48 PST
Created attachment 447258 [details]
Patch
Comment 12 Antti Koivisto 2021-12-15 10:50:39 PST
Created attachment 447259 [details]
Patch for landing
Comment 13 EWS 2021-12-15 11:46:30 PST
Committed r287091 (245283@main): <https://commits.webkit.org/245283@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447259 [details].
Comment 14 Radar WebKit Bug Importer 2021-12-15 11:47:18 PST
<rdar://problem/86535166>