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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/css-transforms.xhtml

Issue 1406303007: Drop SVGGraphicsElement.getTransformToElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 1 month 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
OLDNEW
1 <html xmlns="http://www.w3.org/1999/xhtml"> 1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <head> 2 <head>
3 <script>window.enablePixelTesting = true;</script> 3 <script>window.enablePixelTesting = true;</script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 7
8 <svg id="svg1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"> 8 <svg id="svg1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
9 <circle id="circle" cx="40" cy="40" r="40" fill="green" style="-webkit-transfo rm: scale(2, 2) translate(10px, 10px)"/> 9 <circle id="circle" cx="40" cy="40" r="40" fill="green" style="-webkit-transfo rm: scale(2, 2) translate(10px, 10px)"/>
10 </svg> 10 </svg>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 shouldBe("rect.transform.baseVal.numberOfItems", "2"); 66 shouldBe("rect.transform.baseVal.numberOfItems", "2");
67 shouldBeEqualToString("rect.getAttribute('transform')", "translate(1000, 1000) rotate(90)"); 67 shouldBeEqualToString("rect.getAttribute('transform')", "translate(1000, 1000) rotate(90)");
68 shouldBeEqualToString("dumpTransform(rect.transform.baseVal.getItem(0))", "typ e=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 1000.0 1000.0]"); 68 shouldBeEqualToString("dumpTransform(rect.transform.baseVal.getItem(0))", "typ e=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 1000.0 1000.0]");
69 shouldBeEqualToString("dumpTransform(rect.transform.baseVal.getItem(1))", "typ e=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]"); 69 shouldBeEqualToString("dumpTransform(rect.transform.baseVal.getItem(1))", "typ e=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]");
70 70
71 debug(""); 71 debug("");
72 debug("Test SVGLocatable interface"); 72 debug("Test SVGLocatable interface");
73 shouldBeEqualToString("dumpMatrix(circle.getCTM())", "[2.0 0.0 0.0 2.0 20.0 20 .0]"); 73 shouldBeEqualToString("dumpMatrix(circle.getCTM())", "[2.0 0.0 0.0 2.0 20.0 20 .0]");
74 shouldBeEqualToString("dumpMatrix(circle.getScreenCTM())", "[2.0 0.0 0.0 2.0 2 8.0 28.0]"); 74 shouldBeEqualToString("dumpMatrix(circle.getScreenCTM())", "[2.0 0.0 0.0 2.0 2 8.0 28.0]");
75 shouldBeEqualToString("dumpRect(circle.getBBox())", "[0 0 80 80]"); 75 shouldBeEqualToString("dumpRect(circle.getBBox())", "[0 0 80 80]");
76 shouldBeEqualToString("dumpMatrix(circle.getTransformToElement(circle))", "[1. 0 0.0 0.0 1.0 0.0 0.0]"); 76
77
78 shouldBeEqualToString("dumpMatrix(rect.getCTM())", "[0.7 0.7 -0.7 0.7 100.0 0. 0]"); 77 shouldBeEqualToString("dumpMatrix(rect.getCTM())", "[0.7 0.7 -0.7 0.7 100.0 0. 0]");
79 shouldBeEqualToString("dumpMatrix(rect.getScreenCTM())", "[0.7 0.7 -0.7 0.7 31 2.0 8.0]"); 78 shouldBeEqualToString("dumpMatrix(rect.getScreenCTM())", "[0.7 0.7 -0.7 0.7 31 2.0 8.0]");
80 shouldBeEqualToString("dumpRect(rect.getBBox())", "[40 40 100 100]"); 79 shouldBeEqualToString("dumpRect(rect.getBBox())", "[40 40 100 100]");
81 shouldBeEqualToString("dumpMatrix(rect.getTransformToElement(rect))", "[1.0 0. 0 0.0 1.0 0.0 0.0]"); 80
82
83 debug(""); 81 debug("");
84 debug("Test CSSMatrix"); 82 debug("Test CSSMatrix");
85 shouldBeEqualToString("circle.style.webkitTransform", "scale(2, 2) translate(1 0px, 10px)"); 83 shouldBeEqualToString("circle.style.webkitTransform", "scale(2, 2) translate(1 0px, 10px)");
86 shouldBeEqualToString("dumpMatrix(new WebKitCSSMatrix(circle.style.webkitTrans form))", "[2.0 0.0 0.0 2.0 20.0 20.0]"); 84 shouldBeEqualToString("dumpMatrix(new WebKitCSSMatrix(circle.style.webkitTrans form))", "[2.0 0.0 0.0 2.0 20.0 20.0]");
87 shouldBeEqualToString("rect.style.webkitTransform", "translate(100px) rotate(4 5deg)"); 85 shouldBeEqualToString("rect.style.webkitTransform", "translate(100px) rotate(4 5deg)");
88 shouldBeEqualToString("dumpMatrix(new WebKitCSSMatrix(rect.style.webkitTransfo rm))", "[0.7 0.7 -0.7 0.7 100.0 0.0]"); 86 shouldBeEqualToString("dumpMatrix(new WebKitCSSMatrix(rect.style.webkitTransfo rm))", "[0.7 0.7 -0.7 0.7 100.0 0.0]");
89 87
90 debug(""); 88 debug("");
91 shouldBe("dumpMatrix(new WebKitCSSMatrix(circle.style.webkitTransform))", "dum pMatrix(circle.getCTM())"); 89 shouldBe("dumpMatrix(new WebKitCSSMatrix(circle.style.webkitTransform))", "dum pMatrix(circle.getCTM())");
92 shouldBe("dumpMatrix(new WebKitCSSMatrix(rect.style.webkitTransform))", "dumpM atrix(rect.getCTM())"); 90 shouldBe("dumpMatrix(new WebKitCSSMatrix(rect.style.webkitTransform))", "dumpM atrix(rect.getCTM())");
93 91
94 debug(""); 92 debug("");
95 successfullyParsed = true; 93 successfullyParsed = true;
96 ]]> 94 ]]>
97 </script> 95 </script>
98 </body> 96 </body>
99 </html> 97 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698