diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 22:52:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 22:52:15 +0000 |
commit | 450f30579b71d9829f39f1e2e13990192c397f6a (patch) | |
tree | 3caddb73e8d6dbda0b53db3d7d7dc025fb909af0 /chrome | |
parent | c27324bdb7b9ee448a0c73d5c005c709282c8cbc (diff) | |
download | chromium_src-450f30579b71d9829f39f1e2e13990192c397f6a.zip chromium_src-450f30579b71d9829f39f1e2e13990192c397f6a.tar.gz chromium_src-450f30579b71d9829f39f1e2e13990192c397f6a.tar.bz2 |
Linux: tell webkit to permit WebDragOperationMove drags.
BUG=28235
TEST=drag text between two text fields in a web page, e.g. google.com search results page has two <input>s. The dragged text should Move (not Copy) from one to the other.
Review URL: http://codereview.chromium.org/414009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/tab_contents/web_drag_dest_gtk.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/web_drag_dest_gtk.cc b/chrome/browser/tab_contents/web_drag_dest_gtk.cc index 279e47d..390729d 100644 --- a/chrome/browser/tab_contents/web_drag_dest_gtk.cc +++ b/chrome/browser/tab_contents/web_drag_dest_gtk.cc @@ -13,6 +13,7 @@ using WebKit::WebDragOperation; using WebKit::WebDragOperationCopy; +using WebKit::WebDragOperationMove; using WebKit::WebDragOperationNone; WebDragDestGtk::WebDragDestGtk(TabContents* tab_contents, GtkWidget* widget) @@ -48,7 +49,6 @@ void WebDragDestGtk::UpdateDragStatus(WebDragOperation operation) { // but that would increase the cost of getting our drag success guess // wrong. is_drop_target_ = operation != WebDragOperationNone; - // TODO(snej): Pass appropriate GDK action instead of hardcoding COPY gdk_drag_status(context_, is_drop_target_ ? GDK_ACTION_COPY : static_cast<GdkDragAction>(0), drag_over_time_); @@ -83,7 +83,8 @@ gboolean WebDragDestGtk::OnDragMotion(GdkDragContext* context, gint x, gint y, tab_contents_->render_view_host()-> DragTargetDragOver(gtk_util::ClientPoint(widget_), gtk_util::ScreenPoint(widget_), - WebDragOperationCopy); + static_cast<WebDragOperation>( + WebDragOperationCopy | WebDragOperationMove)); // TODO(snej): Pass appropriate DragOperation instead of hardcoding drag_over_time_ = time; } @@ -148,7 +149,8 @@ void WebDragDestGtk::OnDragDataReceived( DragTargetDragEnter(*drop_data_.get(), gtk_util::ClientPoint(widget_), gtk_util::ScreenPoint(widget_), - WebDragOperationCopy); + static_cast<WebDragOperation>( + WebDragOperationCopy | WebDragOperationMove)); // TODO(snej): Pass appropriate DragOperation instead of hardcoding drag_over_time_ = time; } |