| OLD | NEW |
| 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) { |
| 35 window.internals.settings.setAcceleratedCompositingForFixedPositionEna
bled(true); |
| 34 } | 36 } |
| 35 | 37 |
| 36 function doScroll() | 38 function doScroll() |
| 37 { | 39 { |
| 38 window.setTimeout(function() { | 40 window.setTimeout(function() { |
| 39 window.scrollTo(0, 200); | 41 window.scrollTo(0, 200); |
| 40 if (window.internals) { | 42 |
| 41 document.getElementById('results').innerText = internals.layerTreeAs
Text(document); | 43 runAfterDisplay(function() { |
| 42 testRunner.notifyDone(); | 44 if (window.internals) { |
| 43 } | 45 document.getElementById('results').innerText = internals.layerTree
AsText(document); |
| 46 if (window.testRunner) { |
| 47 testRunner.notifyDone(); |
| 48 } |
| 49 } |
| 50 }); |
| 44 }, 10); | 51 }, 10); |
| 45 } | 52 } |
| 46 | 53 |
| 47 window.addEventListener('load', doScroll, false); | 54 window.addEventListener('load', doScroll, false); |
| 48 </script> | 55 </script> |
| 49 </head> | 56 </head> |
| 50 <body> | 57 <body> |
| 51 <pre id="results"></pre> | 58 <pre id="results"></pre> |
| 52 <div class="fixed"> | 59 <div class="fixed"> |
| 53 <div class="wrapper box"> | 60 <div class="wrapper box"> |
| 54 </div> | 61 </div> |
| 55 </div> | 62 </div> |
| 56 </body> | 63 </body> |
| 57 </html> | 64 </html> |
| OLD | NEW |