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

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

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: style Created 4 years 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 f37edbc97e6887e1afec04e3c17f98de477d6068..5db73d047e8ab166f737e7b9bdf6d3e2ffcb1af8 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"
@@ -81,9 +82,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; }
@@ -104,7 +108,7 @@ class CORE_EXPORT ImageLoader : public GarbageCollectedFinalized<ImageLoader>,
bool getImageAnimationPolicy(ImageAnimationPolicy&) final;
protected:
- void imageNotifyFinished(ImageResource*) override;
+ void imageNotifyFinished(ImageResourceContent*) override;
private:
class Task;
@@ -126,7 +130,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);
@@ -148,7 +152,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")
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698