Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / sub-pixel / sub-pixel-iframe-copy-on-scroll.html
blob792255b1eb9c71e73f7e806666808cb895e3766a
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style type="text/css" media="screen">
5 .subpixelPusher {
6 position: relative;
7 top: 0.4px;
9 .container {
10 display: inline-block;
12 </style>
13 <script src="../../resources/run-after-layout-and-paint.js" type="text/javascript"></script>
14 <script>
15 if (window.testRunner) {
16 testRunner.waitUntilDone();
17 testRunner.dumpAsTextWithPixelResults();
18 internals.settings.setMockScrollbarsEnabled(true);
21 function setupIframes() {
22 setupIframe(document.getElementById('iframe1').contentWindow.document);
23 setupIframe(document.getElementById('iframe2').contentWindow.document);
24 document.getElementById('iframe1').contentWindow.scrollTo(0, 10);
27 function setupIframe(iframe) {
28 iframe.open('text/html', 'replace');
29 iframe.write("<!DOCTYPE html>\n<html><body style=\"background-color: silver;height: 1000px;\"></body>");
30 iframe.close();
33 function repaintTest() {
34 document.getElementById('iframe1').contentWindow.scrollTo(0, 0);
35 document.getElementById('iframe2').contentWindow.scrollTo(0, 10);
36 if (window.testRunner)
37 testRunner.notifyDone();
39 </script>
40 </head>
41 <body onload="setupIframes();runAfterLayoutAndPaint(repaintTest);">
42 <p>The iframes below should remain grey with no repaint artifacts when scrolling.</p>
43 <div>
44 <div class="container">
45 <div class="subpixelPusher">
46 <div class="subpixelPusher">
47 <iframe id="iframe1" style="width: 150px; height: 200px;"></iframe>
48 </div>
49 </div>
50 </div>
51 <div class="container">
52 <div class="subpixelPusher">
53 <div class="subpixelPusher">
54 <iframe id="iframe2" style="width: 150px; height: 200px;"></iframe>
55 </div>
56 </div>
57 </div>
58 </div>
59 </body>
60 </html>