mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 13:45:46 +00:00
Bug 735579. Correctly handle changes to column widths in fixed-layout tables. r=ehsan
This commit is contained in:
parent
4f06e926a2
commit
c6d965bec9
17
layout/reftests/table-width/dynamic-fixed-layout-1-ref.html
Normal file
17
layout/reftests/table-width/dynamic-fixed-layout-1-ref.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body style="height: 0">
|
||||
<table style="width: 250px; table-layout: fixed;">
|
||||
<tr>
|
||||
<td style="width: 100px; background: #CC99CC;">A</td>
|
||||
<td style="width: 100px; background: #99CCCC;">B</td>
|
||||
<td style="background: #CCCC99;">C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background: #CC99CC;">D</td>
|
||||
<td style="background: #99CCCC;">E</td>
|
||||
<td style="background: #CCCC99;">F</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
27
layout/reftests/table-width/dynamic-fixed-layout-1.html
Normal file
27
layout/reftests/table-width/dynamic-fixed-layout-1.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<!-- The fixed height on the body is in fact needed to reproduce bug 735579
|
||||
for some reason -->
|
||||
<body style="height: 100px;">
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var target = document.getElementById("test-target");
|
||||
window.targetWidth = target.getBoundingClientRect().width;
|
||||
target.style.width = "100px";
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
<table style="width: 250px; table-layout: fixed;">
|
||||
<tr>
|
||||
<td style="width: 100px; background: #CC99CC;">A</td>
|
||||
<td id="test-target" style="background: #99CCCC;">B</td>
|
||||
<td style="background: #CCCC99;">C</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background: #CC99CC;">D</td>
|
||||
<td style="background: #99CCCC;">E</td>
|
||||
<td style="background: #CCCC99;">F</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -58,3 +58,4 @@ fails == default-box-sizing-collapse-quirks.html default-box-sizing-collapse-qui
|
||||
== colgroup-vs-column-2.html colgroup-vs-column-2-ref.html
|
||||
== colgroup-vs-column-3.html colgroup-vs-column-3-ref.html
|
||||
== colgroup-vs-column-4.html colgroup-vs-column-4-ref.html
|
||||
== dynamic-fixed-layout-1.html dynamic-fixed-layout-1-ref.html
|
||||
|
@ -438,7 +438,7 @@ FixedTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt
|
||||
}
|
||||
if (oldColWidths.ElementAt(col) != colFrame->GetFinalWidth()) {
|
||||
mTableFrame->DidResizeColumns();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user