summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/block/positioning/positioned-movement-layout-when-width-changes-expected.html
blob: a058aa3aef292e60425db54c55628084e43cca2b (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
<!DOCTYPE HTML>
<style>
    body {
        margin: 0;
    }
    #top {
        position: relative;
        height: 500px;
        width: 500px;
    }
    #container {
        position: absolute;
        top: 0px;
        bottom: 0px;
        left: 0px;
        right: 0px;
        overflow: hidden;
    }
    #test {
        position: absolute;
        top: 0px;
        bottom: 0px;
        left: 0px;
        right: 140px;
        overflow: hidden;
    }
    .contents {
        display: inline-block;
        background-color: green;
        height: 100px;
        width: 100px;
        overflow: hidden;
    }
</style>
<script>

    function addChildren(test)
    {
        for (i = 0; i < 20; i++) {
            box = document.createElement("div");
            box.setAttribute('class', 'contents');
            box.setAttribute('id', i);
            test.appendChild(box);
        }
    }

    function runTest()
    {
        test = document.getElementById("test");
        addChildren(test);
    }
    window.onload = runTest;
</script>
<div id="top">
<div id="container">
    <div id="test"></div>
</div>
</div>
crbug.com/426166: Tests positioned movement layout when it needs to layout children because it's width has changed.