blob: ef324cdfa6de1208b192e4c7dade88c96ebeec15 [file] [log] [blame]
<!-- webkit-test-runner [ useThreadedScrolling=false ] -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Paint neg z-order descendants into the composited scrolling layer</title>
<style>
.scrollable {
overflow: scroll;
}
.scrolled {
position: relative;
z-index: -1;
}
#container {
position: absolute;
top: 10px;
left: 10px;
width: 200px;
height: 200px;
border: 1px black solid;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
window.testRunner.dumpAsText(true);
if (window.internals)
window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
function endTest()
{
var textarea = document.getElementById('container');
textarea.scrollTop = 40;
if (window.testRunner)
window.testRunner.notifyDone();
window.testRunner.displayAndTrackRepaints();
}
function doTest()
{
var textarea = document.getElementById('container');
textarea.focus();
textarea.selectionStart = textarea.selectionEnd = 0;
if (window.testRunner)
window.testRunner.displayAndTrackRepaints();
window.setTimeout(endTest, 100);
}
window.addEventListener('load', doTest, false);
if (window.testRunner)
testRunner.waitUntilDone();
</script>
</head>
<body>
<div class="scrollable" id="container">
<div class="scrolled">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="scrolled">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="scrolled">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
</body>
</html>