summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/layers/nested-layers-4.html
blob: 33db96817e182283946bb924e054e10020f88f2b (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
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
function test()
{
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
    }
    runAfterLayoutAndPaint(finish);
}

function finish()
{
    var innerLayer = document.getElementById('innerLayer');
    innerLayer.style.left = '19px';
    innerLayer.style.top = '23px';
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
<style>
/* nodes that have layers and are containers for their children */
.a { outline: solid blue 1px }

/* nodes that have layers but are not containers for their children */
.b { outline: solid red 1px }

/* nodes that do not have layers */
.c { outline: solid green 1px }
</style>
</head>
<body onload="test()">
  Tests that moving a layer inside a transformed layer works.
  The test passes if it completes without failing any assertions in Debug mode.
  <div>
    <div style="position:absolute; top:50px" class="a">
      <div style="transform:translate(27px, 47px); transform:rotate(30deg)" class="a">
        <div style="opacity: 0.8; width:50px; height:50px" class="b"></div>
        <div style="position:absolute; width:20px; height:20px; left: 4px; top:7px" id="innerLayer" class="a">
          <div style="position:relative; width:15px; height:15px" class="a"></div>
        </div>
        <div style="opacity: 0.8; width:50px; height:50px" class="b"></div>
      </div>
    </div>
  </div>
</body>
</html