| 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: 10px; | 8 width: 10px; |
| 9 height: 10px; | 9 height: 10px; |
| 10 background-color: silver; | 10 background-color: silver; |
| 11 } | 11 } |
| 12 </style> | 12 </style> |
| 13 | 13 |
| 14 <script type="text/javascript"> | 14 <script type="text/javascript"> |
| 15 if (window.internals) | 15 if (window.internals) |
| 16 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled
(true); | 16 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| 17 | 17 |
| 18 if (window.testRunner) { | 18 if (window.testRunner) { |
| 19 testRunner.dumpAsText(); | 19 testRunner.dumpAsText(); |
| 20 | 20 |
| 21 window.addEventListener("load", function() { | 21 window.addEventListener("load", function() { |
| 22 document.getElementById("layertree").innerText = window.internals.layerT
reeAsText(document); | 22 document.getElementById("layertree").innerText = window.internals.layerT
reeAsText(document); |
| 23 }, false); | 23 }, false); |
| 24 } | 24 } |
| 25 </script> | 25 </script> |
| 26 </head> | 26 </head> |
| 27 | 27 |
| 28 <body> | 28 <body> |
| 29 <div style="height: 1000px"> | 29 <div style="height: 1000px"> |
| 30 <pre id="layertree"></pre> | 30 <pre id="layertree"></pre> |
| 31 </div> | 31 </div> |
| 32 | 32 |
| 33 <!-- Neither of the following elements gets its own layer. --> | 33 <!-- Neither of the following elements gets its own layer. --> |
| 34 <div class="fixed" style="z-index: -1"></div> | 34 <div class="fixed" style="z-index: -1"></div> |
| 35 <div class="fixed" style="z-index: -1; top: -100px"></div> | 35 <div class="fixed" style="z-index: -1; top: -100px"></div> |
| 36 <div class="fixed" style="z-index: -1; top: 0px; left: 1000px"></div> | 36 <div class="fixed" style="z-index: -1; top: 0px; left: 1000px"></div> |
| 37 | 37 |
| 38 <!-- This element gets its own layer because it intersects with the viewport.
--> | 38 <!-- This element gets its own layer because it intersects with the viewport.
--> |
| 39 <div class="fixed" style="z-index: -1; top: 0px; left: 0px"></div> | 39 <div class="fixed" style="z-index: -1; top: 0px; left: 0px"></div> |
| 40 </body> | 40 </body> |
| 41 </html> | 41 </html> |
| 42 | 42 |
| OLD | NEW |