Changeset 269505 in webkit
- Timestamp:
- Nov 6, 2020 1:09:31 AM (3 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r269504 r269505 1 2020-11-06 Milan Crha <mcrha@redhat.com> 2 3 [GTK] Application cannot override drag&drop callbacks 4 https://bugs.webkit.org/show_bug.cgi?id=218562 5 6 Reviewed by Michael Catanzaro. 7 8 * UIProcess/API/gtk/DropTargetGtk3.cpp: 9 (WebKit::DropTarget::DropTarget): Use g_signal_connect_after(), thus 10 any descendants can override the callbacks. 11 (WebKit::DropTarget::didPerformAction): Always call gdk_drag_status(), 12 to have gtk+ notified about drag progress. 13 1 14 2020-11-06 Michael Catanzaro <mcatanzaro@gnome.org> 2 15 -
trunk/Source/WebKit/UIProcess/API/gtk/DropTargetGtk3.cpp
r265756 r269505 57 57 gtk_drag_dest_set_target_list(m_webView, list.get()); 58 58 59 g_signal_connect (m_webView, "drag-motion", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, gint x, gint y, guint time, gpointer userData) -> gboolean {60 auto& drop = *static_cast<DropTarget*>(userData); 61 if ( !drop.m_drop) {59 g_signal_connect_after(m_webView, "drag-motion", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, gint x, gint y, guint time, gpointer userData) -> gboolean { 60 auto& drop = *static_cast<DropTarget*>(userData); 61 if (drop.m_drop != context) { 62 62 drop.m_drop = context; 63 63 drop.m_position = IntPoint(x, y); … … 68 68 }), this); 69 69 70 g_signal_connect (m_webView, "drag-leave", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, guint time, gpointer userData) {70 g_signal_connect_after(m_webView, "drag-leave", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, guint time, gpointer userData) { 71 71 auto& drop = *static_cast<DropTarget*>(userData); 72 72 if (drop.m_drop != context) … … 75 75 }), this); 76 76 77 g_signal_connect (m_webView, "drag-drop", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, gint x, gint y, guint time, gpointer userData) -> gboolean {77 g_signal_connect_after(m_webView, "drag-drop", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, gint x, gint y, guint time, gpointer userData) -> gboolean { 78 78 auto& drop = *static_cast<DropTarget*>(userData); 79 79 if (drop.m_drop != context) { … … 85 85 }), this); 86 86 87 g_signal_connect (m_webView, "drag-data-received", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, gint x, gint y, GtkSelectionData* data, guint info, guint time, gpointer userData) {87 g_signal_connect_after(m_webView, "drag-data-received", G_CALLBACK(+[](GtkWidget*, GdkDragContext* context, gint x, gint y, GtkSelectionData* data, guint info, guint time, gpointer userData) { 88 88 auto& drop = *static_cast<DropTarget*>(userData); 89 89 if (drop.m_drop != context) … … 231 231 ASSERT(page); 232 232 233 auto operation = page->currentDragOperation(); 234 if (operation == m_operation) 235 return; 236 237 m_operation = operation; 233 m_operation = page->currentDragOperation(); 234 238 235 gdk_drag_status(m_drop.get(), dragOperationToSingleGdkDragAction(m_operation), GDK_CURRENT_TIME); 239 236 }
Note: See TracChangeset
for help on using the changeset viewer.