Upstream version 11.40.277.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / gestures / gesture-tapHighlight-with-squashing.html
1 <!DOCTYPE html>
2 <style>
3   div {
4     border: black solid 1px;
5   }
6
7   .composited {
8     transform: translateZ(0);
9   }
10
11   .fixed {
12     position: fixed;
13     background-color: red;
14     width: 500px;
15     height: 500px;
16   }
17
18   .container {
19     overflow: scroll;
20     height: 200px;
21     background-color: gray;
22   }
23
24   .filler {
25     height: 800px;
26     width: 800px;
27     background-color: orange;
28   }
29
30   .squash-spacer {
31     position: relative;
32     top: 40px;
33   }
34
35   .target {
36     position: relative;
37     top: 80px;
38     height: 10px; width: 100%;
39   }
40 </style>
41
42 <script>
43   if (window.testRunner) {
44     testRunner.dumpAsTextWithPixelResults();
45     testRunner.waitUntilDone();
46   }
47
48   if (window.internals) {
49     window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
50     window.internals.settings.setLayerSquashingEnabled(true);
51   }
52
53   function runTest() {
54     var clientRect = document.getElementById('targetLink').getBoundingClientRect();
55     x = (clientRect.left + clientRect.right) / 2;
56     y = (clientRect.top + clientRect.bottom) / 2;
57
58     if (window.eventSender) {
59       eventSender.gestureShowPress(x, y);
60       window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
61     }
62   }
63
64   window.onload = runTest;
65 </script>
66 <div class='fixed composited'></div>
67 <div class='container'>
68   <div class='composited'></div>
69   <div class='squash-spacer'></div>
70   <div class='target'>
71     <a href='#' id='targetLink'>Target Link.</a>
72   </div>
73   <div class='filler'></div>
74 </div>