Bug 536721 - Tweak DestroyOverflowList so it does not trigger Missing destruct root assertion. r=bz a=dbaron

This commit is contained in:
fantasai 2010-08-13 14:36:05 -03:00
parent 46621aa710
commit de0f13939e
2 changed files with 11 additions and 5 deletions

View File

@ -1038,7 +1038,7 @@ nsContainerFrame::StealFrame(nsPresContext* aPresContext,
if (frameList) {
removed = frameList->RemoveFrameIfPresent(aChild);
if (frameList->IsEmpty()) {
DestroyOverflowList(aPresContext);
DestroyOverflowList(aPresContext, nsnull);
}
}
}
@ -1091,8 +1091,12 @@ nsContainerFrame::DestroyOverflowList(nsPresContext* aPresContext,
{
nsFrameList* list =
RemovePropTableFrames(aPresContext, OverflowProperty());
if (list)
list->DestroyFrom(aDestructRoot);
if (list) {
if (aDestructRoot)
list->DestroyFrom(aDestructRoot);
else
list->Destroy();
}
}
/**

View File

@ -390,10 +390,12 @@ protected:
const nsFrameList& aOverflowFrames);
/**
* Destroy the overflow list and any frames that are on it.
* Destroy the overflow list and any frames that are on it.
* Calls DestructFrom() insead of Destruct() on the frames if
* aDestructRoot is non-null.
*/
void DestroyOverflowList(nsPresContext* aPresContext,
nsIFrame* aDestructRoot = nsnull);
nsIFrame* aDestructRoot);
/**
* Moves any frames on both the prev-in-flow's overflow list and the