OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 .fixed { | 5 .fixed { |
6 position: fixed; | 6 position: fixed; |
7 width: 10px; | 7 width: 10px; |
8 height: 10px; | 8 height: 10px; |
9 background-color: silver; | 9 background-color: silver; |
10 } | 10 } |
(...skipping 17 matching lines...) Expand all Loading... |
28 window.internals.setPageScaleFactor(1.5, 0, 0); | 28 window.internals.setPageScaleFactor(1.5, 0, 0); |
29 setTimeout(function() { | 29 setTimeout(function() { |
30 document.getElementById("layerTreeScaledUp").innerText = internals.lay
erTreeAsText(document); | 30 document.getElementById("layerTreeScaledUp").innerText = internals.lay
erTreeAsText(document); |
31 testRunner.notifyDone(); | 31 testRunner.notifyDone(); |
32 }, 0); | 32 }, 0); |
33 }, 0); | 33 }, 0); |
34 }, false); | 34 }, false); |
35 } | 35 } |
36 </script> | 36 </script> |
37 </head> | 37 </head> |
38 <body> | 38 |
| 39 <!-- Fixed position elements may skip compositing without a scrollable |
| 40 ancestor. To make sure this test covers the intended scenario, we force the |
| 41 body element to be tall, so that the FrameView is scrolling. --> |
| 42 <body style="height: 4000px;"> |
39 <div style="height: 1000px"> | 43 <div style="height: 1000px"> |
40 Not scaled: | 44 Not scaled: |
41 <pre id="layerTree"></pre> | 45 <pre id="layerTree"></pre> |
42 Scale=0.5: | 46 Scale=0.5: |
43 <pre id="layerTreeScaledDown"></pre> | 47 <pre id="layerTreeScaledDown"></pre> |
44 Scale=1.5: | 48 Scale=1.5: |
45 <pre id="layerTreeScaledUp"></pre> | 49 <pre id="layerTreeScaledUp"></pre> |
46 </div> | 50 </div> |
47 <!-- The layer tree should always be the same, regardless of page scale, except
on platforms that enable the applyPageScaleFactorInCompositor Setting. --> | 51 <!-- The layer tree should always be the same, regardless of page scale, except
on platforms that enable the applyPageScaleFactorInCompositor Setting. --> |
48 <!-- No layer in any case. --> | 52 <!-- No layer in any case. --> |
49 <div class="fixed" style="top: -100px"></div> | 53 <div class="fixed" style="top: -100px"></div> |
50 <!-- When applyPageScaleFactorInCompositor is true, this will have a composited
layer when scaled down; no layer when not scaled or scaled up. --> | 54 <!-- When applyPageScaleFactorInCompositor is true, this will have a composited
layer when scaled down; no layer when not scaled or scaled up. --> |
51 <div class="fixed"></div> | 55 <div class="fixed"></div> |
52 <div class="fixed" style="top: 0px; left: 1000px"></div> | 56 <div class="fixed" style="top: 0px; left: 1000px"></div> |
53 <!-- When applyPageScaleFactorInCompositor is true, this will have composited la
yer when not scaled and scaled down; no layer scaled up. --> | 57 <!-- When applyPageScaleFactorInCompositor is true, this will have composited la
yer when not scaled and scaled down; no layer scaled up. --> |
54 <div class="fixed" style="top: 0px; left: 600px"></div> | 58 <div class="fixed" style="top: 0px; left: 600px"></div> |
55 <!-- Always has composited layer. --> | 59 <!-- Always has composited layer. --> |
56 <div class="fixed" style="top: 0px; left: 0px"></div> | 60 <div class="fixed" style="top: 0px; left: 0px"></div> |
57 </body> | 61 </body> |
58 </html> | 62 </html> |
OLD | NEW |