diff --git a/content/svg/content/test/Makefile.in b/content/svg/content/test/Makefile.in index 2ed481e8a16..ebb6b864148 100644 --- a/content/svg/content/test/Makefile.in +++ b/content/svg/content/test/Makefile.in @@ -68,6 +68,9 @@ _TEST_FILES = \ test_pointer-events.xhtml \ test_scientific.html \ scientific-helper.svg \ + test_SVGAnimatedImageSMILDisabled.html \ + animated-svg-image-helper.html \ + animated-svg-image-helper.svg \ test_SVGLengthList.xhtml \ test_SVGPathSegList.xhtml \ test_SVGStyleElement.xhtml \ diff --git a/content/svg/content/test/animated-svg-image-helper.html b/content/svg/content/test/animated-svg-image-helper.html new file mode 100644 index 00000000000..94af2098bce --- /dev/null +++ b/content/svg/content/test/animated-svg-image-helper.html @@ -0,0 +1,3 @@ + + + diff --git a/content/svg/content/test/animated-svg-image-helper.svg b/content/svg/content/test/animated-svg-image-helper.svg new file mode 100644 index 00000000000..5f6f564e921 --- /dev/null +++ b/content/svg/content/test/animated-svg-image-helper.svg @@ -0,0 +1,3 @@ + + + diff --git a/content/svg/content/test/test_SVGAnimatedImageSMILDisabled.html b/content/svg/content/test/test_SVGAnimatedImageSMILDisabled.html new file mode 100644 index 00000000000..2a78e3c0548 --- /dev/null +++ b/content/svg/content/test/test_SVGAnimatedImageSMILDisabled.html @@ -0,0 +1,58 @@ + + + + + Test for Bug 623945 + + + + + +Mozilla Bug 623945 +

+ +
+
+
+ + diff --git a/modules/libpr0n/src/SVGDocumentWrapper.cpp b/modules/libpr0n/src/SVGDocumentWrapper.cpp index 1a4097ab7a4..481351bb6d3 100644 --- a/modules/libpr0n/src/SVGDocumentWrapper.cpp +++ b/modules/libpr0n/src/SVGDocumentWrapper.cpp @@ -204,7 +204,10 @@ SVGDocumentWrapper::StartAnimation() nsIDocument* doc = mViewer->GetDocument(); if (doc) { #ifdef MOZ_SMIL - doc->GetAnimationController()->Resume(nsSMILTimeContainer::PAUSE_IMAGE); + nsSMILAnimationController* controller = doc->GetAnimationController(); + if (controller) { + controller->Resume(nsSMILTimeContainer::PAUSE_IMAGE); + } #endif // MOZ_SMIL doc->SetImagesNeedAnimating(PR_TRUE); } @@ -221,7 +224,10 @@ SVGDocumentWrapper::StopAnimation() nsIDocument* doc = mViewer->GetDocument(); if (doc) { #ifdef MOZ_SMIL - doc->GetAnimationController()->Pause(nsSMILTimeContainer::PAUSE_IMAGE); + nsSMILAnimationController* controller = doc->GetAnimationController(); + if (controller) { + controller->Pause(nsSMILTimeContainer::PAUSE_IMAGE); + } #endif // MOZ_SMIL doc->SetImagesNeedAnimating(PR_FALSE); }