mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-01 05:41:01 +00:00
LibWeb: Resolve FontFaceSet::load promise with all loaded FontFaces
The resulting array is required on https://www.canva.com/
This commit is contained in:
parent
52a23dc02e
commit
8210a7b3e3
Notes:
github-actions[bot]
2025-07-21 15:31:12 +00:00
Author: https://github.com/Lubrsi
Commit: 8210a7b3e3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5544
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 60 additions and 2 deletions
|
|
@ -264,9 +264,10 @@ JS::ThrowCompletionOr<GC::Ref<WebIDL::Promise>> FontFaceSet::load(String const&
|
|||
|
||||
WebIDL::wait_for_all(
|
||||
realm, promises,
|
||||
[&realm, promise](auto const&) {
|
||||
[&realm, promise](auto const& fonts) {
|
||||
HTML::TemporaryExecutionContext execution_context { realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
WebIDL::resolve_promise(realm, promise);
|
||||
auto fonts_array = JS::Array::create_from(realm, fonts);
|
||||
WebIDL::resolve_promise(realm, promise, fonts_array);
|
||||
},
|
||||
[&realm, promise](auto error) {
|
||||
HTML::TemporaryExecutionContext execution_context { realm, HTML::TemporaryExecutionContext::CallbacksEnabled::Yes };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue