Bug 649440: Fire OnStopFrame notification on each redraw request in SVG images. r=joe
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 28 Apr 2011 19:11:16 -0700
changeset 68739 340131166fbc21ea28918ccade70e55b8b9ae4f6
parent 68738 4a6f98909da538d865e7beeae6020fcbaacaa562
child 68740 cdbeb9df92d3f649531c0e9b15ab9fff6a7374bf
push id19730
push userdholbert@mozilla.com
push dateFri, 29 Apr 2011 02:13:41 +0000
treeherdermozilla-central@3b1fa83ffc99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe
bugs649440
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 649440: Fire OnStopFrame notification on each redraw request in SVG images. r=joe
modules/libpr0n/src/VectorImage.cpp
--- a/modules/libpr0n/src/VectorImage.cpp
+++ b/modules/libpr0n/src/VectorImage.cpp
@@ -706,16 +706,24 @@ VectorImage::OnDataAvailable(nsIRequest*
 }
 
 // --------------------------
 // Invalidation helper method
 
 void
 VectorImage::InvalidateObserver()
 {
-  nsCOMPtr<imgIContainerObserver> observer(do_QueryReferent(mObserver));
-  if (observer) {
-    observer->FrameChanged(this, &nsIntRect::GetMaxSizedIntRect());
+  if (!mObserver)
+    return;
+
+  nsCOMPtr<imgIContainerObserver> containerObs(do_QueryReferent(mObserver));
+  if (containerObs) {
+    containerObs->FrameChanged(this, &nsIntRect::GetMaxSizedIntRect());
+  }
+
+  nsCOMPtr<imgIDecoderObserver> decoderObs(do_QueryReferent(mObserver));
+  if (decoderObs) {
+    decoderObs->OnStopFrame(nsnull, imgIContainer::FRAME_CURRENT);
   }
 }
 
 } // namespace imagelib
 } // namespace mozilla