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:
parent
da285c2d1e
commit
4c5ce96ff3
@ -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)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user