mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 1652384 - When inserting a col frame, invalidate all subsequent column BC borders. r=mats
This is the same fix as the fix for bug 711359, basically... We don't shift the damage area otherwise which means that we would incorrectly miss computing some borders. Differential Revision: https://phabricator.services.mozilla.com/D84920
This commit is contained in:
parent
33defe2786
commit
00e140a8f8
@ -593,7 +593,8 @@ void nsTableFrame::InsertCol(nsTableColFrame& aColFrame, int32_t aColIndex) {
|
||||
}
|
||||
// for now, just bail and recalc all of the collapsing borders
|
||||
if (IsBorderCollapse()) {
|
||||
TableArea damageArea(aColIndex, 0, 1, GetRowCount());
|
||||
TableArea damageArea(aColIndex, 0, GetColCount() - aColIndex,
|
||||
GetRowCount());
|
||||
AddBCDamageArea(damageArea);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<title>CSS Test Reference</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
td {
|
||||
padding: 10px;
|
||||
border: 1px solid;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="UTF-8">
|
||||
<title>CSS Test: Border collapsed table with a dynamic <col> insertion</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-tables/#border-collapsing">
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1652384">
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
||||
<link rel="match" href="border-collapse-dynamic-col-001-ref.html">
|
||||
<style>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
td {
|
||||
padding: 10px;
|
||||
border: 1px solid;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
document.querySelector("table").getBoundingClientRect();
|
||||
// Insert a column at the second position.
|
||||
var trs = document.querySelectorAll("tr");
|
||||
var col = document.querySelector("col");
|
||||
col.parentNode.insertBefore(col.cloneNode(true), col.nextSibling);
|
||||
for (var i = 0; i < trs.length; ++i) {
|
||||
var row = trs[i];
|
||||
var firstCell = row.querySelector("td");
|
||||
firstCell.parentNode.insertBefore(firstCell.cloneNode(true), firstCell.nextSibling);
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user