blob: ec29c584487f10c5785f15b7e91f0b4022d2186e [file] [log] [blame]
<!DOCTYPE html>
<style>
.scroller {
overflow: scroll;
width: 400px;
height: 400px;
will-change: transform;
}
.spacer {
height: 2000px;
}
.prepadding {
height: 101.9px;
width: 100%;
}
.sticky {
position: sticky;
width: 100%;
height: 100px;
background: green;
top: 0;
}
</style>
<div id='scroller' class='scroller'>
<div class='prepadding'></div>
<div class='sticky'></div>
<div class='spacer'></div>
</div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function finishTest() {
scroller.scrollTop = 150;
if (window.testRunner)
testRunner.notifyDone();
}
window.addEventListener('load', function() {
requestAnimationFrame(function() {
requestAnimationFrame(finishTest);
});
});
</script>