OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <!-- | 3 <!-- |
4 This test checks that accelerated scrolling layers can be scrolled without | 4 This test checks that accelerated scrolling layers can be scrolled without |
5 repainting their contents. See https://bugs.webkit.org/show_bug.cgi?id=96087. | 5 repainting their contents. See https://bugs.webkit.org/show_bug.cgi?id=96087. |
6 --> | 6 --> |
7 | 7 |
8 <html> | 8 <html> |
9 <head> | 9 <head> |
10 <style type="text/css"> | 10 <style type="text/css"> |
(...skipping 12 matching lines...) Expand all Loading... |
23 </style> | 23 </style> |
24 <script type="text/javascript"> | 24 <script type="text/javascript"> |
25 if (window.internals) | 25 if (window.internals) |
26 window.internals.settings.setAcceleratedCompositingForOverflowScrollEn
abled(true); | 26 window.internals.settings.setAcceleratedCompositingForOverflowScrollEn
abled(true); |
27 | 27 |
28 window.addEventListener('load', function() { | 28 window.addEventListener('load', function() { |
29 if (!window.testRunner || !window.internals) { | 29 if (!window.testRunner || !window.internals) { |
30 alert('This test requires testRunner to run!'); | 30 alert('This test requires testRunner to run!'); |
31 return; | 31 return; |
32 } | 32 } |
33 testRunner.dumpAsText(false); | 33 testRunner.dumpAsText(); |
34 | 34 |
35 // First paint the entire view including the scrolling element. | 35 // First paint the entire view including the scrolling element. |
36 var scroller = document.getElementById('scroller'); | 36 var scroller = document.getElementById('scroller'); |
37 scroller.offsetTop; | 37 scroller.offsetTop; |
38 | 38 |
39 // Scroll down. This should not cause any more repaints to the | 39 // Scroll down. This should not cause any more repaints to the |
40 // scrolling contents. | 40 // scrolling contents. |
41 window.internals.startTrackingRepaints(document); | 41 window.internals.startTrackingRepaints(document); |
42 scroller.scrollTop = 25; | 42 scroller.scrollTop = 25; |
43 | 43 |
44 var layerTree = document.getElementById('layerTree'); | 44 var layerTree = document.getElementById('layerTree'); |
45 layerTree.innerText = | 45 layerTree.innerText = |
46 window.internals.layerTreeAsText(document, internals.LAYER_TREE_IN
CLUDES_REPAINT_RECTS); | 46 window.internals.layerTreeAsText(document, internals.LAYER_TREE_IN
CLUDES_REPAINT_RECTS); |
47 window.internals.stopTrackingRepaints(document); | 47 window.internals.stopTrackingRepaints(document); |
48 }); | 48 }); |
49 </script> | 49 </script> |
50 </head> | 50 </head> |
51 <body> | 51 <body> |
52 <div id="scroller"> | 52 <div id="scroller"> |
53 <div id="content"></div> | 53 <div id="content"></div> |
54 </div> | 54 </div> |
55 <pre id="layerTree">This text will be replaced with the layer tree.</pre> | 55 <pre id="layerTree">This text will be replaced with the layer tree.</pre> |
56 </body> | 56 </body> |
57 </html> | 57 </html> |
OLD | NEW |