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
--- 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());