summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/rendering-contexts.html
blob: 1ecc6dfc709c5bf0bcd48a5669fcc4ce6bc47a54 (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
49
50
51
<!DOCTYPE HTML>
<!--
  This test simply checks that when we have multiple 3d rendering contexts, that
  they get separate and unique id's in the layer tree dump.
-->
<html>
  <head>
    <style>
      .composited {
        transform: translateZ(0);
        width: 100px;
        height: 100px;
        background-color: green;
      }

      #grandparent {
        -webkit-transform-style: preserve-3d;
      }

      #child {
        -webkit-transform-style: preserve-3d;
      }

      #console {
        position: absolute;
        left: 4000px;
      }
    </style>
    <script>
      if (window.testRunner)
        testRunner.dumpAsText();


      function dumpLayerTree() {
        if (window.internals)
          document.getElementById("console").innerHTML = window.internals.layerTreeAsText(document);
      }

      window.onload = dumpLayerTree;
    </script>
  </head>
  <body>
    <div class="composited" id="grandparent">
      <div class="composited" id="parent">
        <div class="composited" id="child">
        </div>
      </div>
    </div>
    <pre id="console"></pre>
  </body>
</html>