Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / compositing / layer-creation / fixed-position-out-of-view-scaled-scroll.html
bloba1c964a02851fb780e21deeb45833181aa182809
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 .fixed {
6 position: fixed;
7 width: 10px;
8 height: 10px;
9 background-color: silver;
11 ::-webkit-scrollbar {
12 width: 0px;
13 height: 0px;
15 </style>
16 <script>
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
21 if (window.internals && window.eventSender) {
22 window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
24 addEventListener("load", function() {
25 window.scrollTo(100,100);
27 document.getElementById("layerTree").innerText = internals.layerTreeAsText(document);
29 window.internals.setPageScaleFactor(0.5);
30 setTimeout(function() {
31 document.getElementById("layerTreeScaledDown").innerText = internals.layerTreeAsText(document);
33 window.internals.setPageScaleFactor(1.5);
34 setTimeout(function() {
35 document.getElementById("layerTreeScaledUp").innerText = internals.layerTreeAsText(document);
36 testRunner.notifyDone();
37 }, 0);
38 }, 0);
39 }, false);
41 </script>
42 </head>
44 <!-- Fixed position elements may skip compositing without a scrollable
45 ancestor. To make sure this test covers the intended scenario, we force the
46 body element to be tall, so that the FrameView is scrolling. -->
47 <body style="width: 4000px; height: 4000px;">
48 <div style="height: 1000px">
49 Not scaled:
50 <pre id="layerTree"></pre>
51 Scale=0.5:
52 <pre id="layerTreeScaledDown"></pre>
53 Scale=1.5:
54 <pre id="layerTreeScaledUp"></pre>
55 </div>
56 <!-- The layer tree should always be the same, regardless of page scale, except on platforms that enable the applyPageScaleFactorInCompositor Setting. -->
57 <!-- No layer in any case. -->
58 <div class="fixed" style="top: -100px"></div>
59 <!-- When applyPageScaleFactorInCompositor is true, this will have composited layer when scaled down; no layer when not scaled or scaled up. -->
60 <div class="fixed"></div>
61 <div class="fixed" style="top: 0px; left: 1000px"></div>
62 <!-- When applyPageScaleFactorInCompositor is true, this will have composited layer when not scaled and scaled down; no layer scaled up. -->
63 <div class="fixed" style="top: 0px; left: 600px"></div>
64 <!-- Always has composited layer. -->
65 <div class="fixed" style="top: 0px; left: 0px"></div>
66 </body>
67 </html>