[Webkit-unassigned] [Bug 200297] [GTK] Cannot disable drag-and-drop functionality with gtk_drag_source_set()/gtk_drag_source_unset() inside a WebKitWebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 31 08:52:31 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=200297

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at igalia.com
            Summary|Cannot disable              |[GTK] Cannot disable
                   |drag-and-drop functionality |drag-and-drop functionality
                   |inside a WebView            |with
                   |                            |gtk_drag_source_set()/gtk_d
                   |                            |rag_source_unset() inside a
                   |                            |WebKitWebView

--- Comment #2 from Michael Catanzaro <mcatanzaro at igalia.com> ---
(In reply to Jussi from comment #0)
> This should create a custom Gtk::TargetEntry list which is allowed to copy
> data from the widget. However, after setting this drag_source_set(), the
> program aborts because an assert fails in the
> webkitWebViewBaseDragEnd(GtkWidget* widget, GdkDragContext* context)
> function inside WebKitWebViewBase.cpp
> (https://trac.webkit.org/browser/webkit/releases/WebKitGTK/webkit-2.25.1/
> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp#L1281). Seems like
> calling "drag_source_set()" on a WebView nullifies some internal structure
> (WebKitWebViewBasePrivate->dragAndDropHandler).

Good bug report... I guess we didn't consider that applications could use these functions. Of course using GTK public APIs shouldn't cause WebKit to crash, so we'll need to reconsider these assertions.

(In reply to Jussi from comment #1)
> It seems like the same thing has been asked before, and the resolution to
> the "bug" last time was to make WebView widget honour the
> gtk-dnd-drag-threshold setting which can be set inside the widget's
> GtkSettings struct.
> 
> The old bug can be found from: https://bugs.webkit.org/show_bug.cgi?id=64459
> 
> At least I cannot get it working with following code:
> 
> Glib::RefPtr<Gtk::Settings> settings = webWidget->get_settings();
> settings->property_gtk_dnd_drag_threshold() = 100000;

Well that old patch was never committed. The bug is still open.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190731/864b6c4d/attachment-0001.html>


More information about the webkit-unassigned mailing list