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

Side by Side Diff: LayoutTests/transforms/2d/set-transform-and-top.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 .box { 4 .box {
5 width: 100px; 5 width: 100px;
6 height: 100px; 6 height: 100px;
7 background-color: red; 7 background-color: red;
8 position: absolute; 8 position: absolute;
9 top: 60px; 9 top: 60px;
10 left: 40px; 10 left: 40px;
11 } 11 }
12 </style> 12 </style>
13 <script type="text/javascript"> 13 <script type="text/javascript">
14 14
15 function checkPosition(id) { 15 function checkPosition(id) {
16 var element = document.getElementById(id); 16 var element = document.getElementById(id);
17 var y = webkitConvertPointFromNodeToPage(element, new WebKitPoint(0,0)).y; 17 var y = element.getBoundingClientRect().top;
18 18
19 var resultString = ''; 19 var resultString = '';
20 if (y > 250) { 20 if (y > 250) {
21 resultString += "PASS - Element " + id + " moved past y=250px"; 21 resultString += "PASS - Element " + id + " moved past y=250px";
22 } else { 22 } else {
23 resultString += "FAIL - Element " + id + " still at y=" + y + "px"; 23 resultString += "FAIL - Element " + id + " still at y=" + y + "px";
24 } 24 }
25 25
26 var div = document.createElement("div"); 26 var div = document.createElement("div");
27 div.appendChild(document.createTextNode(resultString)); 27 div.appendChild(document.createTextNode(resultString));
(...skipping 25 matching lines...) Expand all
53 function move() { 53 function move() {
54 document.getElementById('a').style.top = "300px"; 54 document.getElementById('a').style.top = "300px";
55 document.getElementById('a').style.webkitTransform = "rotate(45deg)"; 55 document.getElementById('a').style.webkitTransform = "rotate(45deg)";
56 document.getElementById('b').style.top = "300px"; 56 document.getElementById('b').style.top = "300px";
57 document.getElementById('b').style.webkitTransform = "rotate(90deg)"; 57 document.getElementById('b').style.webkitTransform = "rotate(90deg)";
58 setTimeout(runTest, 0); 58 setTimeout(runTest, 0);
59 } 59 }
60 </script> 60 </script>
61 </body> 61 </body>
62 </html> 62 </html>
OLDNEW
« no previous file with comments | « LayoutTests/transforms/2d/cssmatrix-2d-zoom.html ('k') | LayoutTests/transforms/3d/general/cssmatrix-3d-zoom.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698