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

Unified Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 2242173005: End the drag and drop operation properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_android.cc
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc
index 33e714ea869ec8b75d5aead4c2d1ee9e479fba31..c5a8e50c394792bbc20cff34d5859c6d7806178d 100644
--- a/content/browser/web_contents/web_contents_view_android.cc
+++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -234,12 +234,18 @@ void WebContentsViewAndroid::StartDragging(
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
const DragEventSourceInfo& event_info) {
- if (drop_data.text.is_null())
+ if (drop_data.text.is_null()) {
+ // Need to clear drag and drop state in blink.
+ OnDragEnded();
return;
+ }
gfx::NativeView native_view = GetNativeView();
- if (!native_view)
+ if (!native_view) {
+ // Need to clear drag and drop state in blink.
+ OnDragEnded();
return;
+ }
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jstring> jtext =
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698