summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/table/resize-table-row.html
blob: b93c9aac0af7ada74b461f96c76101775426ae5a (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
<!DOCTYPE html>
<html>
<head>
    <style>
    td
    {
        width: 50px;
    }
    tr
    {
        height: 40px;
    }
    table.small tr
    {
        height: 20px;
    }

    table tr.filler
    {
        height: auto;
    }
    </style>
    <script src="../../resources/js-test.js"></script>
</head>
<body>
    <div style="height: 300px">
        <table border="1" style="height: 100%">
            <tr id="firstRow"><td></td></tr>
            <tr class="filler"><td></td></tr>
        </table>
    </div>
    <script>
    var smallRows = false;

    function toggleSmallRows()
    {
        var table = document.querySelector("table")
        smallRows = !smallRows;
        if (smallRows)
            table.classList.add("small");
        else
            table.classList.remove("small");
    }

    description("Regression(99212): table rows get incorrect height after changing some cells' height<br>https://bugs.webkit.org/show_bug.cgi?id=74303");

    firstRow = document.getElementById("firstRow");
    // Original value.
    shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'40px'");

    toggleSmallRows();
    shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'20px'");
    toggleSmallRows();
    shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'40px'");
    </script>
</body>
</html>