Bug 405721. nsContainerFrame::RemoveFrame should search the frame's overflow list if the frame isn't found in the main child list. r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@243083 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2008-01-15 01:12:01 +00:00
parent fc456169cb
commit 57da355b9e

View File

@@ -217,7 +217,13 @@ nsContainerFrame::RemoveFrame(nsIAtom* aListName,
// for overflow containers once we can split abspos elements with
// inline containing blocks.
if (parent == this) {
parent->mFrames.DestroyFrame(aOldFrame);
if (!parent->mFrames.DestroyFrame(aOldFrame)) {
// Try to remove it from our overflow list, if we have one.
// The simplest way is to reuse StealFrame.
nsresult rv = StealFrame(PresContext(), aOldFrame, PR_TRUE);
NS_ASSERTION(NS_SUCCEEDED(rv), "Could not find frame to remove!");
aOldFrame->Destroy();
}
} else {
// This recursive call takes care of all continuations after aOldFrame,
// so we don't need to loop anymore.