blob: b39e8451aa90c89b86c3b3f4a50e390fa3144555 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
td
{
width: 50px;
height: 40px;
}
table.small td
{
height: 20px;
}
table td.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>
<td></td>
</tr>
<tr>
<td class="filler" ></td>
<td class="filler" ></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')", "'44px'");
toggleSmallRows();
shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'24px'");
toggleSmallRows();
shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'44px'");
</script>
</body>
</html>