summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dynamic/recursive-layout.html
blob: 1cbf2d4eff4cbd71417349e67d3bad152ef460aa (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
<html>
<head id="head">
    <script>
        function test()
        {
            if (window.testRunner)
                testRunner.dumpAsText();

            var target = document.getElementById("target");
            getSelection().setBaseAndExtent(target, 0, target, 0);
            document.body.offsetTop;

            var head = document.getElementById("head");
            var link = document.createElement("link");
            link.setAttribute("href", "data:text/css,");
            link.setAttribute("rel", "stylesheet");
            // This will increase the pending stylesheet count
            head.appendChild(link);
            // This will require layout
            foo.style.width = "100px";
        }
    </script>
</head>
<body onload="test()">
    <p>
        Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=14118">http://bugs.webkit.org/show_bug.cgi?id=14118</a>
        ASSERTION FAILED: !needsLayout() seen again</i>.
    </p>
    <p>
        No assertion failure here means SUCCESS.
    </p>
    <div id="target">This is something to select</div>
    <div id="foo"></div>
</body>
</html>