blob: 6ff79aec49320645957e7c8148e4634f778d46e5 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<style>
.scroller {
overflow: scroll;
width: 300px;
height: 300px;
border: 2px solid black;
}
.relative {
position: relative;
margin: 200px 20px 0 10px;
padding: 10px;
height: 100px;
border: 4px solid green;
background-color: silver;
}
.spacer {
height: 400px;
}
.scrollbar-hider {
position: absolute;
width: 16px;
height: 300px;
top: 10px;
left: calc(310px - 16px);
background-color: gray;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
setTimeout(() => {
document.getElementById('scroller').scrollTop = 200;
if (window.testRunner)
testRunner.notifyDone();
}, 0);
}, false);
</script>
</head>
<body>
<div id="scroller" class="scroller">
<div class="relative">
Relative foreground
</div>
<div class="spacer"></div>
</div>
</div>
<div class="scrollbar-hider"></div>
</body>
</html>