summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/layer-creation/fixed-position-no-content.html
blob: 0a00babc682be798676eca5cb73fb2db66989a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>

<html>
<head>
  <style>
    .fixed {
      position: fixed;
      width: 50px;
      height: 50px;
    }
    
    .absolute {
        position: absolute;
        top: 40px;
        left: 40px;
        height: 100px;
        width: 100px;
        background-color: gray;
    }
  </style>

  <script type="text/javascript">
    if (window.internals) {
      window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
    }

    if (window.testRunner) {
      testRunner.dumpAsText();

      window.addEventListener("load", function() {
        document.getElementById("layertree").innerText = window.internals.layerTreeAsText(document);
      }, false);
    }
  </script>
</head>

<body>
  <div style="height: 1000px">
    <pre id="layertree"></pre>
  </div>

  <!-- This should not be promoted to a composited layer. -->
  <div class="fixed" style="top: 10px; left: 10px"></div>
  <!-- And this should not be promoted into a layer either as a result. -->
  <div class="absolute"></div>
</body>
</html>