Bug 348497: Crash enabling designMode

r+sr=bzbarsky
This commit is contained in:
pkasting%google.com 2006-08-16 02:41:47 +00:00
Родитель fb58e3763b
Коммит e5a0f6e2fe
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -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;