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

Unified Diff: Source/core/fetch/ImageResource.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/core/fetch/ImageResource.cpp
diff --git a/Source/core/fetch/ImageResource.cpp b/Source/core/fetch/ImageResource.cpp
index d9ff30ef476438acf333699122cd794db084e2b9..e4ed9d6655a325799763ad9bc13c569ebce38b1f 100644
--- a/Source/core/fetch/ImageResource.cpp
+++ b/Source/core/fetch/ImageResource.cpp
@@ -449,14 +449,14 @@ void ImageResource::didDraw(const blink::Image* image)
Resource::didAccessDecodedData();
}
-bool ImageResource::shouldPauseAnimation(const blink::Image* image)
+bool ImageResource::shouldPauseAnimation(const blink::Image* image, bool repeated)
{
if (!image || image != m_image)
return false;
ResourceClientWalker<ImageResourceClient> w(m_clients);
while (ImageResourceClient* c = w.next()) {
- if (c->willRenderImage(this))
+ if (c->willRenderImage(this, repeated))
return false;
}

Powered by Google App Engine
This is Rietveld 408576698