| 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 z-index: 1; | 8 z-index: 1; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 background-color: lime; | 32 background-color: lime; |
| 33 } | 33 } |
| 34 | 34 |
| 35 .composited { | 35 .composited { |
| 36 -webkit-transform: translatez(0); | 36 -webkit-transform: translatez(0); |
| 37 } | 37 } |
| 38 </style> | 38 </style> |
| 39 | 39 |
| 40 <script type="text/javascript"> | 40 <script type="text/javascript"> |
| 41 if (window.internals) { | 41 if (window.internals) { |
| 42 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled
(true); | 42 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| 43 } | 43 } |
| 44 | 44 |
| 45 if (window.testRunner) { | 45 if (window.testRunner) { |
| 46 testRunner.dumpAsText(); | 46 testRunner.dumpAsText(); |
| 47 | 47 |
| 48 window.addEventListener("load", function() { | 48 window.addEventListener("load", function() { |
| 49 document.getElementById("layertree").innerText = window.internals.layerT
reeAsText(document); | 49 document.getElementById("layertree").innerText = window.internals.layerT
reeAsText(document); |
| 50 }, false); | 50 }, false); |
| 51 } | 51 } |
| 52 </script> | 52 </script> |
| 53 </head> | 53 </head> |
| 54 | 54 |
| 55 <body class="unscrollable"> | 55 <body class="unscrollable"> |
| 56 <div style="height: 4000px"> | 56 <div style="height: 4000px"> |
| 57 <pre id="layertree"></pre> | 57 <pre id="layertree"></pre> |
| 58 </div> | 58 </div> |
| 59 | 59 |
| 60 <!-- This should not be promoted to a composited layer, because the body is | 60 <!-- This should not be promoted to a composited layer, because the body is |
| 61 unscrollable and there is no need to composite the fixed-position layer. | 61 unscrollable and there is no need to composite the fixed-position layer. |
| 62 --> | 62 --> |
| 63 <div class="fixed lime box"></div> | 63 <div class="fixed lime box"></div> |
| 64 </body> | 64 </body> |
| 65 </html> | 65 </html> |
| 66 | 66 |
| OLD | NEW |