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 9a98251a0e375223dae14098aef57c85805722a0..a15b406c5b15a00548d451f261a76345f65870ec 100644 |
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp |
@@ -208,6 +208,18 @@ void ImageResource::destroyDecodedDataIfPossible() |
m_image->destroyDecodedData(); |
} |
+void ImageResource::myPrune() |
+{ |
+ if (!m_image) |
+ return; |
+ if (hasCacheControlNoStoreHeader()) |
+ return; |
+ if (getStatus() != Resource::Cached) |
+ return; |
+ // Don't call clearImage(). Observers should be kept. |
+ m_image->clear(); |
+} |
+ |
void ImageResource::doResetAnimation() |
{ |
if (m_image) |
@@ -548,6 +560,13 @@ void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect |
notifyObservers(&rect); |
} |
+void ImageResource::requireReloading(const blink::Image* image) |
+{ |
+ for (auto* observer : m_finishedObservers.asVector()) { |
+ observer->requireReloading(); |
+ } |
+} |
+ |
void ImageResource::onePartInMultipartReceived(const ResourceResponse& response) |
{ |
ASSERT(m_multipartParser); |