| 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 |
| 40 <!-- Fixed position elements may skip compositing without a scrollable |
| 41 ancestor. To make sure this test covers the intended scenario, we have to force |
| 42 something (like the FrameView) to be scrolling, i.e. make a tall body element. -
-> |
| 43 <body style="height: 4000px;"> |
| 39 <div style="height: 1000px"> | 44 <div style="height: 1000px"> |
| 40 Not scaled: | 45 Not scaled: |
| 41 <pre id="layerTree"></pre> | 46 <pre id="layerTree"></pre> |
| 42 Scale=0.5: | 47 Scale=0.5: |
| 43 <pre id="layerTreeScaledDown"></pre> | 48 <pre id="layerTreeScaledDown"></pre> |
| 44 Scale=1.5: | 49 Scale=1.5: |
| 45 <pre id="layerTreeScaledUp"></pre> | 50 <pre id="layerTreeScaledUp"></pre> |
| 46 </div> | 51 </div> |
| 47 <!-- The layer tree should always be the same, regardless of page scale, except
on platforms that enable the applyPageScaleFactorInCompositor Setting. --> | 52 <!-- 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. --> | 53 <!-- No layer in any case. --> |
| 49 <div class="fixed" style="top: -100px"></div> | 54 <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. --> | 55 <!-- 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> | 56 <div class="fixed"></div> |
| 52 <div class="fixed" style="top: 0px; left: 1000px"></div> | 57 <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. --> | 58 <!-- 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> | 59 <div class="fixed" style="top: 0px; left: 600px"></div> |
| 55 <!-- Always has composited layer. --> | 60 <!-- Always has composited layer. --> |
| 56 <div class="fixed" style="top: 0px; left: 0px"></div> | 61 <div class="fixed" style="top: 0px; left: 0px"></div> |
| 57 </body> | 62 </body> |
| 58 </html> | 63 </html> |
| OLD | NEW |