When page scaling is in use position:fixed has incorrect results
[WebKit-https.git] / LayoutTests / fast / repaint / fixed-right-in-page-scale.html
1 <html>
2 <head>
3     <style>
4         ::-webkit-scrollbar {
5             width: 0px;
6             height: 0px;
7         }
8     </style>
9     <script>
10       window.enablePixelTesting = true;
11       if (window.internals)
12           window.internals.setShouldLayoutFixedElementsRelativeToFrame(document, true);
13
14       function scroll() {
15           window.scrollTo(100,100);
16       }
17
18       function scaleWithEventSender() {
19           var scaleFactor = 2.0;
20           var scaleOffset = 0;
21           if (window.eventSender) {
22              eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
23           }
24       }
25
26       function test() {
27           scaleWithEventSender();
28           scroll();
29       }
30     </script>
31     <script src="../js/resources/js-test-pre.js"></script>
32 </head>
33 <body style="height:2000px; width: 2000px; margin:0px;" onload="test();">
34     <div style="position: fixed; top: -100px; right: 100px; z-index: 1">
35         <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
36         <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
37
38         <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background:black;"></div>
39         <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
40     </div>
41     <div style="position: absolute; width:300px; height:300px; top: 0px; left: 300px" id="grid">
42         <div style="float:left; width:100px; height:100px; background:yellow;"></div>
43         <div style="float:left; width:100px; height:100px; background:green;"></div>
44         <div style="float:left; width:100px; height:100px; background:blue;"></div>
45
46         <div style="float:left; width:100px; height:100px; background: green;"></div>
47         <div style="float:left; width:100px; height:100px; background:blue;"></div>
48         <div style="float:left; width:100px; height:100px; background:yellow;"></div>
49
50         <div style="float:left; width:100px; height:100px; background:blue;"></div>
51         <div style="float:left; width:100px; height:100px; background:yellow;"></div>
52         <div style="float:left; width:100px; height:100px; background:green;"></div>
53     </div>
54     <div id="console"></div>
55 </body>
56 </html>