summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/overflow-trumps-transform-style.html
blob: c31840db99e2caeca7798cb12763ce9addfcf8cb (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
<!DOCTYPE html>

<html>
<head>
  <style>
    .box {
      height: 100px;
      width: 100px;
      margin: 10px;
      background-color: blue;
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsText();

    function dumpResults()
    {
      var results = document.getElementById('layers');
      
      // Check the computed value.
      results.innerText = window.getComputedStyle(document.getElementById('box1')).webkitTransformStyle + '\n';
      results.innerText += window.getComputedStyle(document.getElementById('box2')).webkitTransformStyle + '\n';
      
      if (window.testRunner)
        results.innerText += window.internals.layerTreeAsText(document);
    }
    window.addEventListener('load', dumpResults, false);
  </script>
</head>
<body>
<div class="box" id="box1" style="transform: translateZ(1px); -webkit-transform-style: preserve-3d"></div>
<div class="box" id="box2" style="transform: translateZ(1px); -webkit-transform-style: preserve-3d; overflow: hidden"></div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>