OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <!-- |
| 3 This test ensures that reflected overlay scrollbars still render correctly |
| 4 when reflected. |
| 5 --> |
2 <style> | 6 <style> |
3 #container { | 7 #container { |
4 -webkit-box-reflect: below; | 8 -webkit-box-reflect: below; |
5 } | 9 } |
6 | 10 |
7 #clipper { | 11 #clipper { |
8 overflow: hidden; | 12 overflow: hidden; |
9 width: 110px; | 13 width: 95px; |
10 height: 100px; | 14 height: 100px; |
11 margin: 10px; | 15 margin: 10px; |
12 } | 16 } |
13 | 17 |
14 #scroller { | 18 #scroller { |
15 width: 100px; | 19 width: 100px; |
16 height: 100px; | 20 height: 100px; |
17 border: 1px solid black; | 21 border: 1px solid black; |
18 overflow: auto; | 22 overflow: auto; |
19 } | 23 } |
20 | 24 |
21 | 25 |
22 #fixed { | 26 #fixed { |
23 width: 10px; | 27 width: 10px; |
24 height: 10px; | 28 height: 10px; |
25 position: fixed; | 29 position: fixed; |
26 left: 200px; | 30 left: 200px; |
27 background: blue; | 31 background: blue; |
| 32 /* Without this, when _not_ composited, the reflected scrollbar disappears.
See crbug.com/396775 */ |
| 33 -webkit-transform: translateZ(0); |
28 } | 34 } |
29 | 35 |
30 #scrolled { | 36 #scrolled { |
31 width: 100px; | 37 width: 100px; |
32 height: 300px; | 38 height: 300px; |
33 background: green; | 39 background: green; |
34 } | 40 } |
35 </style> | 41 </style> |
36 <script> | 42 <script> |
37 if (window.internals) { | 43 if (window.internals) { |
38 window.internals.settings.setOverlayScrollbarsEnabled(true); | 44 window.internals.settings.setOverlayScrollbarsEnabled(true); |
39 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(
true); | 45 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(
true); |
40 } | 46 } |
41 | 47 |
42 if (window.testRunner) | 48 if (window.testRunner) |
43 window.testRunner.dumpAsTextWithPixelResults(); | 49 window.testRunner.dumpAsTextWithPixelResults(); |
44 | 50 |
45 onload = function() { | 51 onload = function() { |
46 if (window.internals && window.testRunner) | 52 if (window.internals && window.testRunner) |
47 window.testRunner.setCustomTextOutput(window.internals.layerTreeAsText(d
ocument)); | 53 window.testRunner.setCustomTextOutput(window.internals.layerTreeAsText(d
ocument)); |
48 }; | 54 }; |
49 </script> | 55 </script> |
50 <div id="container"> | 56 <div id="container"> |
51 <div id="clipper"> | 57 <div id="clipper"> |
52 <div id="scroller"> | 58 <div id="scroller"> |
53 <div id="fixed"></div> | 59 <div id="fixed"></div> |
54 <div id="scrolled"></div> | 60 <div id="scrolled"></div> |
| 61 </div> |
55 </div> | 62 </div> |
56 </div> | |
57 </div> | 63 </div> |
OLD | NEW |