mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWeb: Add CanvasRenderingContext2D context attribute parsing
Makes `context.getContextAttributes()` work.
This commit is contained in:
parent
4d70f6ce1c
commit
fac0f82031
Notes:
github-actions[bot]
2025-04-29 11:52:34 +00:00
Author: https://github.com/gmta
Commit: fac0f82031
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4506
Reviewed-by: https://github.com/shannonbooth
6 changed files with 81 additions and 17 deletions
|
@ -43,7 +43,7 @@ ErrorOr<GC::Ref<HTML::HTMLCanvasElement>, WebDriver::Error> draw_bounding_box_fr
|
|||
MUST(canvas.set_height(paint_height));
|
||||
|
||||
// FIXME: 5. Let context, a canvas context mode, be the result of invoking the 2D context creation algorithm given canvas as the target.
|
||||
canvas.create_2d_context();
|
||||
MUST(canvas.create_2d_context({}));
|
||||
canvas.allocate_painting_surface_if_needed();
|
||||
if (!canvas.surface())
|
||||
return Error::from_code(ErrorCode::UnableToCaptureScreen, "Failed to allocate painting surface"sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue