| <!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] --> |
| <html> |
| <head> |
| <style> |
| .scroller { |
| position: relative; |
| width: 300px; |
| height: 300px; |
| margin: 30px; |
| overflow: scroll; |
| border: 15px solid gray; |
| box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); |
| } |
| |
| .filler { |
| width: 100px; |
| height: 250px; |
| background-color: silver; |
| } |
| |
| .box { |
| position: absolute; |
| width: 100%; |
| height: 100px; |
| background-color: white; |
| z-index: 2; |
| transform: translateZ(0); |
| } |
| |
| .outer.box { |
| top: 150px; |
| left: 140px; |
| width: 240px; |
| background-color: rgba(134, 123, 28, 0.75) |
| } |
| |
| .interleaved { |
| position: absolute; |
| top: 220px; |
| left: 250px; |
| width: 200px; |
| height: 200px; |
| background-color: rgba(80, 160, 80, 0.8); |
| z-index: 1; |
| transform: translateZ(0); |
| } |
| </style> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| if (window.internals) |
| internals.setUsesOverlayScrollbars(true); |
| |
| window.addEventListener('load', () => { |
| if (window.internals) |
| document.getElementById('layers').innerText = window.internals.layerTreeAsText(document); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div class="scroller"> |
| <div class="filler"></div> |
| <div class="box"></div> |
| <div class="filler"></div> |
| </div> |
| <div class="outer box"></div> |
| <div class="interleaved"></div> |
| <pre id="layers"></pre> |
| </body> |
| </html> |