mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
canvas: Add CanvasTransform 'setTransform(transform)' method (#37692)
Follow the HTML canvas specification and add missing 'setTransform(transform)' method to CanvasTransform interface. https://html.spec.whatwg.org/multipage/#dom-context-2d-settransform-matrix The third-party WebIDL doesn't support different extended attributes on different overloads of methods, so 'Throws' attribute was added to another 'setTransform(...)' method. https://bugzilla.mozilla.org/show_bug.cgi?id=1020975 Testing: Improvements in the tests - css/geometry/DOMMatrix* - html/canvas/element/transformations/2d.transformation.setTransform.multiple.html - html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple New failing tests due to disabled 'paint worklet' feature - css/css-paint-api/setTransform-00*.https.html Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
This commit is contained in:
parent
64259de1f7
commit
59b99de90a
17 changed files with 226 additions and 362 deletions
2
tests/wpt/meta/css/css-paint-api/setTransform-001.https.html.ini
vendored
Normal file
2
tests/wpt/meta/css/css-paint-api/setTransform-001.https.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[setTransform-001.https.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/css/css-paint-api/setTransform-002.https.html.ini
vendored
Normal file
2
tests/wpt/meta/css/css-paint-api/setTransform-002.https.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[setTransform-002.https.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/css/css-paint-api/setTransform-003.https.html.ini
vendored
Normal file
2
tests/wpt/meta/css/css-paint-api/setTransform-003.https.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[setTransform-003.https.html]
|
||||
expected: FAIL
|
2
tests/wpt/meta/css/css-paint-api/setTransform-004.https.html.ini
vendored
Normal file
2
tests/wpt/meta/css/css-paint-api/setTransform-004.https.html.ini
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
[setTransform-004.https.html]
|
||||
expected: FAIL
|
|
@ -17,299 +17,62 @@
|
|||
[addPath({f: 0, m42: 5e-324}) (invalid)]
|
||||
expected: FAIL
|
||||
|
||||
[addPath (Sanity check without second parameter)]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({is2D: undefined})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({is2D: undefined})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({a: 1, m11: 1})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({a: 1, m11: 1})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({b: 0, m12: undefined})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({b: 0, m12: undefined})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({c: 0, m21: 0})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({c: 0, m21: 0})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({c: 0, m21: -0})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({c: 0, m21: -0})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({c: -0, m21: 0})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({c: -0, m21: 0})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({c: -0, m21: -0})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({c: -0, m21: -0})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({d: Infinity, m22: Infinity})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({d: Infinity, m22: Infinity})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({e: -Infinity, m41: -Infinity})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({e: -Infinity, m41: -Infinity})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({f: NaN, m42: NaN})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({f: NaN, m42: NaN})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({f: NaN, m42: NaN, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({f: NaN, m42: NaN, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({f: 0, m42: null})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({f: 0, m42: null})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({f: -0, m42: null})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({f: -0, m42: null})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({a: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({a: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({b: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({b: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({c: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({c: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({d: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({d: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({e: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({e: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({f: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({f: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({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})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({a: -0, b: -0, c: -0, d: -0, e: -0, f: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({a: -0, b: -0, c: -0, d: -0, e: -0, f: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m11: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m11: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m12: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m12: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m21: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m21: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m22: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m22: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m41: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m41: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m42: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m42: 2})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({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})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m11: -0, m12: -0, m21: -0, m22: -0, m41: -0, m42: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m11: -0, m12: -0, m21: -0, m22: -0, m41: -0, m42: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m13: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m13: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m13: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m13: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m14: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m14: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m14: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m14: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m23: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m23: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m23: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m23: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m24: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m24: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m24: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m24: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m31: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m31: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m31: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m31: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m32: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m32: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m32: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m32: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m33: 1, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m33: 1, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m34: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m34: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m34: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m34: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m43: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m43: 0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m43: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m43: -0, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({m44: 1, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({m44: 1, is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[setTransform({is2D: true})]
|
||||
expected: FAIL
|
||||
|
||||
[addPath({is2D: true})]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[DOMMatrixInit-validate-fixup.html]
|
||||
[{f: NaN, m42: NaN, is2D: true} (2d)]
|
||||
expected: FAIL
|
||||
|
||||
[{f: NaN, m42: NaN} (2d)]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.transformation.setTransform.multiple.html]
|
||||
[Canvas test: 2d.transformation.setTransform.multiple]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.transformation.setTransform.multiple.html]
|
||||
[OffscreenCanvas test: 2d.transformation.setTransform.multiple]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.transformation.setTransform.multiple.worker.html]
|
||||
[2d]
|
||||
expected: FAIL
|
||||
|
|
@ -47,12 +47,6 @@
|
|||
[OffscreenCanvasRenderingContext2D interface: operation isContextLost()]
|
||||
expected: FAIL
|
||||
|
||||
[OffscreenCanvasRenderingContext2D interface: operation setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
||||
expected: FAIL
|
||||
|
||||
[OffscreenCanvasRenderingContext2D interface: operation setTransform(optional DOMMatrix2DInit)]
|
||||
expected: FAIL
|
||||
|
||||
[OffscreenCanvasRenderingContext2D interface: attribute imageSmoothingQuality]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -4229,12 +4229,6 @@
|
|||
[CanvasRenderingContext2D interface: operation isContextLost()]
|
||||
expected: FAIL
|
||||
|
||||
[CanvasRenderingContext2D interface: operation setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
||||
expected: FAIL
|
||||
|
||||
[CanvasRenderingContext2D interface: operation setTransform(optional DOMMatrix2DInit)]
|
||||
expected: FAIL
|
||||
|
||||
[CanvasRenderingContext2D interface: attribute imageSmoothingQuality]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4403,12 +4397,6 @@
|
|||
[OffscreenCanvasRenderingContext2D interface: operation isContextLost()]
|
||||
expected: FAIL
|
||||
|
||||
[OffscreenCanvasRenderingContext2D interface: operation setTransform(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)]
|
||||
expected: FAIL
|
||||
|
||||
[OffscreenCanvasRenderingContext2D interface: operation setTransform(optional DOMMatrix2DInit)]
|
||||
expected: FAIL
|
||||
|
||||
[OffscreenCanvasRenderingContext2D interface: attribute imageSmoothingQuality]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue