OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style type="text/css" media="screen"> | 2 <style type="text/css" media="screen"> |
3 .container { | 3 .container { |
4 display: inline-block; | 4 display: inline-block; |
5 width: 200px; | 5 width: 200px; |
6 height: 200px; | 6 height: 200px; |
7 overflow: hidden; | 7 overflow: hidden; |
8 margin: 10px; | 8 margin: 10px; |
9 border: 1px solid black; | 9 border: 1px solid black; |
10 } | 10 } |
11 | 11 |
12 .inner { | 12 .inner { |
13 width: 100%; | 13 width: 100%; |
14 height: 1000px; | 14 height: 1000px; |
15 background-color: blue; | 15 background-color: blue; |
16 } | 16 } |
17 | 17 |
18 .compositing { | 18 .compositing { |
19 position: absolute; | 19 position: absolute; |
20 top: 20px; | 20 top: 20px; |
21 left: 20px; | 21 left: 20px; |
22 width: 100px; | 22 width: 100px; |
23 height: 100px; | 23 height: 100px; |
24 -webkit-transform: translateZ(0); | 24 transform: translateZ(0); |
25 } | 25 } |
26 </style> | 26 </style> |
27 <script type="text/javascript" charset="utf-8"> | 27 <script type="text/javascript" charset="utf-8"> |
28 if (window.internals) | 28 if (window.internals) |
29 window.internals.settings.setLayerSquashingEnabled(true); | 29 window.internals.settings.setLayerSquashingEnabled(true); |
30 </script> | 30 </script> |
31 <!-- Go into compositing. --> | 31 <!-- Go into compositing. --> |
32 <div class="compositing"></div> | 32 <div class="compositing"></div> |
33 | 33 |
34 <!-- Test repainting when the graphicsLayer offsetFromRenderer changes --> | 34 <!-- Test repainting when the graphicsLayer offsetFromRenderer changes --> |
35 <!-- You should see one green square, and no red --> | 35 <!-- You should see one green square, and no red --> |
36 <div class="container" style="position: relative;"> | 36 <div class="container" style="position: relative;"> |
37 <div class="inner" style="position: relative;"> | 37 <div class="inner" style="position: relative;"> |
38 </div> | 38 </div> |
39 </div> | 39 </div> |
OLD | NEW |