Files
ladybird/Libraries/LibWeb/CSS/CSSStyleSheet.cpp
Andreas Kling a941b8a2a1 LibWeb: Skip font/image activation while a stylesheet is disabled
CSSOM's "add a CSS style sheet" steps bail out once the disabled flag
is set, so ownership alone should not make a disabled sheet observable
in the destination document. Delay CSS-connected font activation in
add_owning_document_or_shadow_root() until the sheet actually becomes
enabled, and refuse pending image-resource loads on a disabled sheet
for the same reason.

Also extend set_disabled() to drive the font/image lifecycle around the
transition: loading fonts and pending images when the sheet becomes
enabled, and unloading fonts when it goes back to disabled.
2026-04-22 20:59:00 +02:00

23 KiB