summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/table/correct-baseline-after-style-change.html
blob: 90c2e378f6c5748d1e132c0c92c083c03368b082 (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
<!DOCTYPE html>
<html>
    <head>
        <style>
            td {
                border: 1px solid gray;
            }
            input {
                visibility: hidden;
            }
        </style>
    </head>
    <body>
        <p>webkit.org/b/115432: There should be no extra space between the top of the text and the top of the table.</p>
        <form>
            <table>
                <tr>
                    <td>Text</td>
                    <td>Text<br>Text<br>Text</td>
                </tr>
            </table>
        </form>
        <script>
            var cells = document.getElementsByTagName("td");
            // Ensure layout has run so that we properly invalidate.
            cells[0].offsetLeft;
            for (var i = 0; i < cells.length; ++i)
                cells[i].style.verticalAlign = "baseline";
            cells[0].offsetLeft;
        </script>
    </body>
</html>