Fix for 14768 -- turn off animated GIFs in editor. r=pnunn a=beppe

git-svn-id: svn://10.0.0.236/trunk@70864 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sfraser%netscape.com 2000-05-25 21:50:46 +00:00
parent da285c2d1e
commit 4c5ce96ff3
2 changed files with 14 additions and 2 deletions

View File

@ -456,6 +456,12 @@ nsEditorShell::PrepareDocumentForEditing(nsIDocumentLoader* aLoader, nsIURI *aUr
return NS_ERROR_UNEXPECTED;
}
// turn off animated GIFs
nsCOMPtr<nsIPresContext> 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)
{

View File

@ -456,6 +456,12 @@ nsEditorShell::PrepareDocumentForEditing(nsIDocumentLoader* aLoader, nsIURI *aUr
return NS_ERROR_UNEXPECTED;
}
// turn off animated GIFs
nsCOMPtr<nsIPresContext> 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)
{