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

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: Update Code 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 | « Source/core/fetch/ImageResource.h ('k') | Source/core/fetch/ImageResourceClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ImageResource.cpp
diff --git a/Source/core/fetch/ImageResource.cpp b/Source/core/fetch/ImageResource.cpp
index 49e7c4d8f1b2b0c87797ba5653bbe05455644262..fe3a1a173b7cbd0217fcbf23c55120519c5a8012 100644
--- a/Source/core/fetch/ImageResource.cpp
+++ b/Source/core/fetch/ImageResource.cpp
@@ -470,6 +470,18 @@ void ImageResource::animationAdvanced(const blink::Image* image)
notifyObservers();
}
+void ImageResource::imageAnimationPolicy(const blink::Image* image, ImageAnimationPolicy& policy)
+{
+ if (!image || image != m_image)
+ return;
+
+ ResourceClientWalker<ImageResourceClient> w(m_clients);
+ while (ImageResourceClient* c = w.next()) {
+ if (c->getImageAnimationPolicy(this, policy))
+ return;
+ }
+}
+
void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect)
{
if (!image || image != m_image)
« no previous file with comments | « Source/core/fetch/ImageResource.h ('k') | Source/core/fetch/ImageResourceClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698