Index: third_party/WebKit/Source/core/fetch/ImageResource.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
index fd5471d4645e1b3c93dbedc24c80e7cfab4f37c4..9eb384612948b7bc2a2cdca13adcc1340b477c57 100644 |
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
@@ -297,6 +297,10 @@ void ImageResource::notifyObservers(const IntRect* changeRect) |
ResourceClientWalker<ImageResourceClient> w(m_clients); |
while (ImageResourceClient* c = w.next()) |
c->imageChanged(this, changeRect); |
+ |
+ ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); |
+ while (ImageResourceClient* c = w2.next()) |
+ c->imageChanged(this, changeRect); |
} |
void ImageResource::clear() |
@@ -396,15 +400,15 @@ void ImageResource::responseReceived(const ResourceResponse& response, PassOwnPt |
{ |
if (loadingMultipartContent() && m_data) |
finishOnePart(); |
+ Resource::responseReceived(response, handle); |
if (RuntimeEnabledFeatures::clientHintsEnabled()) { |
- m_devicePixelRatioHeaderValue = response.httpHeaderField("content-dpr").toFloat(&m_hasDevicePixelRatioHeaderValue); |
+ m_devicePixelRatioHeaderValue = m_response.httpHeaderField("content-dpr").toFloat(&m_hasDevicePixelRatioHeaderValue); |
if (!m_hasDevicePixelRatioHeaderValue || m_devicePixelRatioHeaderValue <= 0.0) { |
m_devicePixelRatioHeaderValue = 1.0; |
m_hasDevicePixelRatioHeaderValue = false; |
} |
} |
- Resource::responseReceived(response, handle); |
} |
void ImageResource::decodedSizeChanged(const blink::Image* image, int delta) |
@@ -437,6 +441,12 @@ bool ImageResource::shouldPauseAnimation(const blink::Image* image) |
return false; |
} |
+ ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); |
+ while (ImageResourceClient* c = w2.next()) { |
+ if (c->willRenderImage(this)) |
+ return false; |
+ } |
+ |
return true; |
} |
@@ -459,6 +469,12 @@ void ImageResource::updateImageAnimationPolicy() |
break; |
} |
+ ResourceClientWalker<ImageResourceClient> w2(m_finishedClients); |
+ while (ImageResourceClient* c = w2.next()) { |
+ if (c->getImageAnimationPolicy(this, newPolicy)) |
+ break; |
+ } |
+ |
if (m_image->animationPolicy() != newPolicy) { |
m_image->resetAnimation(); |
m_image->setAnimationPolicy(newPolicy); |