1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibWeb: Implement CanvasRenderingContext2D.save()

This commit is contained in:
Linus Groh 2021-12-27 14:31:23 +01:00 committed by Andreas Kling
parent 6d50ff71de
commit 7d435b5ada
3 changed files with 12 additions and 0 deletions

View file

@ -313,4 +313,11 @@ void CanvasRenderingContext2D::put_image_data(const ImageData& image_data, float
did_draw(Gfx::FloatRect(x, y, image_data.width(), image_data.height()));
}
// https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-save
void CanvasRenderingContext2D::save()
{
// The save() method steps are to push a copy of the current drawing state onto the drawing state stack.
m_drawing_state_stack.append(m_drawing_state);
}
}