mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-10 17:12:41 +02:00
The property-based Node::invalidate_style only collected the element's own shadow scope (when the element itself was a shadow host), not the shadow scopes of enclosing hosts. So a class or attribute change on a light-DOM descendant of a shadow host could not flip :host(...:has(.descendant)) rules in that host's shadow root. Walk parent_or_shadow_host from the mutated element and add every enclosing shadow root's StyleScope to the set we check :has() metadata against, schedule walks on, and run invalidation plans through.
163 KiB
163 KiB