mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
Replace the broad whole-subtree fallback for :has() invalidation with a more targeted approach. The old code unconditionally overwrote fine-grained :has() invalidation plans with invalidate_whole_subtree for every non-rightmost compound containing :has(). This prevented optimization for direct cases like `.a:has(.b) .c`. The new approach propagates pseudo_class:Has through :is()/:where() argument processing when :has() appears in non-rightmost compounds of the inner selector. For complex :is() arguments (multiple compounds), it falls back to whole-subtree invalidation since the outer plan can't correctly capture the nested combinator structure.
19 KiB
19 KiB