blob: 792255b1eb9c71e73f7e806666808cb895e3766a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
.subpixelPusher {
position: relative;
top: 0.4px;
}
.container {
display: inline-block;
}
</style>
<script src="../../resources/run-after-layout-and-paint.js" type="text/javascript"></script>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsTextWithPixelResults();
internals.settings.setMockScrollbarsEnabled(true);
}
function setupIframes() {
setupIframe(document.getElementById('iframe1').contentWindow.document);
setupIframe(document.getElementById('iframe2').contentWindow.document);
document.getElementById('iframe1').contentWindow.scrollTo(0, 10);
}
function setupIframe(iframe) {
iframe.open('text/html', 'replace');
iframe.write("<!DOCTYPE html>\n<html><body style=\"background-color: silver;height: 1000px;\"></body>");
iframe.close();
}
function repaintTest() {
document.getElementById('iframe1').contentWindow.scrollTo(0, 0);
document.getElementById('iframe2').contentWindow.scrollTo(0, 10);
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="setupIframes();runAfterLayoutAndPaint(repaintTest);">
<p>The iframes below should remain grey with no repaint artifacts when scrolling.</p>
<div>
<div class="container">
<div class="subpixelPusher">
<div class="subpixelPusher">
<iframe id="iframe1" style="width: 150px; height: 200px;"></iframe>
</div>
</div>
</div>
<div class="container">
<div class="subpixelPusher">
<div class="subpixelPusher">
<iframe id="iframe2" style="width: 150px; height: 200px;"></iframe>
</div>
</div>
</div>
</div>
</body>
</html>