summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dynamic/float-withdrawal.html
blob: bd0394bdb365d6481e396eda82171f51fe6f1c2a (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
<html>
<head>
    <title></title>
    <style>
       td { width: 50px; height: 150px; vertical-align: top; }
    </style>
</head>
<body>
    <p>
        Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=12886">http://bugs.webkit.org/show_bug.cgi?id=12886</a>
        Crash with Scriptalicious javascript library</i>.
    </p>
    <p>
        You should see two purple 100&times;50 rectangles, <em>not</em> a checkerboard pattern.
    </p>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <div style="width: 50px;">        
                    <div style="height: 50px;">
                        <div id="target" style="float: left; width: 50px; height: 100px;"></div>
                    </div>
                    <div>
                        <div style="clear: both; width: 50px; height: 50px; background-color: purple;">
                        </div>
                    </div>
                </div>
            </td>
            <td>
                <div style="width: 50px;">        
                    <div style="height: 50px;">
                        <div style="float: left; width: 50px; height: 25px;"></div>
                    </div>
                    <div>
                        <div style="clear: both; width: 50px; height: 50px; background-color: purple;">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div style="width: 50px;">        
                    <div>
                        <div id="target2" style="float: left; width: 50px; height: 50px;"></div>
                    </div>
                    <div>
                        <div style="clear: both; width: 50px; height: 50px; background-color: purple;">
                        </div>
                    </div>
                </div>
            </td>
            <td>
                <div style="width: 50px; height: 50px; background-color: purple;">
                </div>
            </td>
        </tr>
    </table>
    <div style="height: 200px;">
    </div>

    <script>
        var target = document.getElementById("target");
        var target2 = document.getElementById("target2");
        document.body.offsetTop;
        target.style.height = '25px';
        target2.style.height = '0';
    </script>
</body>
</html>