diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index ff5c4bcc534e..73dc5523dbf8 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -617,7 +617,8 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect) NS_WARNING("RasterImage::AdvanceFrame(): Compositing of frame failed"); nextFrame->SetCompositingFailed(true); mAnim->currentAnimationFrameIndex = nextFrameIndex; - mAnim->currentAnimationFrameTime = aTime; + mAnim->currentAnimationFrameTime = mAnim->currentAnimationFrameTime + + TimeDuration::FromMilliseconds(timeout); return false; } @@ -626,7 +627,8 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect) // Set currentAnimationFrameIndex at the last possible moment mAnim->currentAnimationFrameIndex = nextFrameIndex; - mAnim->currentAnimationFrameTime = aTime; + mAnim->currentAnimationFrameTime = mAnim->currentAnimationFrameTime + + TimeDuration::FromMilliseconds(timeout); return true; }