summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
blob: b0c89d82728c75f57ca6574b676ad590ab551c3e (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
75
76
77
78
79
80
81
82
83
84
85
86
<!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>25052 testcase</title>
  <style type="text/css" media="screen">
  body {
      margin: 100px;
  }
  
  #container {
    position: relative;
    overflow: hidden;
    height: 200px;
    width: 200px;
    border: 1px solid black;
    z-index: 0;
  }
  
  #header {
    position: relative;
    width: 100%;
    height: 100px;
    background-color: rgba(128, 128, 0, 0.2);
  }

  #hanger {
    position: absolute;
    left: -200px;
    height: 100px;
    width: 150px;
    background-color: blue;
  }
  
  #mover {
    position: absolute;
    top: 0;
    height: 150px;
    width: 150px;
    background-color: green;
    -webkit-transition: -webkit-transform 1000s;
  }
  
  #mover:hover {
    transform: translate(0px, 100px);
  }
  #mover.moving {
    transform: translate(0px, 100px);
  }
  </style>
  <script type="text/javascript" charset="utf-8">
    if (window.testRunner)
      testRunner.waitUntilDone();

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

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

<p>Things should not jump around when the green square starts the transition.</p>
<div id="container">
  <div id="header">
    <div id="hanger"></div>
  </div>
  <div id="mover">
  </div>
</div>

</body>
</html>