diff options
author | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-23 22:45:18 +0000 |
---|---|---|
committer | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-23 22:45:18 +0000 |
commit | b72a9890148a2f3d48e715af574bafc24a3ad7b2 (patch) | |
tree | 650f288d19be3dcb58444b5fec861ef8bf049bb9 /content/browser/browser_plugin/browser_plugin_embedder.cc | |
parent | bf74ff88f6c227d334292fef05b9840acb4826f6 (diff) | |
download | chromium_src-b72a9890148a2f3d48e715af574bafc24a3ad7b2.zip chromium_src-b72a9890148a2f3d48e715af574bafc24a3ad7b2.tar.gz chromium_src-b72a9890148a2f3d48e715af574bafc24a3ad7b2.tar.bz2 |
<webview>: Fix incomplete drag operation to not make guest go stale.
If a drag starts in a <webview> and the drag source is not dropped to a
target within the same <webview>, then this makes the <webview> go stale
and not appear to accept any further inputs.
This is because the SystemDragEnded() message is not passed to the guest
RVH. The fix is to make SystemDragEnded() to be called.
This is a winaura only issue because of the order of the following two
methods:
1. BrowserPluginGuest::OnDragStatusUpdate() and
2. WebContents::SystemDragEnded().
On winaura, #2 is seen before DragLeave message appears from #1, where as
for gtk, we see DragLeave message in #1 first and then #2.
BUG=332362
Test=Load an app with <webview> where you can select some text within the
<webview>. Now start dragging the text but keep the cursor within the bounds
of the guest and release the mouse to prematurely end the drag on a non
target. Now re-selecting text/focusing any input box in the <webview> should
work.
Review URL: https://codereview.chromium.org/143943008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246708 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_plugin/browser_plugin_embedder.cc')
-rw-r--r-- | content/browser/browser_plugin/browser_plugin_embedder.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc index 2160f23..e778efb 100644 --- a/content/browser/browser_plugin/browser_plugin_embedder.cc +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc @@ -173,8 +173,10 @@ void BrowserPluginEmbedder::DragSourceMovedTo(int client_x, int client_y, } void BrowserPluginEmbedder::SystemDragEnded() { - if (guest_started_drag_.get() && - (guest_started_drag_.get() != guest_dragging_over_.get())) + // When the embedder's drag/drop operation ends, we need to pass the message + // to the guest that initiated the drag/drop operation. This will ensure that + // the guest's RVH state is reset properly. + if (guest_started_drag_.get()) guest_started_drag_->EndSystemDrag(); guest_started_drag_.reset(); guest_dragging_over_.reset(); |