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

Side by Side Diff: LayoutTests/fast/css/zoom-body-scroll.html

Issue 25741004: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: set and get scrollTop/Left through documentElement and body should be symmetric, according to the d… Created 7 years, 2 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
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <body> 3 <body>
4 <div style="width: 1000px; height: 1000px; position: absolute; top: 0; left: 0;"></div> 4 <div style="width: 1000px; height: 1000px; position: absolute; top: 0; left: 0;"></div>
5 <div style="width: 100px; height: 100px; position: absolute; top: 100px; lef t: 0; background: green"></div> 5 <div style="width: 100px; height: 100px; position: absolute; top: 100px; lef t: 0; background: green"></div>
6 <p> 6 <p>
7 Test for <i><a href="rdar://problem/6643103">rdar://problem/6643103</a> 7 Test for <i><a href="rdar://problem/6643103">rdar://problem/6643103</a>
8 Unscaled values from body.scrollHeight</i>. 8 Unscaled values from body.scrollHeight</i>.
9 </p> 9 </p>
10 <pre id="console"></pre> 10 <pre id="console"></pre>
11 <script> 11 <script>
12 function log(message) 12 function log(message)
13 { 13 {
14 var console = document.getElementById("console"); 14 var console = document.getElementById("console");
15 console.appendChild(document.createTextNode(message + "\n")); 15 console.appendChild(document.createTextNode(message + "\n"));
16 } 16 }
17 17
18 if (window.testRunner) { 18 if (window.testRunner) {
19 testRunner.dumpAsText(); 19 testRunner.dumpAsText();
20 var body = document.body; 20 var body = document.body;
21 var documentElement = document.documentElement; 21 var documentElement = document.documentElement;
22 log("scrollHeight: " + body.scrollHeight); 22 log("scrollHeight: " + body.scrollHeight);
23 log("scrollWidth: " + body.scrollWidth); 23 log("scrollWidth: " + body.scrollWidth);
24 24
25 log("\nScrolling right to 50"); 25 log("\nScrolling right to 50");
26 body.scrollLeft = 50; 26 documentElement.scrollLeft = 50;
27 log("scrollLeft: " + documentElement.scrollLeft); 27 log("scrollLeft: " + documentElement.scrollLeft);
28 28
29 log("\nZooming in"); 29 log("\nZooming in");
30 eventSender.zoomPageIn(); 30 eventSender.zoomPageIn();
31 log("scrollHeight: " + body.scrollHeight); 31 log("scrollHeight: " + body.scrollHeight);
32 log("scrollWidth: " + body.scrollWidth); 32 log("scrollWidth: " + body.scrollWidth);
33 log("scrollTop: " + documentElement.scrollTop); 33 log("scrollTop: " + documentElement.scrollTop);
34 log("scrollLeft: " + documentElement.scrollLeft); 34 log("scrollLeft: " + documentElement.scrollLeft);
35 35
36 log("\nScrolling down to 100"); 36 log("\nScrolling down to 100");
37 body.scrollTop = 100; 37 documentElement.scrollTop = 100;
38 log("scrollTop: " + documentElement.scrollTop); 38 log("scrollTop: " + documentElement.scrollTop);
39 39
40 log("\nZooming back out"); 40 log("\nZooming back out");
41 eventSender.zoomPageOut(); 41 eventSender.zoomPageOut();
42 log("scrollTop: " + documentElement.scrollTop); 42 log("scrollTop: " + documentElement.scrollTop);
43 log("scrollLeft: " + documentElement.scrollLeft); 43 log("scrollLeft: " + documentElement.scrollLeft);
44 } 44 }
45 </script> 45 </script>
46 </body> 46 </body>
47 </html> 47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698