blob: bb859e5b3d90af802cacb3d4222dc77185849e4a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body {
height: 2000px;
}
#test {
height: 200px;
width: 250px;
border: 1px solid black;
background-image: linear-gradient(blue, green);
background-size: 100% 300px;
background-attachment: fixed;
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function documentLoaded()
{
// Timeout is required to allow layers to paint before the scroll.
window.setTimeout(doTest, 0);
}
function doTest()
{
if (window.internals)
window.internals.startTrackingRepaints();
window.scrollTo(0, 100);
if (window.internals)
document.getElementById('repaintRects').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
if (window.testRunner)
testRunner.notifyDone();
}
window.addEventListener('load', documentLoaded, false);
</script>
</head>
<body>
<p>We should only repaint the bounds of the element with a fixed background.</p>
<div id="test"></div>
<pre id="repaintRects"></pre>
</body>
</html>