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

Unified Diff: Source/core/fetch/ImageResource.cpp

Issue 1120963003: Implements getImageAnimationPolicy() at ImageLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months 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 | Source/platform/graphics/ImageAnimationPolicy.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 61ba6527e741ecb0fb573845da6e9cbcc070d6bc..084746f1826ea2ef5981a2aa52078c4a47c36dfa 100644
--- a/Source/core/fetch/ImageResource.cpp
+++ b/Source/core/fetch/ImageResource.cpp
@@ -103,6 +103,8 @@ void ImageResource::didAddClient(ResourceClient* c)
if (m_image && !m_image->isNull())
static_cast<ImageResourceClient*>(c)->imageChanged(this);
+ if (m_image && m_image->animationPolicy() == ImageAnimationPolicyInvalid)
+ updateImageAnimationPolicy();
Resource::didAddClient(c);
}
@@ -433,7 +435,7 @@ void ImageResource::updateImageAnimationPolicy()
if (!m_image)
return;
- ImageAnimationPolicy newPolicy = ImageAnimationPolicyAllowed;
+ ImageAnimationPolicy newPolicy = ImageAnimationPolicyInvalid;
ResourceClientWalker<ImageResourceClient> w(m_clients);
while (ImageResourceClient* c = w.next()) {
if (c->getImageAnimationPolicy(this, newPolicy))
« no previous file with comments | « no previous file | Source/platform/graphics/ImageAnimationPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698