summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/block/strip-anonymous-blocks-when-block-child-becomes-float.html
blob: 27efbfad34d360577506469a8b33b0037ff6cf6e (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
<!DOCTYPE html>
<style>
    body {
        margin: 0;
        padding: 0;
    }
    #container {
        position: relative;
        background: #ccc;
        font: 20px Ahem;
    }
    #floater {
        float: none;
    }
</style>
<script src="../../resources/check-layout.js"></script>
<body>
    <p> When a block element becomes a float we should strip any anonymous blocks wrapping its inline siblings.</p>
    <div id="container">
        <span id="content">
            Some<br />
            content<br />
            here.
        </span>
        <div id="floater" data-offset-y=40>
            Should appear inside grey box.
        </div>
    </div>
    <script>
        document.body.offsetTop;
        document.getElementById('floater').style.float = 'right';
        onload = function() { checkLayout('#container'); }
    </script>
</body>