mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1384602 part 2. Convert inserts to appends on table rows if possible, because the insert codepath is rather buggy. r=heycam
MozReview-Commit-ID: 5iOaG5UNAwG --HG-- rename : layout/reftests/table-bordercollapse/1384602-1a.html => layout/reftests/table-bordercollapse/1384602-1b.html
This commit is contained in:
parent
3e9a6da953
commit
0a35f673b3
29
layout/reftests/table-bordercollapse/1384602-1b.html
Normal file
29
layout/reftests/table-bordercollapse/1384602-1b.html
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
table {
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
</style>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4">Spanning.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<tr id="target"></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
onload = function() {
|
||||
var row = document.getElementById("target");
|
||||
for (var i = 1; i <= 4; ++i) {
|
||||
document.body.offsetWidth;
|
||||
var cell = document.createElement("td");
|
||||
cell.textContent = i;
|
||||
row.appendChild(cell);
|
||||
}
|
||||
}
|
||||
</script>
|
@ -112,3 +112,4 @@ fuzzy(255,40) == border-style-outset-becomes-groove.html border-style-outset-bec
|
||||
fuzzy(255,40) == border-style-inset-becomes-ridge.html border-style-inset-becomes-ridge-ref.html
|
||||
fuzzy(2,11000) == 1324524.html 1324524-ref.html
|
||||
== 1384602-1a.html 1384602-1-ref.html
|
||||
== 1384602-1b.html 1384602-1-ref.html
|
||||
|
@ -117,7 +117,7 @@ load 451355-1.html
|
||||
load 456041.html
|
||||
load 457115.html
|
||||
load 460637-1.xhtml
|
||||
load 460637-2.xhtml
|
||||
asserts(1) load 460637-2.xhtml # bug 1389295
|
||||
load 460637-3.xhtml
|
||||
load 462849.xhtml
|
||||
load 467141-1.html
|
||||
|
@ -232,6 +232,15 @@ nsTableRowFrame::InsertFrames(ChildListID aListID,
|
||||
NS_ASSERTION(aListID == kPrincipalList, "unexpected child list");
|
||||
NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this,
|
||||
"inserting after sibling frame with different parent");
|
||||
if (mFrames.IsEmpty() ||
|
||||
(aPrevFrame && !aPrevFrame->GetNextSibling())) {
|
||||
// This is actually an append (though our caller didn't figure that out),
|
||||
// and our append codepath is both simpler/faster _and_ less buggy.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1388898 tracks the bugginess
|
||||
AppendFrames(aListID, aFrameList);
|
||||
return;
|
||||
}
|
||||
|
||||
DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames
|
||||
//Insert Frames in the frame list
|
||||
const nsFrameList::Slice& newCells = mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList);
|
||||
|
Loading…
Reference in New Issue
Block a user