summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/geometry/root-layer-update.html
blob: bfda1253c7dd1abcbc6154d98e8f8802e94c1f25 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
<!-- =========================================== kroc camen of camen design ============================================= -->
<head>
  <title>camen design - Video for Everybody!</title>
  <style type="text/css" media="screen">
    body {
      width: 600px;
      margin: 0 auto;
    }

    #sidebar {
      position: absolute;
      height: 100px;
      width: 100px; 
      margin-left: -200px;
      padding-left: 200px;
      background: gray;
    }

    #article {
      position: relative;
      border: 1px solid black;
    }

    #compositing {
      height: 100px;
      width: 100px;
      background-color: green;
      margin: 0 auto;
      transform: translateZ(0);
    }
    
    #tester {
      position: absolute;
      top: 1px;
      left: 350px;
      height: 100px;
      width: 100px;
      background-color: red;
    }
  </style>
  <script type="text/javascript" charset="utf-8">
  if (window.testRunner)
    testRunner.waitUntilDone();

  function startTest()
  {
    window.setTimeout(function() {
      document.documentElement.style.width = '800px'
      window.setTimeout(function() {
        if (window.testRunner)
          testRunner.notifyDone();
      }, 0);
    }, 0);
  }

  window.addEventListener('load', startTest, false);
  </script>
</head>
<body>

  <div id="tester"></div>
  <div id="sidebar"></div>

  <div id="article">
    <div id="compositing"></div>
  </div>
  <p><a href="rdar://problem/7026010">rdar://problem/7026010</a><br>
    Test for the root layer getting correctly positioned. You should see no red.</p>
</body>
</html>