summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/layers/nested-layers-3.html
blob: d4938e9ee10116701745a3e9cdac6494f3d8cf9c (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
52
53
54
55
<!DOCTYPE html>
<html>
<head>
<script>
function test()
{
    document.body.offsetTop;
    if (window.testRunner) {
        testRunner.display();
        testRunner.dumpAsText();
        finish();
    } else {
        window.setTimeout(finish, 50);
    }
}

function finish()
{
    var innerLayer = document.getElementById('innerLayer');
    innerLayer.style.left = '19px';
    innerLayer.style.top = '23px';
    foo.scrollTop = 50;
}
</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 moving layers inside with fixed position nodes.
  The test passes if it completes without failing any assertions in Debug mode.
  <div>
    <div style="position:fixed; top:30px" class="a">
      <div style="position:absolute; left:7px; top:3px" class="a">
        <div style="opacity: 0.8; left: 9px; width:50px; height:50px" class="b">
          <div style="width:34px; height:43px" class="c"></div>
        </div>
        <div style="position:relative; left: 75px; width:50px; height:50px" class="a" id="innerLayer">
          <div style="width:45px; height:45px" class="c"></div>
        </div>
      </div>
      <div style="opacity: 0.8; width: 25px; height: 37px" id="foo"  class="b"></div>
      <div style="position:absolute; left:7px; top:50px; width:40px; height:40px" class="a">
      </div>
    </div>
  </div>
</body>
</html