Bug 348497: Crash enabling designMode

r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@207537 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pkasting%google.com
2006-08-16 02:41:47 +00:00
parent 6df5c9a109
commit 11090c7328

View File

@@ -329,6 +329,13 @@ nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *aWindow)
mimeCType.AssignLiteral("text/html");
}
}
// Flush out frame construction to make sure that the subframe's
// presshell is set up if it needs to be.
nsCOMPtr<nsIDocument> document(do_QueryInterface(doc));
if (document) {
document->FlushPendingNotifications(Flush_Frames);
}
}
PRBool needHTMLController = PR_FALSE;
@@ -389,13 +396,6 @@ nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *aWindow)
nsIDocShell *docShell = GetDocShellFromWindow(aWindow);
if (!docShell) return NS_ERROR_FAILURE;
// Flush out frame construction to make sure that the subframe's
// presshell is set up if it needs to be.
nsCOMPtr<nsIDocument> document(do_QueryInterface(doc));
if (document) {
document->FlushPendingNotifications(Flush_Frames);
}
// Disable animation of images in this document:
nsCOMPtr<nsIDOMWindowUtils> utils(do_GetInterface(aWindow));
if (!utils) return NS_ERROR_FAILURE;