Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: third_party/WebKit/Source/core/loader/ImageLoader.h

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/ImageLoader.h
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.h b/third_party/WebKit/Source/core/loader/ImageLoader.h
index 5f9d444beb4bb00a3e9bd7f3d9e670ec63c31d1e..5f9258c8b46adc298367cccf2737d25b49d0bf8f 100644
--- a/third_party/WebKit/Source/core/loader/ImageLoader.h
+++ b/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -25,6 +25,7 @@
#include "core/CoreExport.h"
#include "core/fetch/ImageResource.h"
+#include "core/fetch/ImageResourceContent.h"
#include "core/fetch/ImageResourceObserver.h"
#include "platform/heap/Handle.h"
#include "wtf/HashSet.h"
@@ -82,9 +83,12 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
Element* element() const { return m_element; }
bool imageComplete() const { return m_imageComplete && !m_pendingTask; }
- ImageResource* image() const { return m_image.get(); }
+ ImageResourceContent* image() const { return m_image.get(); }
+ ImageResource* imageResourceForImageDocument() const {
+ return m_imageResourceForImageDocument;
+ }
// Cancels pending load events, and doesn't dispatch new ones.
- void setImage(ImageResource*);
+ void setImage(ImageResourceContent*);
bool isLoadingImageDocument() { return m_loadingImageDocument; }
void setLoadingImageDocument() { m_loadingImageDocument = true; }
@@ -105,7 +109,7 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
bool getImageAnimationPolicy(ImageAnimationPolicy&) final;
protected:
- void imageNotifyFinished(ImageResource*) override;
+ void imageNotifyFinished(ImageResourceContent*) override;
private:
class Task;
@@ -127,7 +131,7 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
LayoutImageResource* layoutImageResource();
void updateLayoutObject();
- void setImageWithoutConsideringPendingLoadEvent(ImageResource*);
+ void setImageWithoutConsideringPendingLoadEvent(ImageResourceContent*);
void clearFailedLoadURL();
void dispatchErrorEvent();
void crossSiteOrCSPViolationOccurred(AtomicString);
@@ -149,7 +153,8 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
void dispose();
Member<Element> m_element;
- Member<ImageResource> m_image;
+ Member<ImageResourceContent> m_image;
+ Member<ImageResource> m_imageResourceForImageDocument;
// FIXME: Oilpan: We might be able to remove this Persistent hack when
// ImageResourceClient is traceable.
GC_PLUGIN_IGNORE("http://crbug.com/383741")

Powered by Google App Engine
This is Rietveld 408576698