Bug 529387: Don't create SMIL animation controller for data documents. r=roc

This commit is contained in:
Daniel Holbert 2009-12-10 09:26:27 -08:00
parent 3fe8b28b26
commit 42be6a5054
4 changed files with 16 additions and 2 deletions

View File

@ -5344,8 +5344,9 @@ nsDocument::GetAnimationController()
// one and only SVG documents and the like will call this
if (mAnimationController)
return mAnimationController;
// Refuse to create an Animation Controller if SMIL is disabled
if (!NS_SMILEnabled())
// Refuse to create an Animation Controller if SMIL is disabled, and also
// for data documents.
if (!NS_SMILEnabled() || mLoadedAsData)
return nsnull;
mAnimationController = NS_NewSMILAnimationController(this);

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg">
<text y="20pt">abc
<animate attributeName="opacity" from="1" to="0" begin="0s" dur="2s"/>
</text>
</svg>

After

Width:  |  Height:  |  Size: 154 B

View File

@ -0,0 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<script>
var p = new XMLHttpRequest();
p.open("GET", "529387-1-helper.svg", false);
p.send();
</script>
</html>

View File

@ -2,3 +2,4 @@ load 523188-1.svg
load 525099-1.svg
load 526875-1.svg
load 526875-2.svg
load 529387-1.xhtml