4 <link rel=
"stylesheet" href=
"resources/compositor-touch-hit-rects.css">
9 border:
1px solid lightgrey;
13 border:
6px solid lightblue;
17 transform: translate3d(
10px,
10px,
0);
21 /* ensure it doesn't interfere with subsequent layer promotions */
28 This test verifies the hit test regions given to the compositor specifically around composited
29 overflow scroll elements.
33 <div id=
"scroll1" class=
"scroll">
34 <div style='height:
13px;'
></div>
35 <div class=
"testcase" id=
"scrollContent">Scroll content
</div>
36 <div style='height:
50px;'
></div>
38 <div id=
"scroll5" class=
"scroll">
40 <div style='height:
13px;'
></div>
41 <div class=
"testcase" id=
"scrollContent5">Scroll content
5</div>
42 <div id=
"scroll5spacer" style='height:
50px;'
></div>
45 <div id=
"scroll6" class=
"scroll">
47 <div style='height:
13px;'
></div>
48 <div class=
"testcase relative" id=
"scrollContent6">Scroll content
6</div>
49 <div id=
"scroll6spacer" style='height:
50px;'
></div>
52 <div id=
"scroll2" class=
"scroll">
53 <div style='height:
10px;'
></div>
54 <div id=
"scroll2b" class=
"scroll">
55 <div style='height:
30px;'
></div>
56 <div class=
"testcase" id=
"nestedContent">Nested content
</div>
57 <div style='height:
30px;'
></div>
59 <div style='height:
50px;'
></div>
61 <div id=
"scroll4" class=
"scroll">
62 <div style='height:
10px;'
></div>
63 <div id=
"overflowwithhandler" class=
"scroll testcase">
64 <div style='height:
30px;'
></div>
65 <div>overflow div with a touch handler
</div>
66 <div style='height:
60px;'
></div>
68 <div style='height:
50px;'
></div>
70 <div id=
"overflowwithborder" class=
"scroll testcase">
71 <div style='height:
30px;'
></div>
72 <div>overflow div with a touch handler and large border
</div>
73 <div style='height:
60px;'
></div>
75 <!-- Note this case needs to be last because the transform can disable
76 accelerated overflow scrolling of any following elements -->
77 <div id=
"scroll3" class=
"scroll">
78 <div style='height:
13px;'
></div>
79 <div class=
"testcase" id=
"withTransform">
80 <div id=
"transformed">Transformed
</div>
82 <div style='height:
50px;'
></div>
87 <div id=
"console"></div>
88 <script src=
"resources/compositor-touch-hit-rects.js"></script>
91 // Scroll after layout has finished.
92 preRunHandlerForTest
['scrollContent'] = function(e
) {
93 // Scroll so the rect is visible but slighly clipped.
94 document
.getElementById('scroll1').scrollTop
= 15;
97 preRunHandlerForTest
['scrollContent5'] = function(e
) {
98 document
.getElementById('scroll5').scrollTop
= 5;
99 // force layout after scroll position changed
100 document
.getElementById('scroll5spacer').style
.height
="60px";
103 preRunHandlerForTest
['scrollContent6'] = function(e
) {
104 document
.getElementById('scroll6').scrollTop
= 5;
105 // force layout after scroll position changed
106 document
.getElementById('scroll6spacer').style
.height
="60px";
109 preRunHandlerForTest
['nestedContent'] = function(e
) {
110 document
.getElementById('scroll2').scrollTop
= 20;
111 document
.getElementById('scroll2b').scrollTop
= 18;
114 preRunHandlerForTest
['withTransform'] = function(e
) {
115 document
.getElementById('scroll3').scrollTop
= 20;
118 preRunHandlerForTest
['overflowWithHandler'] = function(e
) {
119 document
.getElementById('scroll4').scrollTop
= 20;
120 document
.getElementById('overflowWithHandler').scrollTop
= 18;
123 preRunHandlerForTest
['overflowwithborder'] = function(e
) {
124 document
.getElementById('overflowwithborder').scrollTop
= 18;
127 if (window
.internals
) {
128 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(true);