Open Bug 1845291 Opened 11 months ago Updated 6 months ago

:has Selector Caching - Improvement for `querySelectorAll`

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

People

(Reporter: dshin, Unassigned)

References

(Blocks 1 open bug)

Details

Current cache improvement only recalls match/non-match at the level the selector check is made, not at subtree levels.

This means we still do many checks in case of div > ... > div > .a on document.querySelectorAll(":has(.a)").

While it's relatively easy to store all subtree matches, that can grow big under some conditions (e.g. :has(> .foo > .a) and .div1 .div2 > .foo > .a, but with many .div2 branches).

Blocks: has-pseudo
You need to log in before you can comment on or make changes to this bug.