Call WillDestroyFrameTree() before destroying the frame tree in ReconstructDocElementHierarchyInternal() because we have cleared the placeholder map etc at this point and we don't want RemoveMappingsForFrameSubtree() to mess with it. Also, remove the RemoveMappingsForFrameSubtree() call that was added in bug 372685 which was wrong since all the frames on a popupset's ::popupList are out-of-flows that are reachable (directly or indirectly) from a normal flow placeholder. b=398982 r+sr=bzbarsky a=dsicore

git-svn-id: svn://10.0.0.236/trunk@238055 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2007-10-24 00:02:27 +00:00
parent e3cdd053cb
commit df90a017de
6 changed files with 205 additions and 25 deletions

View File

@@ -7836,17 +7836,22 @@ nsCSSFrameConstructor::ReconstructDocElementHierarchyInternal()
NS_ASSERTION(docElementFrame->GetParent() == mDocElementContainingBlock,
"Unexpected doc element parent frame");
// Notify self that we will destroy the entire frame tree, this blocks
// RemoveMappingsForFrameSubtree() which would otherwise lead to a
// crash since we cleared the placeholder map above (bug 398982).
PRBool wasDestroyingFrameTree = mIsDestroyingFrameTree;
WillDestroyFrameTree();
// Remove the old document element hieararchy
rv = state.mFrameManager->RemoveFrame(mDocElementContainingBlock,
nsnull, docElementFrame);
mIsDestroyingFrameTree = wasDestroyingFrameTree;
if (NS_FAILED(rv)) {
return rv;
}
}
// Create the new document element hierarchy
nsIFrame* newChild;
nsIFrame* newChild;
rv = ConstructDocElementFrame(state, rootContent,
mDocElementContainingBlock, &newChild);
@@ -11273,8 +11278,8 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIContent* aContent)
PRUint32 event;
if (frame) {
nsIFrame *newFrame = mPresShell->GetPrimaryFrameFor(aContent);
event = newFrame ? nsIAccessibleEvent::EVENT_ASYNCH_SIGNIFICANT_CHANGE :
nsIAccessibleEvent::EVENT_ASYNCH_HIDE;
event = newFrame ? PRUint32(nsIAccessibleEvent::EVENT_ASYNCH_SIGNIFICANT_CHANGE) :
PRUint32(nsIAccessibleEvent::EVENT_ASYNCH_HIDE);
}
else {
event = nsIAccessibleEvent::EVENT_ASYNCH_SHOW;