diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index 53a36c214fc..8a587279cfb 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -456,6 +456,12 @@ nsEditorShell::PrepareDocumentForEditing(nsIDocumentLoader* aLoader, nsIURI *aUr return NS_ERROR_UNEXPECTED; } + // turn off animated GIFs + nsCOMPtr presContext; + containerAsDocShell->GetPresContext(getter_AddRefs(presContext)); + if (presContext) + presContext->SetImageAnimationMode(eImageAnimation_None); + nsresult rv = DoEditorMode(containerAsDocShell); if (NS_FAILED(rv)) return rv; @@ -4671,7 +4677,7 @@ nsEditorShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, cons scriptContext->SetScriptsEnabled(PR_FALSE); } } - + // set up a parser observer if (!mParserObserver) { diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 53a36c214fc..8a587279cfb 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -456,6 +456,12 @@ nsEditorShell::PrepareDocumentForEditing(nsIDocumentLoader* aLoader, nsIURI *aUr return NS_ERROR_UNEXPECTED; } + // turn off animated GIFs + nsCOMPtr presContext; + containerAsDocShell->GetPresContext(getter_AddRefs(presContext)); + if (presContext) + presContext->SetImageAnimationMode(eImageAnimation_None); + nsresult rv = DoEditorMode(containerAsDocShell); if (NS_FAILED(rv)) return rv; @@ -4671,7 +4677,7 @@ nsEditorShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, cons scriptContext->SetScriptsEnabled(PR_FALSE); } } - + // set up a parser observer if (!mParserObserver) {