Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-matrix-transformPoint.html

Issue 2930883002: [geometry] replace m12 with m21 when transform DOMPoint from DOMMatrix. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="./resources/geometry-interfaces-test-helpers.js"></script> 4 <script src="./resources/geometry-interfaces-test-helpers.js"></script>
5 <script> 5 <script>
6 6
7 test(function() { 7 test(function() {
8 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]); 8 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
9 var point = matrix2d.transformPoint(); 9 var point = matrix2d.transformPoint();
10 assert_dom_point_equals(point, new DOMPoint(5, 6, 0, 1)); 10 assert_dom_point_equals(point, new DOMPoint(5, 6, 0, 1));
11 }, "DOMMatrixReadOnly transformPoint() - 2d matrix "); 11 }, "DOMMatrixReadOnly transformPoint() - 2d matrix ");
12 12
13 test(function() { 13 test(function() {
14 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]); 14 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]);
15 var point = matrix3d.transformPoint(); 15 var point = matrix3d.transformPoint();
16 assert_dom_point_equals(point, new DOMPoint(13, 14, 15, 16)); 16 assert_dom_point_equals(point, new DOMPoint(13, 14, 15, 16));
17 }, "DOMMatrixReadOnly transformPoint() - 3d matrix"); 17 }, "DOMMatrixReadOnly transformPoint() - 3d matrix");
18 18
19 test(function() { 19 test(function() {
20 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 20 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
21 var point = matrix2d.transformPoint(new DOMPoint(5)); 21 var point = matrix2d.transformPoint(new DOMPoint(5));
22 assert_dom_point_equals(point, new DOMPoint(20, 10, 0, 1)); 22 assert_dom_point_equals(point, new DOMPoint(10, 16, 0, 1));
23 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x)) - 2d matrix"); 23 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x)) - 2d matrix");
24 24
25 test(function() { 25 test(function() {
26 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 26 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
27 var point = matrix2d.transformPoint(new DOMPoint(5, 0, 0, 0)); 27 var point = matrix2d.transformPoint(new DOMPoint(5, 0, 0, 0));
28 assert_dom_point_equals(point, new DOMPoint(10, 0, 0, 0)); 28 assert_dom_point_equals(point, new DOMPoint(5, 10, 0, 0));
29 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, 0, 0, 0)) - 2d matrix"); 29 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, 0, 0, 0)) - 2d matrix");
30 30
31 test(function() { 31 test(function() {
32 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 32 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
33 var point = matrix2d.transformPoint(new DOMPoint(5, 4)); 33 var point = matrix2d.transformPoint(new DOMPoint(5, 4));
34 assert_dom_point_equals(point, new DOMPoint(20, 18, 0, 1)); 34 assert_dom_point_equals(point, new DOMPoint(22, 32, 0, 1));
35 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y)) - 2d matrix"); 35 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y)) - 2d matrix");
36 36
37 test(function() { 37 test(function() {
38 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 38 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
39 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 0, 0)); 39 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 0, 0));
40 assert_dom_point_equals(point, new DOMPoint(10, 8, 0, 0)); 40 assert_dom_point_equals(point, new DOMPoint(17, 26, 0, 0));
41 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, 0, 0)) - 2d matrix"); 41 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, 0, 0)) - 2d matrix");
42 42
43 test(function() { 43 test(function() {
44 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 44 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
45 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 3)); 45 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 3));
46 assert_dom_point_equals(point, new DOMPoint(20, 18, 3, 1)); 46 assert_dom_point_equals(point, new DOMPoint(22, 32, 3, 1));
47 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z)) - 2d matrix"); 47 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z)) - 2d matrix");
48 48
49 test(function() { 49 test(function() {
50 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 50 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
51 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 3, 0)); 51 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 3, 0));
52 assert_dom_point_equals(point, new DOMPoint(10, 8, 3, 0)); 52 assert_dom_point_equals(point, new DOMPoint(17, 26, 3, 0));
53 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, 0)) - 2d matrix"); 53 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, 0)) - 2d matrix");
54 54
55 test(function() { 55 test(function() {
56 var matrix2d = new DOMMatrixReadOnly([2, 0, 0, 2, 10, 10]); 56 var matrix2d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6]);
57 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 14, 5)); 57 var point = matrix2d.transformPoint(new DOMPoint(5, 4, 3, 2));
58 assert_dom_point_equals(point, new DOMPoint(60, 58, 14, 5)); 58 assert_dom_point_equals(point, new DOMPoint(27, 38, 3, 2));
59 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, w)) - 2d matrix"); 59 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, w)) - 2d matrix");
60 60
61 test(function() { 61 test(function() {
62 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]); 62 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]);
63 var point = matrix3d.transformPoint(new DOMPoint(5)); 63 var point = matrix3d.transformPoint(new DOMPoint(5));
64 assert_dom_point_equals(point, new DOMPoint(18, 24, 30, 36)); 64 assert_dom_point_equals(point, new DOMPoint(18, 24, 30, 36));
65 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x)) - 3d matrix"); 65 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x)) - 3d matrix");
66 66
67 test(function() { 67 test(function() {
68 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]); 68 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]);
(...skipping 24 matching lines...) Expand all
93 var point = matrix3d.transformPoint(new DOMPoint(5, 4, 3, 0)); 93 var point = matrix3d.transformPoint(new DOMPoint(5, 4, 3, 0));
94 assert_dom_point_equals(point, new DOMPoint(52, 64, 76, 88)); 94 assert_dom_point_equals(point, new DOMPoint(52, 64, 76, 88));
95 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, 0)) - 3d matrix"); 95 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, 0)) - 3d matrix");
96 96
97 test(function() { 97 test(function() {
98 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]); 98 var matrix3d = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1 3, 14, 15, 16]);
99 var point = matrix3d.transformPoint(new DOMPoint(5, 4, 14, 5)); 99 var point = matrix3d.transformPoint(new DOMPoint(5, 4, 14, 5));
100 assert_dom_point_equals(point, new DOMPoint(216, 244, 272, 300)); 100 assert_dom_point_equals(point, new DOMPoint(216, 244, 272, 300));
101 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, w)) - 3d matrix"); 101 }, "DOMMatrixReadOnly transformPoint(DOMPoint(x, y, z, w)) - 3d matrix");
102 </script> 102 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/geometry-interfaces-dom-point-readonly.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698