| <!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] --> |
| <html> |
| <head> |
| <style> |
| .scroller { |
| position: absolute; |
| z-index: 0; |
| margin: 20px; |
| width: 300px; |
| height: 300px; |
| border: 1px solid black; |
| overflow: hidden; |
| } |
| .scroller.scrollable { |
| overflow-y: scroll; |
| } |
| .contents { |
| height: 2000px; |
| } |
| .negative { |
| position: absolute; |
| top: 0; |
| left: 0; |
| z-index: -1; |
| padding: 20px; |
| background-color: gray; |
| } |
| .box { |
| width: 200px; |
| height: 200px; |
| } |
| .composited { |
| width: 20px; |
| height: 20px; |
| transform: translateZ(0); |
| background-color: silver; |
| } |
| </style> |
| <script> |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| window.addEventListener('load', () => { |
| setTimeout(() => { |
| document.getElementById('target').classList.add('scrollable'); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div id="target" class="scroller"> |
| <div class="negative"></div> |
| <div class="contents"> |
| <div class="composited box"></div> |
| <div class="box" style="background-color: green"></div> |
| </div> |
| </div> |
| </body> |
| </html> |