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

Side by Side Diff: LayoutTests/fast/overflow/setting-scrollTop-after-hide-show.html

Issue 10823356: Merge 123637 - https://bugs.webkit.org/show_bug.cgi?id=89114 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/overflow/setting-scrollTop-after-hide-show-expected.txt » ('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 <html> 2 <html>
3 <script> 3 <script>
4 if (window.layoutTestController) 4 if (window.layoutTestController)
5 layoutTestController.dumpAsText(); 5 layoutTestController.dumpAsText();
6 6
7 function log(message) 7 function log(message)
8 { 8 {
9 document.getElementById("console").appendChild(document.createTextNode( message + "\n")); 9 document.getElementById("console").appendChild(document.createTextNode( message + "\n"));
10 } 10 }
11 </script> 11 </script>
12 <body> 12 <body>
13 <p>In this test, we set a new scrollTop for a scrolling div, and then we mak e the div display:none. The test ensures that when we bring the div back by givi ng it a display value of block, that we also restore its scroll position. The te st also ensures that we are able to set a new scrollTop value of 0 after that.</ p> 13 <p>In this test, we set a new scrollTop for a scrolling div, and then we mak e the div display:none. The test ensures that when we bring the div back by givi ng it a display value of block, that we also restore its scroll position. The te st also ensures that we are able to set a new scrollTop value of 0 after that.</ p>
14 <div id="scroller" style="height: 20px; overflow: scroll;"> 14 <div id="scroller" style="height: 20px; overflow: scroll;">
15 <div style="height: 60px;"></div> 15 <div style="height: 60px;"></div>
16 </div> 16 </div>
17 <pre id="console"></pre> 17 <pre id="console"></pre>
18 <script> 18 <script>
19 a = document.getElementById('scroller'); 19 a = document.getElementById('scroller');
20 a.scrollTop = 20; 20 a.scrollTop = 20;
21 a.style.display = 'none'; 21 a.style.display = 'none';
22 a.scrollTop = 20; 22 a.scrollTop = 20;
23 a.style.display = 'block'; 23 a.style.display = 'block';
24 log('scrollTop after restoring div: ' + a.scrollTop + '\n'); 24 log('scrollTop after restoring div: ' + a.scrollTop + '\n');
25 a.scrollTop = 0; 25 a.scrollTop = 0;
26 log('scrollTop after setting scrollTop back to 0: ' + a.scrollTop + '\n'); 26 log('scrollTop after setting scrollTop back to 0: ' + a.scrollTop + '\n');
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/overflow/setting-scrollTop-after-hide-show-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698