| <!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] --> |
| <html> |
| <head> |
| <style> |
| .scroller { |
| margin: 20px; |
| width: 300px; |
| height: 300px; |
| overflow: auto; |
| border: 2px solid black; |
| opacity: 0.8; |
| } |
| |
| .absolute { |
| position: absolute; |
| width: 100px; |
| height: 100px; |
| top: 100px; |
| left: 50px; |
| padding: 20px; |
| background-color: silver; |
| } |
| |
| .clipping { |
| overflow: hidden; |
| } |
| |
| .inner { |
| top: 50px; |
| width: 100px; |
| height: 100px; |
| background-color: blue; |
| } |
| |
| .spacer { |
| height: 500px; |
| background-image: repeating-linear-gradient(white, silver 200px); |
| } |
| </style> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| window.addEventListener('load', () => { |
| if (window.internals) |
| document.getElementById('layers').textContent = internals.layerTreeAsText(document); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div class="scroller"> |
| <div class="clipping absolute"> |
| <div class="inner absolute"></div> |
| </div> |
| <div class="spacer"></div> |
| </div> |
| <pre id="layers"></pre> |
| </body> |
| </html> |
| |