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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user