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

Side by Side Diff: LayoutTests/fast/repaint/scroll-fixed-layer-with-reflection.html

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix layout tests Created 6 years, 9 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 <link rel="stylesheet" href="resources/default.css"></style> 3 <link rel="stylesheet" href="resources/default.css"></style>
4 <script src="../../resources/run-after-display.js"></script>
4 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip t> 5 <script src="resources/text-based-repaint.js" type="text/javascript"></scrip t>
5 <script type="text/javascript"> 6 <script type="text/javascript">
6 if (window.testRunner) 7 if (window.testRunner) {
8 testRunner.waitUntilDone();
7 testRunner.dumpAsTextWithPixelResults(); 9 testRunner.dumpAsTextWithPixelResults();
10 }
11
12 function scrollAndRepaint()
13 {
14 window.scrollTo(100, 180);
15 runAfterDisplay(function() {
16 runRepaintTest();
17 if (window.testRunner)
18 testRunner.notifyDone();
19 });
20 }
8 21
9 function repaintTest() 22 function repaintTest()
10 { 23 {
11 var moveMeElement = document.getElementById('moveMe'); 24 var moveMeElement = document.getElementById('moveMe');
12 moveMeElement.scrollTop = 250; 25 moveMeElement.scrollTop = 250;
13 moveMeElement.scrollLeft = 150; 26 moveMeElement.scrollLeft = 150;
14 } 27 }
15 </script> 28 </script>
16 </head> 29 </head>
17 <body style="height:2000px;" onload="runRepaintTest()"> 30 <body style="height:2000px;" onload="scrollAndRepaint()">
18 <!-- You should see 1 green rectangle rotated in the output and no red. --> 31 <!-- You should see 1 green rectangle rotated in the output and no red. -->
19 <div id="moveMe" style="top: 100px; left: 250px;" class="fixed clipped"> 32 <div id="moveMe" style="top: 100px; left: 250px;" class="fixed clipped">
20 <div class="absolute green reflected" style="height: 50px; top: 150px; l eft: 150px;"></div> 33 <div class="absolute green reflected" style="height: 50px; top: 150px; l eft: 150px;"></div>
21 <div class="absolute red" style="top: 0px; left: 0px; height: 250px; wid th: 150px;"></div> 34 <div class="absolute red" style="top: 0px; left: 0px; height: 250px; wid th: 150px;"></div>
22 </div> 35 </div>
23 <!-- Make sure we are scrolled --> 36 <!-- Make sure we are scrolled -->
24 <div style="top: 0px; left: 0px;" class="absolute red"></div> 37 <div style="top: 0px; left: 0px;" class="absolute red"></div>
25 <script>
26 window.scrollTo(100, 180);
27 </script>
28 </body> 38 </body>
29 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698