Bug 1494030 - Fix an assertion. r=mats
We're trying to insert a table caption via an append into a display: contents element. We pass the content-insertion-frame (the table frame) instead of the siblings' parent (the table wrapper frame). This is the right thing to pass though, we adjust the caption parent frame later, on AdjustCaptionParentFrame, and we ensure that we don't get here for a non-caption thing because of IsValidSibling (though note that that can actually lie, see bug 1424656, we'd get the layout wrong if the title element was a replaced element for example), so a normal append without a previous sibling will still be correct. It'd be nice to make this a bit less messy, fwiw, but I don't have the ideas or the time to do it now. Differential Revision: https://phabricator.services.mozilla.com/D7067
This commit is contained in:
@@ -6088,7 +6088,7 @@ FindAppendPrevSibling(nsIFrame* aParentFrame, nsIFrame* aNextSibling)
|
||||
aParentFrame->DrainSelfOverflowList();
|
||||
|
||||
if (aNextSibling) {
|
||||
MOZ_ASSERT(aNextSibling->GetParent() == aParentFrame, "Wrong parent");
|
||||
MOZ_ASSERT(aNextSibling->GetParent()->GetContentInsertionFrame() == aParentFrame, "Wrong parent");
|
||||
return aNextSibling->GetPrevSibling();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user