canvas: Add CanvasPattern 'setTranform(transform)' method (#37731)

Follow the HTML canvas specification and add missing
'setTransform(transform)' method to CanvasPattern interface.
https://html.spec.whatwg.org/multipage/#dom-canvaspattern-settransform

Testing: Improvements in the tests
- html/canvas/element/fill-and-stroke-styles/2d.pattern.transform*
- html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.transform*

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
Andrei Volykhin 2025-06-26 17:38:30 +03:00 committed by GitHub
parent 5286869b96
commit 3c16db2642
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 65 additions and 51 deletions

View file

@ -1,4 +0,0 @@
[2d.pattern.transform.identity.html]
[Canvas test: 2d.pattern.transform.identity]
expected: FAIL

View file

@ -1,4 +0,0 @@
[2d.pattern.transform.infinity.html]
[Canvas test: 2d.pattern.transform.infinity]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.pattern.transform.identity.html]
[OffscreenCanvas test: 2d.pattern.transform.identity]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.pattern.transform.identity.worker.html]
[2d]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.pattern.transform.infinity.html]
[OffscreenCanvas test: 2d.pattern.transform.infinity]
expected: FAIL

View file

@ -1,3 +0,0 @@
[2d.pattern.transform.infinity.worker.html]
[2d]
expected: FAIL

View file

@ -1,7 +1,4 @@
[idlharness.any.worker.html]
[CanvasPattern interface: operation setTransform(optional DOMMatrix2DInit)]
expected: FAIL
[Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>))]
expected: FAIL

View file

@ -4343,9 +4343,6 @@
[CanvasRenderingContext2D interface: calling roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>)) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError]
expected: FAIL
[CanvasPattern interface: operation setTransform(optional DOMMatrix2DInit)]
expected: FAIL
[Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>))]
expected: FAIL