mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Reset Painter when resetting canvas to its initial state
This commit is contained in:
parent
017e8a5b8d
commit
1c00279488
Notes:
github-actions[bot]
2025-10-23 16:53:42 +00:00
Author: https://github.com/tcl3
Commit: 1c00279488
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6536
Reviewed-by: https://github.com/gmta ✅
7 changed files with 119 additions and 1 deletions
|
|
@ -634,8 +634,10 @@ void CanvasRenderingContext2D::reset_to_default_state()
|
|||
// 4. Reset everything that drawing state consists of to their initial values.
|
||||
reset_drawing_state();
|
||||
|
||||
if (surface)
|
||||
if (surface) {
|
||||
painter()->reset();
|
||||
did_draw(surface->rect().to_type<float>());
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-measuretext
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue