Move platform/mac-wk2/tiled-drawing to tiled-drawing/
[WebKit-https.git] / LayoutTests / tiled-drawing / fixed-background-scroll-repaint.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5     <style>
6         body {
7             height: 2000px;
8         }
9            #test {
10                height: 200px;
11                width: 250px;
12                border: 1px solid black;
13                background-image: linear-gradient(blue, green);
14                background-size: 100% 300px;
15            background-attachment: fixed;
16            }
17     </style>
18     <script>
19         if (window.testRunner) {
20             testRunner.dumpAsText();
21             testRunner.waitUntilDone();
22         }
23
24         function documentLoaded()
25         {
26             // Timeout is required to allow layers to paint before the scroll.
27             window.setTimeout(doTest, 0);
28         }
29         
30         function doTest()
31         {
32             if (window.internals)
33                 window.internals.startTrackingRepaints();
34
35             window.scrollTo(0, 100);
36
37             if (window.internals)
38                 document.getElementById('repaintRects').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
39             
40             if (window.testRunner)
41                 testRunner.notifyDone();
42         }
43                 
44         window.addEventListener('load', documentLoaded, false);
45     </script>
46 </head>
47 <body>
48
49 <p>We should only repaint the bounds of the element with a fixed background.</p>
50 <div id="test"></div>
51 <pre id="repaintRects"></pre>
52
53 </body>
54 </html>