mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Patch from jst@citec.fi r=troy@netscape.com
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:
parent
111c4ee608
commit
98ee25447f
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user