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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataTransfer.cpp

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/clipboard/DataTransfer.cpp
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
index efaf6f2a54e1c6cc9781a7c67e9fc0a05562ce89..953afd59be56d42f3473caeda80a532db73fe9fd 100644
--- a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
@@ -32,7 +32,7 @@
#include "core/editing/EphemeralRange.h"
#include "core/editing/FrameSelection.h"
#include "core/editing/serializers/Serialization.h"
-#include "core/fetch/ImageResource.h"
+#include "core/fetch/ImageResourceContent.h"
#include "core/fileapi/FileList.h"
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLImageElement.h"
@@ -228,7 +228,7 @@ void DataTransfer::clearDragImage() {
m_dragImageElement = nullptr;
}
-void DataTransfer::setDragImageResource(ImageResource* img,
+void DataTransfer::setDragImageResource(ImageResourceContent* img,
const IntPoint& loc) {
setDragImage(img, 0, loc);
}
@@ -252,8 +252,8 @@ std::unique_ptr<DragImage> DataTransfer::createDragImage(
return nullptr;
}
-static ImageResource* getImageResource(Element* element) {
- // Attempt to pull ImageResource from element
+static ImageResourceContent* getImageResourceContent(Element* element) {
+ // Attempt to pull ImageResourceContent from element
ASSERT(element);
LayoutObject* layoutObject = element->layoutObject();
if (!layoutObject || !layoutObject->isImage())
@@ -270,7 +270,7 @@ static void writeImageToDataObject(DataObject* dataObject,
Element* element,
const KURL& url) {
// Shove image data into a DataObject for use as a file
- ImageResource* cachedImage = getImageResource(element);
+ ImageResourceContent* cachedImage = getImageResourceContent(element);
if (!cachedImage || !cachedImage->getImage() || !cachedImage->isLoaded())
return;
@@ -449,7 +449,7 @@ DataTransfer::DataTransfer(DataTransferType type,
m_transferType(type),
m_dataObject(dataObject) {}
-void DataTransfer::setDragImage(ImageResource* image,
+void DataTransfer::setDragImage(ImageResourceContent* image,
Node* node,
const IntPoint& loc) {
if (!canSetDragImage())
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataTransfer.h ('k') | third_party/WebKit/Source/core/css/CSSCrossfadeValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698