mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Mark elements reached by stepping through sibling combinators inside :has() and use that breadcrumb during generic invalidation walks. Keep the existing conservative sibling scans for mutations outside those marked subtrees so nested :is(), :not(), and nesting cases continue to invalidate correctly. Also keep :has() eager within compounds that contain ::part(). Those selectors retarget the remaining simple selectors to the part host, so deferring :has() there changes which element the pseudo-class runs against and can make ::part(foo):has(.match) spuriously match. Add a counter-based sibling-scan test and a regression test covering the ::part()/ :has() selector orderings.