Files
ladybird/Tests/LibWeb/Text/expected/css/stylesheet-disabled-toggle-invalidation.txt
Andreas Kling cfa75e6eb4 LibWeb: Invalidate stylesheet owners when disabled state changes
Toggling CSSStyleSheet::disabled previously cleared the cached media
match bits and reloaded fonts, but never informed the owning documents
or shadow roots that style resolution was now stale. Worse, the IDL
binding for the disabled attribute dispatches through a non-virtual
setter on StyleSheet, so any override on CSSStyleSheet was bypassed
entirely.

Make set_disabled() virtual so the CSSStyleSheet override actually runs,
snapshot the pre-mutation shadow-root stylesheet effects before flipping
the flag, and hand them to invalidate_owners() so a disable that strips
the last host-reaching rule still tears down host-side style correctly.
2026-04-23 16:45:22 +02:00

4 lines
91 B
Plaintext

before disable: rgb(255, 0, 0)
after disable: rgb(0, 0, 0)
after re-enable: rgb(255, 0, 0)