add implementation for Path2D addPath method (#37838)

Add implementation for Path2D addPath method
Spec:
https://html.spec.whatwg.org/multipage/canvas.html#dom-path2d-addpath

Testing: WPT test -
`tests/wpt/tests/css/geometry/DOMMatrix2DInit-validate-fixup.html`
Fixes: #37695

---------

Signed-off-by: Lloyd Massiah <artmis9@protonmail.com>
Signed-off-by: arthmis <artmis9@protonmail.com>
This commit is contained in:
arthmis 2025-08-09 01:06:20 -04:00 committed by GitHub
parent 6471587fb4
commit 86d7f4c793
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 57 additions and 83 deletions

View file

@ -1,78 +0,0 @@
[DOMMatrix2DInit-validate-fixup.html]
[addPath({a: 1, m11: 2}) (invalid)]
expected: FAIL
[addPath({b: 0, m12: -1}) (invalid)]
expected: FAIL
[addPath({c: Infinity, m21: -Infinity}) (invalid)]
expected: FAIL
[addPath({d: 0, m22: NaN}) (invalid)]
expected: FAIL
[addPath({e: 1, m41: 1.00000001}) (invalid)]
expected: FAIL
[addPath({f: 0, m42: 5e-324}) (invalid)]
expected: FAIL
[addPath({d: Infinity, m22: Infinity})]
expected: FAIL
[addPath({e: -Infinity, m41: -Infinity})]
expected: FAIL
[addPath({f: NaN, m42: NaN})]
expected: FAIL
[addPath({f: NaN, m42: NaN, is2D: true})]
expected: FAIL
[addPath({a: 2})]
expected: FAIL
[addPath({b: 2})]
expected: FAIL
[addPath({c: 2})]
expected: FAIL
[addPath({d: 2})]
expected: FAIL
[addPath({e: 2})]
expected: FAIL
[addPath({f: 2})]
expected: FAIL
[addPath({a: -0, b: -0, c: -0, d: -0, e: -0, f: -0})]
expected: FAIL
[addPath({a: -0, b: -0, c: -0, d: -0, e: -0, f: -0, is2D: true})]
expected: FAIL
[addPath({m11: 2})]
expected: FAIL
[addPath({m12: 2})]
expected: FAIL
[addPath({m21: 2})]
expected: FAIL
[addPath({m22: 2})]
expected: FAIL
[addPath({m41: 2})]
expected: FAIL
[addPath({m42: 2})]
expected: FAIL
[addPath({m11: -0, m12: -0, m21: -0, m22: -0, m41: -0, m42: -0})]
expected: FAIL
[addPath({m11: -0, m12: -0, m21: -0, m22: -0, m41: -0, m42: -0, is2D: true})]
expected: FAIL