Bug 1132427. Make sure that the first frame refresh area for an animated image gets updated based on the refresh area of all subsequent frames, not just the second. r=jrmuizel
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 13 Feb 2015 02:26:41 -0600
changeset 228927 109c66867717f8b861cf6cb3f51e1894be431e60
parent 228926 cfdcb37cc953c4655213e04bd921328b618799ad
child 228928 c81728bfda79529ea31c42a6e7467b854e9baddf
push idunknown
push userunknown
push dateunknown
reviewersjrmuizel
bugs1132427
milestone38.0a1
Bug 1132427. Make sure that the first frame refresh area for an animated image gets updated based on the refresh area of all subsequent frames, not just the second. r=jrmuizel
image/src/RasterImage.cpp
--- a/image/src/RasterImage.cpp
+++ b/image/src/RasterImage.cpp
@@ -930,20 +930,19 @@ RasterImage::OnAddedFrame(uint32_t aNewF
       // mid-decode, and thus we're decoding out of the source buffer. Since we're
       // going to fix this anyway later, and since we didn't kill the source data
       // in the old world either, locking is acceptable for the moment.
       LockImage();
 
       if (mPendingAnimation && ShouldAnimate()) {
         StartAnimation();
       }
-
-      if (aNewFrameCount > 1) {
-        mAnim->UnionFirstFrameRefreshArea(aNewRefreshArea);
-      }
+    }
+    if (aNewFrameCount > 1) {
+      mAnim->UnionFirstFrameRefreshArea(aNewRefreshArea);
     }
   }
 }
 
 nsresult
 RasterImage::SetSize(int32_t aWidth, int32_t aHeight, Orientation aOrientation)
 {
   MOZ_ASSERT(NS_IsMainThread());