mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Remove unneeded spec deviation from font loading
This commit is contained in:
parent
c60ad5b0b8
commit
33f87288e9
|
|
@ -323,21 +323,6 @@ GC::Ref<WebIDL::Promise> FontFace::load()
|
|||
if (font_face.m_urls.is_empty() || font_face.m_status != Bindings::FontFaceLoadStatus::Unloaded)
|
||||
return font_face.loaded();
|
||||
|
||||
load_font_source();
|
||||
|
||||
return font_face.loaded();
|
||||
}
|
||||
|
||||
void FontFace::load_font_source()
|
||||
{
|
||||
VERIFY(!m_urls.is_empty() && m_status == Bindings::FontFaceLoadStatus::Unloaded);
|
||||
// NOTE: These steps are from the load() method, but can also be called by the user agent when the font
|
||||
// is needed to render something on the page.
|
||||
|
||||
// User agents can initiate font loads on their own, whenever they determine that a given font face is necessary
|
||||
// to render something on the page. When this happens, they must act as if they had called the corresponding
|
||||
// FontFace’s load() method described here.
|
||||
|
||||
// 3. Otherwise, set font face’s status attribute to "loading", return font face’s [[FontStatusPromise]],
|
||||
// and continue executing the rest of this algorithm asynchronously.
|
||||
m_status = Bindings::FontFaceLoadStatus::Loading;
|
||||
|
|
@ -405,6 +390,12 @@ void FontFace::load_font_source()
|
|||
dbgln("FIXME: Worker font loading not implemented");
|
||||
}
|
||||
}));
|
||||
|
||||
// User agents can initiate font loads on their own, whenever they determine that a given font face is necessary
|
||||
// to render something on the page. When this happens, they must act as if they had called the corresponding
|
||||
// FontFace’s load() method described here.
|
||||
|
||||
return font_face.loaded();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ public:
|
|||
GC::Ref<WebIDL::Promise> load();
|
||||
GC::Ref<WebIDL::Promise> loaded() const;
|
||||
|
||||
void load_font_source();
|
||||
|
||||
GC::Ref<WebIDL::Promise> font_status_promise() { return m_font_status_promise; }
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user