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