summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/sibling-positioning.html
blob: 91d2c544a90c1555229534f540241c9e27ab6331 (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
72
73
74
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Initial backing position</title>
  <style type="text/css" media="screen">
    #parent {
      position: relative;
      height: 200px;
      width: 200px;
      border: 1px solid black;
    }
    
    #panel {
      position: absolute;
      height: 100px;
      width: 100px;
      left: -50px;
      top: -50px;
      opacity: 0.2;
      background-color: gray;
    }
    
    #piece {
      position: absolute;
      left: 50px;
      top: 50px;
      height: 60px;
      width: 60px;
      background-color: green;
    }
    
    #piece:hover {
      transform: translate3d(0, 0, 0);
    }

    #piece.moved {
      transform: translate3d(0, 0, 0);
    }

  </style>
  <script type="text/javascript" charset="utf-8">
    if (window.testRunner)
      testRunner.waitUntilDone();

    function startTest()
    {
      window.setTimeout(function() {
        var mover = document.getElementById('piece');
        mover.className = 'moved';
        
        window.setTimeout(function() {
          if (window.testRunner)
            testRunner.notifyDone();
        }, 0);
        
      }, 0);
    }

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

  <div id="parent">
      <div id="piece"></div>
      <div id="panel"></div>
  </div>
  <p><a href="https://bugs.webkit.org/show_bug.cgi?id=26430">https://bugs.webkit.org/show_bug.cgi?id=26430</a></p>
  <p>Green box should not move when hovered</p>
</body>
</html>