OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <style> | |
3 ::-webkit-scrollbar { | |
4 width: 0px; | |
5 height: 0px; | |
6 } | |
7 | |
8 body, html { | |
9 width: 100%; | |
10 height: 100%; | |
11 background-color: blue; | |
12 } | |
13 | |
14 body { | |
15 margin: 0px; | |
16 } | |
17 | |
18 iframe { | |
19 width: 100vw; | |
20 height: 100vh; | |
21 left: -50px; | |
22 top: -50px; | |
23 position: absolute; | |
24 border: 0; | |
25 } | |
26 | |
27 .clipBox { | |
28 position: absolute; | |
29 overflow: hidden; | |
30 left: 50px; | |
31 right: 50px; | |
32 top: 50px; | |
33 bottom: 50px; | |
34 } | |
35 | |
36 .compositedClipBox { | |
37 position: absolute; | |
38 overflow: hidden; | |
39 left: 50px; | |
40 right: 50px; | |
41 top: 50px; | |
42 bottom: 50px; | |
43 background-color: red; | |
44 transform: translateZ(0); | |
45 } | |
46 | |
47 #scroller { | |
48 position: absolute; | |
49 left: -100px; | |
50 right: -100px; | |
51 top: -100px; | |
52 bottom: -100px; | |
53 background-color: yellow; | |
54 overflow: auto; | |
55 transform: translateZ(0); | |
56 } | |
57 | |
58 .spacer { | |
59 height: 1000px; | |
60 } | |
61 </style> | |
62 | |
63 <script> | |
64 // This test passed if the output contains a yellow box in a red box in a | |
65 // blue box. We expect that the "clipBox" boxes in this document will have | |
66 // their clipping layers restored once the root scroller is reset. | |
67 if (window.testRunner) { | |
68 testRunner.dumpAsTextWithPixelResults(); | |
69 testRunner.waitUntilDone(); | |
70 } | |
71 | |
72 window.addEventListener('load', function() { | |
73 document.rootScroller = document.getElementById('scroller'); | |
74 | |
75 window.requestAnimationFrame(function() { | |
76 document.rootScroller = null; | |
77 testRunner.notifyDone(); | |
78 }); | |
79 }); | |
80 </script> | |
81 | |
82 <div class="compositedClipBox"> | |
83 <div class="clipBox"> | |
84 <div id="scroller"> | |
85 <div class="spacer"></div> | |
86 </div> | |
87 </div> | |
88 </div> | |
OLD | NEW |