mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
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.
164 KiB
164 KiB