Part of a fix for crash when expanding/collapsing toolbars. Change to
DeletingFrameSubtree() to make sure it examines the additional child
list as well as the principal child list
This commit is contained in:
troy%netscape.com 1999-10-15 03:37:10 +00:00
parent 111c4ee608
commit 98ee25447f
2 changed files with 118 additions and 102 deletions

View File

@ -6724,9 +6724,13 @@ DeletingFrameSubtree(nsIPresContext* aPresContext,
aFrameManager->SetPrimaryFrameFor(content, nsnull);
aFrameManager->ClearAllUndisplayedContentIn(content);
nsIAtom* childListName = nsnull;
PRInt32 childListIndex = 0;
do {
// Recursively walk aFrame's child frames looking for placeholder frames
nsIFrame* childFrame;
aFrame->FirstChild(nsnull, &childFrame);
aFrame->FirstChild(childListName, &childFrame);
while (childFrame) {
nsIAtom* frameType;
PRBool isPlaceholder;
@ -6777,6 +6781,10 @@ DeletingFrameSubtree(nsIPresContext* aPresContext,
// Get the next sibling child frame
childFrame->GetNextSibling(&childFrame);
}
NS_IF_RELEASE(childListName);
aFrame->GetAdditionalChildListName(childListIndex++, &childListName);
} while (childListName);
}
return NS_OK;

View File

@ -6724,9 +6724,13 @@ DeletingFrameSubtree(nsIPresContext* aPresContext,
aFrameManager->SetPrimaryFrameFor(content, nsnull);
aFrameManager->ClearAllUndisplayedContentIn(content);
nsIAtom* childListName = nsnull;
PRInt32 childListIndex = 0;
do {
// Recursively walk aFrame's child frames looking for placeholder frames
nsIFrame* childFrame;
aFrame->FirstChild(nsnull, &childFrame);
aFrame->FirstChild(childListName, &childFrame);
while (childFrame) {
nsIAtom* frameType;
PRBool isPlaceholder;
@ -6777,6 +6781,10 @@ DeletingFrameSubtree(nsIPresContext* aPresContext,
// Get the next sibling child frame
childFrame->GetNextSibling(&childFrame);
}
NS_IF_RELEASE(childListName);
aFrame->GetAdditionalChildListName(childListIndex++, &childListName);
} while (childListName);
}
return NS_OK;