Index: Source/platform/graphics/BitmapImage.cpp |
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp |
index e80ebe3106ad8ba91036a34e0dc1a81278c77e95..2f55a9990214832b73ca1711078be29a90be978f 100644 |
--- a/Source/platform/graphics/BitmapImage.cpp |
+++ b/Source/platform/graphics/BitmapImage.cpp |
@@ -443,7 +443,10 @@ bool BitmapImage::shouldAnimate() |
{ |
bool animated = repetitionCount(false) != cAnimationNone && !m_animationFinished && imageObserver(); |
if (imageObserver()) { |
+ ImageAnimationPolicy oldPolicy = m_animationPolicy; |
imageObserver()->imageAnimationPolicy(this, m_animationPolicy); |
+ if (oldPolicy != m_animationPolicy) |
+ resetAnimation(); |
if (animated && m_animationPolicy == ImageAnimationPolicyNoAnimation) |
animated = false; |
} |