| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <style> |
| body { |
| height: 5000px; |
| margin: 0; |
| } |
| .fixed { |
| position: fixed; |
| left: 100px; |
| top: 100px; |
| width: 200px; |
| height: 100px; |
| background-color: green; |
| } |
| |
| .forcer { |
| position: absolute; |
| top: 3100px; |
| left: 100px; |
| height: 100px; |
| width: 100px; |
| background-color: red; |
| -webkit-transform: translateZ(0); |
| } |
| |
| .child { |
| position: absolute; |
| left: -9000px; |
| top: -9000px; |
| height: 10px; |
| width: 10px; |
| background-color: red; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function doTest() |
| { |
| window.scrollTo(0, 3000); |
| // Force layout, which updates the fixed layer bounds. |
| document.getElementById('layers').innerText = ''; |
| if (window.testRunner) { |
| document.getElementById('layers').innerText = window.internals.layerTreeAsText(document); |
| testRunner.notifyDone(); |
| } |
| } |
| |
| window.addEventListener('load', doTest, false); |
| </script> |
| </head> |
| |
| <body> |
| <div class="forcer"></div> |
| |
| <div class="fixed"> |
| <div class="child"></div> |
| </div> |
| |
| <pre id="layers">Layer tree goes here in DRT</pre> |
| </body> |
| </html> |
| |