From a94923aa692e438cfcf1d7d96489ff830ba033e3 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Thu, 20 Oct 2005 19:20:34 +0000 Subject: [PATCH] Bug 313086. Fall-back path to delete absolute and floating frames if they're not found in the usual child list ... they may have been placed in the normal child list because no container was found. r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@182606 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 299c4cb346f..1b6d54a7e6e 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -10031,6 +10031,11 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, // placeholder rv = frameManager->RemoveFrame(parentFrame, nsLayoutAtoms::floatList, childFrame); + if (NS_FAILED(rv)) { + // We might have made it normal content instead. Try removing it from + // the normal child list. + rv = frameManager->RemoveFrame(parentFrame, nsnull, childFrame); + } // Remove the placeholder frame first (XXX second for now) (so // that it doesn't retain a dangling pointer to memory) @@ -10057,6 +10062,11 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, rv = frameManager->RemoveFrame(parentFrame, (NS_STYLE_POSITION_FIXED == display->mPosition) ? nsLayoutAtoms::fixedList : nsLayoutAtoms::absoluteList, childFrame); + if (NS_FAILED(rv)) { + // We might have made it normal content instead. Try removing it from + // the normal child list. + rv = frameManager->RemoveFrame(parentFrame, nsnull, childFrame); + } // Now the placeholder frame if (placeholderFrame) {