summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/relative-positioned-block-with-inline-parent-dynamic-removed.html
blob: f77390a9f392f02e9e18a6e06df4ed9d14fe9ba8 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!--     This tests that toggling an inline's position from relative to static updates the position of any child blocks. -->
    <head>
        <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
        <style type="text/css">
            #span1
            {
                background: yellow;
                height: 2in;
                display: inline;
                width: 2in;
                left: 2in;
                top: 2in;
            }
            #span2
            {
                background: blue;
                display: inline;
                position: relative;
                width: 2in;
                left: 2in;
                top: 2in;
            }
            #div3
            {
                background: orange;
                width: 2in;
            }
        </style>
        <script type="text/javascript">
            if (window.testRunner) {
                testRunner.waitUntilDone();
            }

            function run() {
                document.getElementById("span2").style.position = "static";
                document.body.offsetTop;
                if (window.testRunner)
                    testRunner.notifyDone();
           }
        </script>
    </head>
    <body onload="setTimeout('run()', 10);">
        <p>Test passes if the orange box sits atop the blue box and both are in the top left of the view.</p>
            <span id="span2">
                <i>
                <div id="div3">Filler Text</div>
                Filler Text
                </i>
            </span>
    </body>
</html>