58 lines
1.6 KiB
HTML
58 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style type="text/css" media="screen">
|
|
.subpixelPusher {
|
|
position: relative;
|
|
top: 0.4px;
|
|
}
|
|
.container {
|
|
display: inline-block;
|
|
}
|
|
</style>
|
|
<script src="../repaint/resources/repaint.js" type="text/javascript"></script>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.waitUntilDone();
|
|
|
|
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();runRepaintTest()">
|
|
<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>
|