blob: a908aaf9e3097ef9c53f1fd80ec102dc29c420d3 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<title>Tests repaints of shared backing when the sharing layers change</title>
<style>
.scrollable {
overflow-y: scroll;
height: 300px;
width: 300px;
margin: 10px;
border: 1px solid black;
}
.box.sharing {
background-color: blue;
}
.box {
position: relative;
top: 50px;
left: 50px;
width: 180px;
height: 180px;
background-color: green;
}
.spacer {
height: 500px;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', () => {
let scroller = document.querySelector('.scrollable');
requestAnimationFrame(() => {
scroller.scrollTop = 250;
requestAnimationFrame(() => {
scroller.scrollTop = 0;
if (window.testRunner)
testRunner.notifyDone();
});
});
}, false);
</script>
</head>
<body>
<div class="scrollable">
<div class="sharing box">
<div class="inner box"></div>
</div>
<div class="spacer"></div>
</div>
</body>
</html>