| Index: LayoutTests/fast/dom/geometry-interfaces-dom-matrix-flip.html
|
| diff --git a/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-skew.html b/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-flip.html
|
| similarity index 64%
|
| copy from LayoutTests/fast/dom/geometry-interfaces-dom-matrix-skew.html
|
| copy to LayoutTests/fast/dom/geometry-interfaces-dom-matrix-flip.html
|
| index 0db9021b5d3e6b8d35afbc62b2eb60204064e834..9390cbfc4f82872a3fa465375a94591b6fa92016 100644
|
| --- a/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-skew.html
|
| +++ b/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-flip.html
|
| @@ -17,17 +17,14 @@ test(function() {
|
| matrix.e = 5;
|
| matrix.f = 6;
|
| assert_true(matrix.is2D);
|
| - var result = matrix.skewX(32);
|
| - var expected = new DOMMatrix();
|
| - expected.m21 = Math.tan(Math.PI / 180 * 32);
|
| - expected.preMultiplySelf(matrix);
|
| + var result = matrix.flipX()
|
| + var expected = new DOMMatrix(matrix);
|
| + expected.scaleNonUniformSelf(-1.0);
|
| assert_true(matrix.is2D);
|
| assert_false(matrix.isIdentity);
|
| assert_array_equals(matrix.toFloat64Array(), [ 1, 2, 0, 0, 3, 4, 0, 0, 0, 0, 1, 0, 5, 6, 0, 1 ]);
|
| assert_array_equals(result.toFloat64Array(), expected.toFloat64Array());
|
| - matrix.skewXSelf(32);
|
| - assert_array_equals(matrix.toFloat64Array(), expected.toFloat64Array());
|
| -}, "DOMMatrix.skewX(sx) and DOMMatrix.skewXSelf(sx) for 2D Matrix");
|
| +}, "DOMMatrix.flipX() for 2D Matrix");
|
|
|
| test(function() {
|
| var matrix = new DOMMatrix();
|
| @@ -38,17 +35,14 @@ test(function() {
|
| matrix.e = 5;
|
| matrix.f = 6;
|
| assert_true(matrix.is2D);
|
| - var result = matrix.skewY(25);
|
| - var expected = new DOMMatrix();
|
| - expected.m12 = Math.tan(Math.PI / 180 * 25);
|
| - expected.preMultiplySelf(matrix);
|
| + var result = matrix.flipY()
|
| + var expected = new DOMMatrix(matrix);
|
| + expected.scaleNonUniformSelf(1.0, -1.0);
|
| assert_true(matrix.is2D);
|
| assert_false(matrix.isIdentity);
|
| assert_array_equals(matrix.toFloat64Array(), [ 1, 2, 0, 0, 3, 4, 0, 0, 0, 0, 1, 0, 5, 6, 0, 1 ]);
|
| assert_array_equals(result.toFloat64Array(), expected.toFloat64Array());
|
| - matrix.skewYSelf(25);
|
| - assert_array_equals(matrix.toFloat64Array(), expected.toFloat64Array());
|
| -}, "DOMMatrix.skewY(sy) and DOMMatrix.skewYSelf(sy) for 2D Matrix");
|
| +}, "DOMMatrix.flipY() for 2D Matrix");
|
|
|
| test(function() {
|
| var matrix = new DOMMatrix();
|
| @@ -69,17 +63,14 @@ test(function() {
|
| matrix.m43 = 15;
|
| matrix.m44 = 16;
|
| assert_false(matrix.is2D);
|
| - var result = matrix.skewX(32);
|
| - var expected = new DOMMatrix();
|
| - expected.m21 = Math.tan(Math.PI / 180 * 32);
|
| - expected.preMultiplySelf(matrix);
|
| + var result = matrix.flipX()
|
| + var expected = new DOMMatrix(matrix);
|
| + expected.scaleNonUniformSelf(-1.0);
|
| assert_false(matrix.is2D);
|
| assert_false(matrix.isIdentity);
|
| assert_array_equals(matrix.toFloat64Array(), [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]);
|
| assert_array_equals(result.toFloat64Array(), expected.toFloat64Array());
|
| - matrix.skewXSelf(32);
|
| - assert_array_equals(matrix.toFloat64Array(), expected.toFloat64Array());
|
| -}, "DOMMatrix.skewX(sx) and DOMMatrix.skewXSelf(sx) for 3D Matrix");
|
| +}, "DOMMatrix.flipX() for 3D Matrix");
|
|
|
| test(function() {
|
| var matrix = new DOMMatrix();
|
| @@ -100,17 +91,14 @@ test(function() {
|
| matrix.m43 = 15;
|
| matrix.m44 = 16;
|
| assert_false(matrix.is2D);
|
| - var result = matrix.skewY(25);
|
| - var expected = new DOMMatrix();
|
| - expected.m12 = Math.tan(Math.PI / 180 * 25);
|
| - expected.preMultiplySelf(matrix);
|
| + var result = matrix.flipY()
|
| + var expected = new DOMMatrix(matrix);
|
| + expected.scaleNonUniformSelf(1.0, -1.0);
|
| assert_false(matrix.is2D);
|
| assert_false(matrix.isIdentity);
|
| assert_array_equals(matrix.toFloat64Array(), [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]);
|
| assert_array_equals(result.toFloat64Array(), expected.toFloat64Array());
|
| - matrix.skewYSelf(25);
|
| - assert_array_equals(matrix.toFloat64Array(), expected.toFloat64Array());
|
| -}, "DOMMatrix.skewY(sy) and DOMMatrix.skewYSelf(sy) for 3D Matrix");
|
| +}, "DOMMatrix.flipY() for 3D Matrix");
|
|
|
| </script>
|
| </body>
|
|
|