ladybird/Libraries/LibWeb/HTML/EventLoop
Sam Atkins d9f12da712 LibWeb: Implement missing code for FontFace/FontFaceSet loading
As FontFaces are added or removed from a FontFaceSet, and as they load
or fail, the FontFaceSet moves them between a few different lists, and
updates its loading/loaded status. In the spec, this is how the
FontFaceSet.[[ReadyPromise]] gets fulfilled: When the document has
finished loading and FontFaceSet.[[LoadingFonts]] is empty, it resolves
the promise.

To support this, FontFace now keeps a set of FontFaceSets that it is
contained in.

This lets us remove the non-spec resolve_ready_promise() call in
EventLoop which was sometimes triggering before any fonts had attempted
to load.

As noted, there's a spec issue with the ready promise: If nothing
modifies the document's fonts, then it would never resolve. My ad-hoc
fix is to also switch the FontFaceSet to the loaded state if it is
empty, which appears to solve the issues but is not ideal.
2026-02-24 15:44:32 +00:00
..
EventLoop.cpp LibWeb: Implement missing code for FontFace/FontFaceSet loading 2026-02-24 15:44:32 +00:00
EventLoop.h LibWeb: Add a hook in EventLoop to call a task when reaching step 1 2025-10-27 17:28:49 -07:00
Task.cpp LibWeb: Add "parallel queue" and allow it as fetch task destination 2025-07-17 00:13:39 +02:00
Task.h LibWeb: Add the Crypto task source 2025-12-28 18:56:50 +01:00
TaskQueue.cpp LibWeb: Don't run tasks in documents that haven't been BC associated 2025-12-27 16:40:34 +01:00
TaskQueue.h LibGC: Rename MarkedVector => RootVector 2024-12-26 19:10:44 +01:00