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

Unified Diff: third_party/WebKit/Source/core/page/DragController.cpp

Issue 2423683002: Add Blink support for showing image placeholders using range requests. (Closed)
Patch Set: Addressed comments Created 4 years, 2 months 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/page/DragController.cpp
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp
index 25bb2766bf30cd9a58a8ece2b74f73aa08a7c43d..bbe7e5c1e3bd0709acf1a4fdc25bd39fb57bb3af 100644
--- a/third_party/WebKit/Source/core/page/DragController.cpp
+++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -69,6 +69,7 @@
#include "core/page/DragState.h"
#include "core/page/Page.h"
#include "platform/DragImage.h"
+#include "platform/SharedBuffer.h"
#include "platform/geometry/IntRect.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/BitmapImage.h"
@@ -84,6 +85,7 @@
#include "public/platform/WebScreenInfo.h"
#include "wtf/Assertions.h"
#include "wtf/CurrentTime.h"
+#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
#include <memory>
@@ -1062,7 +1064,7 @@ bool DragController::startDrag(LocalFrame* src,
return false;
Element* element = toElement(node);
Image* image = getImage(element);
- if (!image || image->isNull())
+ if (!image || image->isNull() || !image->data() || !image->data()->size())
return false;
// We shouldn't be starting a drag for an image that can't provide an
// extension.

Powered by Google App Engine
This is Rietveld 408576698