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

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

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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/DragData.cpp
diff --git a/third_party/WebKit/Source/core/page/DragData.cpp b/third_party/WebKit/Source/core/page/DragData.cpp
index ddb2cb5fb564cc23d7e32fec1caaaad706c805d9..e828a904917579901cbd09b4794eebe5371b155f 100644
--- a/third_party/WebKit/Source/core/page/DragData.cpp
+++ b/third_party/WebKit/Source/core/page/DragData.cpp
@@ -83,7 +83,8 @@ void DragData::asFilePaths(Vector<String>& result) const
{
const Vector<String>& filenames = m_platformDragData->filenames();
for (size_t i = 0; i < filenames.size(); ++i) {
- if (!filenames[i].isEmpty())
+ // When the content cannot be read, the filenames will all be empty.
+ if (!m_platformDragData->canReadContent() || !filenames[i].isEmpty())
result.append(filenames[i]);
}
}

Powered by Google App Engine
This is Rietveld 408576698