diff options
author | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 02:38:03 +0000 |
---|---|---|
committer | arv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 02:38:03 +0000 |
commit | 5f9ae6c55bb6cf325bcd85465a370d7fc32bd47a (patch) | |
tree | bb9b9e7c5ef78e47dafb968bea5491ca54d2965b /chrome/renderer/render_view.cc | |
parent | 8f04ff93eba6678ed17b7157f805212d9438507b (diff) | |
download | chromium_src-5f9ae6c55bb6cf325bcd85465a370d7fc32bd47a.zip chromium_src-5f9ae6c55bb6cf325bcd85465a370d7fc32bd47a.tar.gz chromium_src-5f9ae6c55bb6cf325bcd85465a370d7fc32bd47a.tar.bz2 |
Make the cancelling of drag and drop match Safari for Windows. This is
a follow up CL to http://codereview.chromium.org/149038 as well as to
https://bugs.webkit.org/show_bug.cgi?id=26699
With this change we use DragOperationNone (instead of DragOperationCopy)
and NoButton (instead of LeftButton) when the user presses Escape.
BUG=12018
TEST=On the new new tab page drag one of the thumbnails out of the
window and press escape. The thumbnail should move back to its starting
position.
Review URL: http://codereview.chromium.org/149296
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 8e6fab8..58328f6 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2442,11 +2442,15 @@ void RenderView::OnReservePageIDRange(int size_of_range) { void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point, const gfx::Point& screen_point, - bool ended) { - if (ended) - webview()->DragSourceEndedAt(client_point, screen_point); - else + bool ended, bool cancelled) { + if (ended) { + if (cancelled) + webview()->DragSourceCancelledAt(client_point, screen_point); + else + webview()->DragSourceEndedAt(client_point, screen_point); + } else { webview()->DragSourceMovedTo(client_point, screen_point); + } } void RenderView::OnDragSourceSystemDragEnded() { |