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

Side by Side Diff: LayoutTests/compositing/absolute-inside-out-of-view-fixed.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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 3
4 <head> 4 <head>
5 <script src="../resources/run-after-display.js"></script>
5 <style> 6 <style>
6 body { 7 body {
7 margin: 0; 8 margin: 0;
8 height: 2500px; 9 height: 2500px;
9 } 10 }
10 11
11 .box { 12 .box {
12 height: 100px; 13 height: 100px;
13 width: 100px; 14 width: 100px;
14 } 15 }
15 16
16 .fixed { 17 .fixed {
17 position: fixed; 18 position: fixed;
18 left: 0px; 19 left: 0px;
19 top: 0px; 20 top: 0px;
20 } 21 }
21 22
22 .wrapper { 23 .wrapper {
23 position: absolute; 24 position: absolute;
24 background-color: green; 25 background-color: green;
25 } 26 }
26 27
27 </style> 28 </style>
28 <script> 29 <script>
29 if (window.testRunner) { 30 if (window.testRunner) {
30 testRunner.waitUntilDone(); 31 testRunner.waitUntilDone();
31 testRunner.dumpAsText(); 32 testRunner.dumpAsText();
32 if (window.internals) { 33 }
33 window.internals.settings.setAcceleratedCompositingForFixedPositionE nabled(true); 34 if (window.internals) {
34 window.internals.settings.setFixedPositionCreatesStackingContext(tru e); 35 window.internals.settings.setAcceleratedCompositingForFixedPositionEna bled(true);
35 } 36 window.internals.settings.setFixedPositionCreatesStackingContext(true) ;
36 } 37 }
37 38
38 function doScroll() 39 function doScroll()
39 { 40 {
40 window.setTimeout(function() { 41 window.setTimeout(function() {
41 window.scrollTo(0, 200); 42 window.scrollTo(0, 200);
42 if (window.internals) { 43
43 document.getElementById('results').innerText = internals.layerTreeAs Text(document); 44 runAfterDisplay(function() {
44 testRunner.notifyDone(); 45 if (window.internals) {
45 } 46 document.getElementById('results').innerText = internals.layerTree AsText(document);
47 if (window.testRunner) {
48 testRunner.notifyDone();
49 }
50 }
51 });
46 }, 10); 52 }, 10);
47 } 53 }
48 54
49 window.addEventListener('load', doScroll, false); 55 window.addEventListener('load', doScroll, false);
50 </script> 56 </script>
51 </head> 57 </head>
52 <body> 58 <body>
53 <pre id="results"></pre> 59 <pre id="results"></pre>
54 <div class="fixed"> 60 <div class="fixed">
55 <div class="wrapper box"> 61 <div class="wrapper box">
56 </div> 62 </div>
57 </div> 63 </div>
58 </body> 64 </body>
59 </html> 65 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698