Files
ladybird/Libraries/LibWeb/DOM/Element.cpp
Andreas Kling 5461b44d04 LibWeb: Invalidate shadow subtree on host attribute change
Rules in a shadow root that match :host(...) can apply different style
to shadow descendants when the host's attributes or classes change.
The host's own invalidation flow doesn't reach into the shadow tree,
so descendants kept their cascaded values from the previous host
state.

When the host's stylesheets contain :host()-style rules that may match
the shadow host, mark the entire shadow subtree dirty so descendant
style is recomputed against the new host state.
2026-04-26 10:40:58 +02:00

227 KiB