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

This commit is contained in:
roc+@cs.cmu.edu
2005-10-20 19:20:34 +00:00
parent 0af8f2186f
commit 024871025a

View File

@@ -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) {