LibWeb: Add stub implementation of FontFaceSet and Document.fonts

This is now enough for duolingo to load and use its fallback fonts.
This commit is contained in:
Andrew Kaster 2024-05-07 14:49:31 -06:00 committed by Andreas Kling
commit e10721f1b5
Notes: sideshowbarker 2024-07-17 05:03:11 +09:00
13 changed files with 174 additions and 1 deletions

View file

@ -256,6 +256,9 @@ public:
JS::NonnullGCPtr<HTMLCollection> scripts();
JS::NonnullGCPtr<HTML::HTMLAllCollection> all();
// https://drafts.csswg.org/css-font-loading/#font-source
JS::NonnullGCPtr<CSS::FontFaceSet> fonts();
void clear();
void capture_events();
void release_events();
@ -810,6 +813,9 @@ private:
JS::GCPtr<HTMLCollection> m_scripts;
JS::GCPtr<HTML::HTMLAllCollection> m_all;
// https://drafts.csswg.org/css-font-loading/#font-source
JS::GCPtr<CSS::FontFaceSet> m_fonts;
// https://html.spec.whatwg.org/#completely-loaded-time
Optional<AK::UnixDateTime> m_completely_loaded_time;