Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / relative-positioned-block-with-inline-parent-dynamic.html
blobe9229ec7485ef9a4f197d7312408d968f311c960
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <!-- This tests that toggling an inline's position to relative updates the position of any child blocks. -->
4 <head>
5 <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
6 <style type="text/css">
7 body { overflow: hidden; }
8 #span1
10 background: yellow;
11 height: 2in;
12 display: inline;
13 width: 2in;
14 left: 2in;
15 top: 2in;
17 #span2
19 background: blue;
20 display: inline;
21 width: 2in;
22 left: 2in;
23 top: 2in;
25 #div3
27 background: orange;
28 width: 2in;
30 </style>
31 <script type="text/javascript">
32 if (window.testRunner) {
33 testRunner.waitUntilDone();
36 function run() {
37 document.getElementById("span2").style.position = "relative";
38 document.body.offsetTop;
39 if (window.testRunner)
40 testRunner.notifyDone();
42 </script>
43 </head>
44 <body onload="setTimeout('run()', 10);">
45 <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
46 <span id="span2">
47 <i>
48 <div id="div3">Filler Text</div>
49 Filler Text
50 </i>
51 </span>
52 </body>
53 </html>