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"> |
11 #scroller { | 11 #scroller { |
12 overflow: scroll; | 12 overflow: scroll; |
13 -webkit-overflow-scrolling: touch; | 13 -webkit-overflow-scrolling: touch; |
14 width: 200px; | 14 width: 200px; |
15 height: 200px; | 15 height: 200px; |
16 border: solid thin blue; | 16 border: solid thin blue; |
17 } | 17 } |
18 | 18 |
19 #content { | 19 #content { |
20 height: 1000px; | 20 height: 1000px; |
21 margin-top: 25px; | 21 margin-top: 25px; |
22 } | 22 } |
23 </style> | 23 </style> |
24 <script type="text/javascript"> | 24 <script type="text/javascript"> |
| 25 if (window.internals) |
| 26 window.internals.settings.setAcceleratedCompositingForOverflowScrollEn
abled(true); |
| 27 |
25 window.addEventListener('load', function() { | 28 window.addEventListener('load', function() { |
26 if (!window.testRunner || !window.internals) { | 29 if (!window.testRunner || !window.internals) { |
27 alert('This test requires testRunner to run!'); | 30 alert('This test requires testRunner to run!'); |
28 return; | 31 return; |
29 } | 32 } |
30 testRunner.dumpAsText(false); | 33 testRunner.dumpAsText(false); |
31 | 34 |
32 // First paint the entire view including the scrolling element. | 35 // First paint the entire view including the scrolling element. |
33 var scroller = document.getElementById('scroller'); | 36 var scroller = document.getElementById('scroller'); |
34 scroller.offsetTop; | 37 scroller.offsetTop; |
(...skipping 10 matching lines...) Expand all Loading... |
45 }); | 48 }); |
46 </script> | 49 </script> |
47 </head> | 50 </head> |
48 <body> | 51 <body> |
49 <div id="scroller"> | 52 <div id="scroller"> |
50 <div id="content"></div> | 53 <div id="content"></div> |
51 </div> | 54 </div> |
52 <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> |
53 </body> | 56 </body> |
54 </html> | 57 </html> |
OLD | NEW |