canvas: Reset the current path on canvas context resetting (#37671)

Follow the HTML canvas specification and empty the list of subpaths
in context's current default path (step 2) on canvas context reseting
(reset() or set bitmap dimestion).

https://html.spec.whatwg.org/multipage/#reset-the-rendering-context-to-its-default-state

Testing: Improvements in the tests
- html/canvas/element/canvas-host/2d.canvas.host.initial.reset.path.html
- html/canvas/offscreen/canvas-host/2d.canvas.host.initial.reset.path*

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-06-24 14:09:25 +03:00 committed by GitHub
parent fc20d8b2e1
commit 3f496f8225
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 10 deletions

View file

@ -1,3 +0,0 @@
[2d.canvas.host.initial.reset.path.html]
[Resetting the canvas state resets the current path]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.canvas.host.initial.reset.path.worker.html]
[Resetting the canvas state resets the current path]
expected: FAIL