| 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 eecb2c080c139bd28ade22a7243cbe3f56d89a07..b3ce097b53dcffaee4a190cd0c5e20353db3e50e 100644
|
| --- a/third_party/WebKit/Source/core/loader/resource/ImageResource.h
|
| +++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.h
|
| @@ -70,8 +70,9 @@ class CORE_EXPORT ImageResource final
|
| ImageResourceContent* getContent();
|
| const ImageResourceContent* getContent() const;
|
|
|
| - void reloadIfLoFiOrPlaceholderImage(ResourceFetcher*,
|
| - ReloadLoFiOrPlaceholderPolicy);
|
| + ImageResource* reloadIfLoFiOrPlaceholderImage(
|
| + ResourceFetcher*,
|
| + ReloadLoFiOrPlaceholderPolicy) override;
|
|
|
| void didAddClient(ResourceClient*) override;
|
|
|
| @@ -81,10 +82,11 @@ class CORE_EXPORT ImageResource final
|
|
|
| PassRefPtr<const SharedBuffer> resourceBuffer() const override;
|
| void appendData(const char*, size_t) override;
|
| - void error(const ResourceError&) override;
|
| + void error(const ResourceError&, ResourceFetcher* fetcherForReload) override;
|
| void responseReceived(const ResourceResponse&,
|
| std::unique_ptr<WebDataConsumerHandle>) override;
|
| - void finish(double finishTime = 0.0) override;
|
| + void finish(double finishTime = 0.0,
|
| + ResourceFetcher* fetcherForReload = nullptr) override;
|
|
|
| // For compatibility, images keep loading even if there are HTTP errors.
|
| bool shouldIgnoreHTTPStatusCodeErrors() const override { return true; }
|
| @@ -125,8 +127,6 @@ class CORE_EXPORT ImageResource final
|
|
|
| void updateImageAndClearBuffer();
|
|
|
| - void checkNotify() override;
|
| -
|
| void destroyDecodedDataIfPossible() override;
|
| void destroyDecodedDataForFailedRevalidation() override;
|
|
|
| @@ -135,7 +135,8 @@ class CORE_EXPORT ImageResource final
|
| // new image creation.
|
| void updateImage(PassRefPtr<SharedBuffer>,
|
| ImageResourceContent::UpdateImageOption,
|
| - bool allDataReceived);
|
| + bool allDataReceived,
|
| + ResourceFetcher* fetcherForReload = nullptr);
|
| void flushImageIfNeeded(TimerBase*);
|
|
|
| bool shouldReloadBrokenPlaceholder() const {
|
| @@ -144,6 +145,8 @@ class CORE_EXPORT ImageResource final
|
|
|
| bool willPaintBrokenImage() const;
|
|
|
| + void detachContent();
|
| +
|
| Member<ImageResourceContent> m_content;
|
|
|
| // Indicates whether updateImage() is called for this resource, or for this
|
| @@ -161,10 +164,6 @@ class CORE_EXPORT ImageResource final
|
| MultipartParsingState::WaitingForFirstPart;
|
| bool m_hasDevicePixelRatioHeaderValue;
|
|
|
| - // Indicates if the ImageResource is currently scheduling a reload, e.g.
|
| - // because reloadIfLoFi() was called.
|
| - bool m_isSchedulingReload;
|
| -
|
| // Indicates if this ImageResource is either attempting to load a placeholder
|
| // image, or is a (possibly broken) placeholder image.
|
| bool m_isPlaceholder;
|
|
|