mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
Invalidate only the style scope whose media rules changed instead of throwing away every shadow root rule cache whenever any active stylesheet changes media query match state. Shadow-root stylesheet changes still dirty the host side because :host and ::slotted selectors can affect nodes outside the shadow tree. When scoped invalidation leaves dirty descendants in a shadow root, preserve the host ancestor chain so the document style update walk reaches them before forced layout. Add coverage that a matching media rule introduced in one shadow tree does not broadly invalidate a page full of unrelated shadow roots, and that a dirty shadow root is updated before layout is forced.
6.8 KiB
6.8 KiB