Bug 233463, patch 3 - Make Destroy/RemoveFrame() methods void and assert that the frame to remove is present. r=bzbarsky

This commit is contained in:
Mats Palmgren
2009-09-18 13:09:36 +02:00
parent 6f16626d51
commit 54e643ff5b
12 changed files with 94 additions and 65 deletions
+2 -5
View File
@@ -1340,11 +1340,8 @@ AdjustFloatParentPtrs(nsIFrame* aFrame,
NS_ASSERTION(outOfFlowFrame->GetParent() == aOuterState.mFloatedItems.containingBlock,
"expected the float to be a child of the outer CB");
if (aOuterState.mFloatedItems.RemoveFrame(outOfFlowFrame, nsnull)) {
aState.mFloatedItems.AddChild(outOfFlowFrame);
} else {
NS_NOTREACHED("float wasn't in the outer state float list");
}
aOuterState.mFloatedItems.RemoveFrame(outOfFlowFrame);
aState.mFloatedItems.AddChild(outOfFlowFrame);
outOfFlowFrame->SetParent(parent);
if (outOfFlowFrame->GetStateBits() &