summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/table/table-switch-cell-position-bad-layout.html
blob: fe1e36fa4d3330c8856da1ff426c1b2f4a112c35 (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
<!DOCTYPE html>
<html>
<head>
    <style>
    table {
        background-color: red;
        border-spacing: 0px;
    }
    td {
        background-color: green;
        height: 100px;
        padding: 0px;
        width: 200px;
    }
    </style>
</head>
<body>
<p>Bug <a href="https://bugs.webkit.org/show_bug.cgi?id=7180">7180</a>: Table cell's anonymous wrappers are left in the tree, impacting our layout.</p>
<p>There should be no red in the output.</p>
<table>
    <tr>
        <td id="togglePosition"></td>
    </tr>
    <tr>
        <td></td>
    </tr>
</table>
<script>
    var element = document.getElementById("togglePosition");
    element.style.position = "absolute";

    element.offsetWidth;

    element.style.position = "static";
</script>
</body>
</html>