Compute accurate regions for touch-action
[WebKit-https.git] / LayoutTests / compositing / parent-clipping-layer-on-subpixel-position.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>This tests that when the parent container enforces clipping and it is on a subpixel position, we snap child content properly.</title>
5 <style>
6         .container {
7                 width: 15px;
8                 height: 15px;
9                 position: absolute;
10                 overflow: hidden;
11         }
12
13         .inner {
14                 width: 10px;
15                 height: 10px;
16                 border: 1px solid red;
17                 -webkit-transform: translateZ(0);
18         }
19 </style>
20 </head>
21 <body>
22 </div>
23 <script>
24         var body = document.body;
25         var x = 0;
26         var y = 0;
27         for (i = 0; i < 20; ++i) {
28             y = 0;
29                 for (j = 0; j < 20; ++j) {
30                         var container = document.createElement("div");
31                         container.style.top = 15 * i + y + "px";
32                         container.style.left = 15 * j + x + "px";
33                         container.className = "container";
34                         body.appendChild(container);
35
36                         var inner = document.createElement("div");
37                         inner.className = "inner";
38                         container.appendChild(inner);
39                         y += 0.1;
40                 }
41                 x += 0.1;
42         }
43 </script>
44 </body>
45 </html>