Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / relative-positioned-block-with-inline-ancestor-dynamic.html
blob704085d26a594ef69fc7e898d7a0279499bdceb5
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <!-- This tests that a block descended from an inline respects the positioning of an inline ancestor when it gets relatively positioned. -->
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;
22 #div3
24 background: orange;
25 width: 2in;
27 </style>
28 <script type="text/javascript">
29 if (window.testRunner) {
30 testRunner.waitUntilDone();
33 function run() {
34 document.getElementById("span1").style.position = "relative";
35 document.body.offsetTop;
36 if (window.testRunner)
37 testRunner.notifyDone();
39 </script>
40 </head>
41 <body onload="setTimeout('run()', 10);">
42 <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
43 <span id="span1">
44 <span id="span2">
45 <i>
46 <div id="div3">Filler Text</div>
47 Filler Text
48 </i>
49 </span>
50 </span>
51 </body>
52 </html>