OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <style> | 5 <style> |
6 .fixed { | 6 .fixed { |
7 position: fixed; | 7 position: fixed; |
8 width: 50px; | 8 width: 50px; |
9 height: 50px; | 9 height: 50px; |
10 top: 10px; | 10 top: 10px; |
11 left: 10px; | 11 left: 10px; |
12 z-index: -1; | 12 z-index: -1; |
13 } | 13 } |
14 </style> | 14 </style> |
15 | 15 |
16 <script type="text/javascript"> | 16 <script type="text/javascript"> |
17 if (window.internals) | 17 if (window.internals) |
18 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(t
rue); | 18 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
19 | 19 |
20 if (window.testRunner) { | 20 if (window.testRunner) { |
21 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
22 | 22 |
23 window.addEventListener("load", function() { | 23 window.addEventListener("load", function() { |
24 document.getElementById("mainThreadScrollingReasons").innerText = window.i
nternals.mainThreadScrollingReasons(document); | 24 document.getElementById("mainThreadScrollingReasons").innerText = window.i
nternals.mainThreadScrollingReasons(document); |
25 }, false); | 25 }, false); |
26 } | 26 } |
27 </script> | 27 </script> |
28 </head> | 28 </head> |
29 | 29 |
30 <body> | 30 <body> |
31 <div style="height: 1000px"> | 31 <div style="height: 1000px"> |
32 Main thread scrolling reasons should be blank: | 32 Main thread scrolling reasons should be blank: |
33 <pre id="mainThreadScrollingReasons"></pre> | 33 <pre id="mainThreadScrollingReasons"></pre> |
34 </div> | 34 </div> |
35 <div class="fixed"></div> | 35 <div class="fixed"></div> |
36 </body> | 36 </body> |
37 </html> | 37 </html> |
OLD | NEW |