From 57da355b9e2f7cb9d7bccc52d65a32591982a7c7 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 15 Jan 2008 01:12:01 +0000 Subject: [PATCH] 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 --- mozilla/layout/generic/nsContainerFrame.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index a3d64a4b48c..7455458c60b 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -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.