| Index: Source/core/fetch/ImageResource.cpp
|
| diff --git a/Source/core/fetch/ImageResource.cpp b/Source/core/fetch/ImageResource.cpp
|
| index 519dbfd352fd9e3a6e7fb3825fdcc0af19897447..4f2ee2546d13de09df08585e976a43d7c68fde97 100644
|
| --- a/Source/core/fetch/ImageResource.cpp
|
| +++ b/Source/core/fetch/ImageResource.cpp
|
| @@ -473,15 +473,21 @@ void ImageResource::animationAdvanced(const blink::Image* image)
|
| notifyObservers();
|
| }
|
|
|
| -void ImageResource::imageAnimationPolicy(const blink::Image* image, ImageAnimationPolicy& policy)
|
| +void ImageResource::updateImageAnimationPolicy()
|
| {
|
| - if (!image || image != m_image)
|
| + if (!m_image)
|
| return;
|
|
|
| + ImageAnimationPolicy newPolicy = ImageAnimationPolicyAllowed;
|
| ResourceClientWalker<ImageResourceClient> w(m_clients);
|
| while (ImageResourceClient* c = w.next()) {
|
| - if (c->getImageAnimationPolicy(this, policy))
|
| - return;
|
| + if (c->getImageAnimationPolicy(this, newPolicy))
|
| + break;
|
| + }
|
| +
|
| + if (m_image->animationPolicy() != newPolicy) {
|
| + m_image->resetAnimation();
|
| + m_image->setAnimationPolicy(newPolicy);
|
| }
|
| }
|
|
|
|
|