mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
CSSFontFaceRule inherited from CSSStyleSheet::Subresource, which made each face a critical subresource of its parent stylesheet. New subresources start in the Unloaded state, and the stylesheet's loading_state() treats Unloaded as Loading. When a @font-face declares a unicode-range and no codepoint in that range is ever rendered, FontComputer only registers the face for matching and never calls FontFace::load() on it. The face stays Unloaded, so the parent stylesheet stays stuck reporting Loading, which keeps HTMLLinkElement's load-event delayer alive and prevents the document load event from firing. HTMLParserEndState then times out in phase 2 (WaitingForLoadEventDelay) after 15 seconds. Decouple @font-face from the stylesheet's loading state. Font loading remains tracked by FontFaceSet, which is the correct place.
1.7 KiB
1.7 KiB