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

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

Issue 754813002: Expose setting API to set ImageAnimationPolicy(Allowed, Once, None) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Support three options for animations Created 6 years, 1 month 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
Index: Source/platform/graphics/BitmapImage.cpp
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp
index 4db08d2ed6c632d5c5b1e9a03184e67758b00fb6..54e7127011a8bf9cfb3c62ac5bdb1c55b5d14f5b 100644
--- a/Source/platform/graphics/BitmapImage.cpp
+++ b/Source/platform/graphics/BitmapImage.cpp
@@ -583,7 +583,7 @@ bool BitmapImage::internalAdvanceAnimation(bool skippingFrames)
// See if anyone is still paying attention to this animation. If not, we don't
// advance and will remain suspended at the current frame until the animation is resumed.
- if (!skippingFrames && imageObserver()->shouldPauseAnimation(this))
+ if (!skippingFrames && imageObserver()->shouldPauseAnimation(this, m_currentFrame == frameCount()-1))
dmazzoni 2014/11/24 17:50:48 spaces around the minus sign: frameCount() - 1
je_julie(Not used) 2014/11/27 17:22:50 Done.
return false;
++m_currentFrame;

Powered by Google App Engine
This is Rietveld 408576698