Files
ladybird/Libraries/LibWeb/DOM/Node.cpp
Andreas Kling 3cbe6bc89a LibWeb: Schedule attribute :has() walks on outer scopes too
The property-based Node::invalidate_style only added inner shadow
scopes (the element's own shadow and enclosing hosts' shadows). When
the mutated element lived inside a shadow tree, mutations could not
reach ::part(...:has(...)) rules in the outer document or outer
shadow root because those scopes were never collected.

Walk parent_or_shadow_host and add the document scope (or each
crossed shadow root scope) when the ancestor's root differs from
this element's root, alongside the inner shadow scopes already
collected.
2026-04-26 10:40:58 +02:00

164 KiB