mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 11:36:22 +00:00
parent
a0b44ff5e7
commit
85b424464a
Notes:
github-actions[bot]
2025-01-21 16:49:39 +00:00
Author: https://github.com/trflynn89
Commit: 85b424464a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3335
191 changed files with 574 additions and 574 deletions
|
@ -132,7 +132,7 @@ void execute_script(HTML::BrowsingContext const& browsing_context, ByteString bo
|
|||
return JS::js_undefined();
|
||||
timer->stop();
|
||||
|
||||
auto promise_promise = GC::Ref { verify_cast<JS::Promise>(*promise->promise()) };
|
||||
auto promise_promise = GC::Ref { as<JS::Promise>(*promise->promise()) };
|
||||
on_complete->function()({ promise_promise->state(), promise_promise->result() });
|
||||
|
||||
return JS::js_undefined();
|
||||
|
@ -164,7 +164,7 @@ void execute_async_script(HTML::BrowsingContext const& browsing_context, ByteStr
|
|||
|
||||
// 7. Let promise be a new Promise.
|
||||
auto promise_capability = WebIDL::create_promise(realm);
|
||||
GC::Ref promise { verify_cast<JS::Promise>(*promise_capability->promise()) };
|
||||
GC::Ref promise { as<JS::Promise>(*promise_capability->promise()) };
|
||||
|
||||
// 8. Run the following substeps in parallel:
|
||||
Platform::EventLoopPlugin::the().deferred_invoke(GC::create_function(realm.heap(), [&vm, &realm, &browsing_context, timer, promise_capability, promise, body = move(body), arguments = move(arguments)]() mutable {
|
||||
|
|
|
@ -35,7 +35,7 @@ ErrorOr<GC::Ref<HTML::HTMLCanvasElement>, WebDriver::Error> draw_bounding_box_fr
|
|||
|
||||
// 4. Let canvas be a new canvas element, and set its width and height to paint width and paint height, respectively.
|
||||
auto canvas_element = DOM::create_element(element.document(), HTML::TagNames::canvas, Namespace::HTML).release_value_but_fixme_should_propagate_errors();
|
||||
auto& canvas = verify_cast<HTML::HTMLCanvasElement>(*canvas_element);
|
||||
auto& canvas = as<HTML::HTMLCanvasElement>(*canvas_element);
|
||||
|
||||
// FIXME: Handle DevicePixelRatio in HiDPI mode.
|
||||
MUST(canvas.set_width(paint_width));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue