mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-23 16:40:03 +00:00
We were incorrectly treating cellpadding=0 as if the attribute was missing. This commit fixes it so it behaves as `padding: 0` on cells. When adding a test, I discovered that we were not invalidating style for cells when their containing table's cellpadding attribute changed. So this commit fixes that as well.
15 lines
389 B
HTML
15 lines
389 B
HTML
<script src="../include.js"></script>
|
|
<table id="table"><td id="td"></td></table>
|
|
<script>
|
|
function testCellpadding(value) {
|
|
table.setAttribute("cellpadding", value);
|
|
println(getComputedStyle(td).padding);
|
|
}
|
|
|
|
test(() => {
|
|
testCellpadding("1");
|
|
testCellpadding("5");
|
|
testCellpadding("0");
|
|
testCellpadding("-1");
|
|
});
|
|
</script>
|