Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1312)

Unified Diff: Source/platform/graphics/BitmapImage.cpp

Issue 777013003: Reset animation state when animation policy is changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698