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

Side by Side Diff: LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html

Issue 428533003: Remove webkitConvertPointFromPageToNode() and webkitConvertPointFromNodeToPage() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 body { 4 body {
5 zoom: 1.2; 5 zoom: 1.2;
6 padding: 0; 6 padding: 0;
7 margin: 0; 7 margin: 0;
8 } 8 }
9 9
10 .box { 10 .box {
(...skipping 17 matching lines...) Expand all
28 <script type="text/javascript"> 28 <script type="text/javascript">
29 29
30 function runTest() { 30 function runTest() {
31 31
32 if (!window.testRunner) { 32 if (!window.testRunner) {
33 33
34 var id1 = "a"; 34 var id1 = "a";
35 var id2 = "b"; 35 var id2 = "b";
36 var element1 = document.getElementById(id1); 36 var element1 = document.getElementById(id1);
37 var element2 = document.getElementById(id2); 37 var element2 = document.getElementById(id2);
38 var x1 = webkitConvertPointFromNodeToPage(element1, new WebKitPoint(0,0) ).x; 38 var x1 = element1.getBoundingClientRect().left;
39 var y1 = webkitConvertPointFromNodeToPage(element1, new WebKitPoint(0,0) ).y; 39 var y1 = element1.getBoundingClientRect().top;
40 var x2 = webkitConvertPointFromNodeToPage(element2, new WebKitPoint(0,0) ).x; 40 var x2 = element2.getBoundingClientRect().left;
41 var y2 = webkitConvertPointFromNodeToPage(element2, new WebKitPoint(0,0) ).y; 41 var y2 = element2.getBoundingClientRect().top;
42 42
43 var resultString = ''; 43 var resultString = '';
44 if (x1 == x2 && y1 == y2) { 44 if (x1 == x2 && y1 == y2) {
45 resultString += "PASS - Element " + id1 + " and Element " + id2 + " had identical positions"; 45 resultString += "PASS - Element " + id1 + " and Element " + id2 + " had identical positions";
46 } else { 46 } else {
47 resultString += "FAIL - Element " + id1 + " and Element " + id2 + " had different positions"; 47 resultString += "FAIL - Element " + id1 + " and Element " + id2 + " had different positions";
48 } 48 }
49 49
50 document.body.appendChild(document.createTextNode(resultString)); 50 document.body.appendChild(document.createTextNode(resultString));
51 } 51 }
52 } 52 }
53 </script> 53 </script>
54 </head> 54 </head>
55 <body onload="runTest();"> 55 <body onload="runTest();">
56 56
57 <!-- You should see green box only. If you see red, the test has failed --> 57 <!-- You should see green box only. If you see red, the test has failed -->
58 58
59 <div id='a' class="box translate"></div> 59 <div id='a' class="box translate"></div>
60 <div id='b' class="box matrix"></div> 60 <div id='b' class="box matrix"></div>
61 61
62 <script> 62 <script>
63 document.getElementById('b').style.webkitTransform = new WebKitCSSMatrix('ma trix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 50, 0, 1)'); 63 document.getElementById('b').style.webkitTransform = new WebKitCSSMatrix('ma trix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 50, 0, 1)');
64 </script> 64 </script>
65 </body> 65 </body>
66 </html> 66 </html>
OLDNEW
« no previous file with comments | « LayoutTests/transforms/2d/set-transform-and-top.html ('k') | LayoutTests/transforms/3d/general/matrix-with-zoom-3d.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698