Index: third_party/WebKit/Source/core/loader/resource/ImageResource.h |
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResource.h b/third_party/WebKit/Source/core/loader/resource/ImageResource.h |
index 3872761ac4bf6f0448d118f47e8bff1a1a5c7a16..4e6fcede77f530b6511ca1791a6f91ba16096581 100644 |
--- a/third_party/WebKit/Source/core/loader/resource/ImageResource.h |
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.h |
@@ -25,6 +25,7 @@ |
#include "core/CoreExport.h" |
#include "core/fetch/Resource.h" |
+#include "core/loader/resource/ImageResourceContent.h" |
#include "core/loader/resource/ImageResourceInfo.h" |
#include "core/loader/resource/MultipartImageResourceParser.h" |
#include "platform/Timer.h" |
@@ -129,6 +130,12 @@ class CORE_EXPORT ImageResource final |
void destroyDecodedDataIfPossible() override; |
void destroyDecodedDataForFailedRevalidation() override; |
+ // When UpdateImageOption is UpdateImage but this is the first |
+ // updateImage() call, then ClearAndUpdateImage is used instead to enforce |
+ // new image creation. |
+ void updateImage(PassRefPtr<SharedBuffer>, |
+ ImageResourceContent::UpdateImageOption, |
+ bool allDataReceived); |
void flushImageIfNeeded(TimerBase*); |
bool shouldReloadBrokenPlaceholder() const { |
@@ -139,6 +146,10 @@ class CORE_EXPORT ImageResource final |
Member<ImageResourceContent> m_content; |
+ // Indicates we should clear the image (and then create a new image) in the |
+ // next updateImage() call. |
+ bool m_shouldEnforceClearImage = true; |
+ |
// TODO(hiroshige): move |m_devicePixelRatioHeaderValue| and |
// |m_hasDevicePixelRatioHeaderValue| to ImageResourceContent and update |
// it via ImageResourceContent::updateImage(). |