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 } |
11 </style> | 11 </style> |
12 <script> | 12 <script> |
13 if (window.testRunner) { | 13 if (window.testRunner) { |
14 testRunner.dumpAsText(); | 14 testRunner.dumpAsText(); |
15 testRunner.waitUntilDone(); | 15 testRunner.waitUntilDone(); |
16 } | 16 } |
17 if (window.internals) { | 17 if (window.internals && window.eventSender) { |
18 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(t
rue); | 18 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(t
rue); |
19 window.internals.settings.setFixedPositionCreatesStackingContext(true); | 19 window.internals.settings.setFixedPositionCreatesStackingContext(true); |
20 | 20 |
21 addEventListener("load", function() { | 21 addEventListener("load", function() { |
22 document.getElementById("layerTree").innerText = internals.layerTreeAsText
(document); | 22 document.getElementById("layerTree").innerText = internals.layerTreeAsText
(document); |
23 | 23 |
24 window.internals.setPageScaleFactor(0.5, 0, 0); | 24 window.eventSender.setPageScaleFactor(0.5, 0, 0); |
25 setTimeout(function() { | 25 setTimeout(function() { |
26 document.getElementById("layerTreeScaledDown").innerText = internals.lay
erTreeAsText(document); | 26 document.getElementById("layerTreeScaledDown").innerText = internals.lay
erTreeAsText(document); |
27 | 27 |
28 window.internals.setPageScaleFactor(1.5, 0, 0); | 28 window.eventSender.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 | 38 |
(...skipping 14 matching lines...) Expand all Loading... |
53 <div class="fixed" style="top: -100px"></div> | 53 <div class="fixed" style="top: -100px"></div> |
54 <!-- 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. --> |
55 <div class="fixed"></div> | 55 <div class="fixed"></div> |
56 <div class="fixed" style="top: 0px; left: 1000px"></div> | 56 <div class="fixed" style="top: 0px; left: 1000px"></div> |
57 <!-- 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. --> |
58 <div class="fixed" style="top: 0px; left: 600px"></div> | 58 <div class="fixed" style="top: 0px; left: 600px"></div> |
59 <!-- Always has composited layer. --> | 59 <!-- Always has composited layer. --> |
60 <div class="fixed" style="top: 0px; left: 0px"></div> | 60 <div class="fixed" style="top: 0px; left: 0px"></div> |
61 </body> | 61 </body> |
62 </html> | 62 </html> |
OLD | NEW |