<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>218163</bug_id>
          
          <creation_ts>2020-10-25 13:13:34 -0700</creation_ts>
          <short_desc>[GTK] drag-drop not received anymore</short_desc>
          <delta_ts>2020-11-06 01:00:18 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>218562</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sebastien">amarok</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bandali</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>clopez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1701322</commentid>
    <comment_count>0</comment_count>
    <who name="Sebastien">amarok</who>
    <bug_when>2020-10-25 13:13:34 -0700</bug_when>
    <thetext>Hi,

I currently develop an application with gtkwebkit. 2 years ago we add support for drag &amp; dropping files into the webview, by connecting the webview with:

    g_signal_connect(priv-&gt;webview_chat, &quot;drag-data-received&quot;, G_CALLBACK(webview_chat_on_drag_data_received), view);
    g_signal_connect(priv-&gt;webview_chat, &quot;drag-drop&quot;, G_CALLBACK(webview_chat_on_drag_data), view);

On recent versions, this code is not working anymore for 2 reasons:

1. The drag&amp;drop looks handled by the webview, and instead of launching drag-drop, the webview is loading the file, triggering &quot;decide-policy&quot; with WEBKIT_POLICY_DECISION_TYPE_RESPONSE
2. So &quot;drag-drop&quot; is not emitted, even if I do a             webkit_policy_decision_ignore(decision); for WEBKIT_POLICY_DECISION_TYPE_RESPONSE, and the decide-policy is only triggered once.

So, 2 possibillites:

+ Add a setting in WebkitSettings to avoid this behavior. I don&apos;t know when it was introduced, but 2 years ago it was not like this (http://www.manpagez.com/html/webkitgtk/webkitgtk-2.4.10/WebKitWebSettings.php)
This is what I use:

    WebKitSettings* webkit_settings = webkit_settings_new_with_settings(
        &quot;enable-javascript&quot;, TRUE,
        &quot;enable-developer-extras&quot;, priv-&gt;chatview_debug,
        &quot;enable-java&quot;, FALSE,
        &quot;enable-plugins&quot;, FALSE,
        &quot;enable-site-specific-quirks&quot;, FALSE,
        &quot;enable-smooth-scrolling&quot;, TRUE,
        NULL
    );



+ be able to connect &quot;drag-drop&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1701447</commentid>
    <comment_count>1</comment_count>
    <who name="Sebastien">amarok</who>
    <bug_when>2020-10-26 07:26:02 -0700</bug_when>
    <thetext>In fact it&apos;s definitely a very new bug.

I don&apos;t have the bug on Ubuntu 20.04 but present on Ubuntu 20.10, and same for Fedora, it&apos;s present on my fedora updated the last week-end, but not the one updated 2 months ago</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1702226</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-10-27 21:06:00 -0700</bug_when>
    <thetext>If you can translate versions of Ubuntu/Fedora to versions of WebKitGTK that would be helpful for WebKitGTK developers to understand easier when this new behavior was introduced

I understand Ubuntu-20.04 ships WebKitGTK 2.28.4 and Ubuntu-20.10 WebKitGTK 2.30.1

So the new behavior has started to happen between 2.28.4 and 2.30.1

is that right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1703513</commentid>
    <comment_count>3</comment_count>
    <who name="">bandali</who>
    <bug_when>2020-11-02 06:37:49 -0800</bug_when>
    <thetext>Hello,

(In reply to Carlos Alberto Lopez Perez from comment #2)
[...]
&gt; 
&gt; I understand Ubuntu-20.04 ships WebKitGTK 2.28.4 and Ubuntu-20.10 WebKitGTK
&gt; 2.30.1
&gt; 
&gt; So the new behavior has started to happen between 2.28.4 and 2.30.1
&gt; 
&gt; is that right?

That seems to be the case indeed, and I observe the same issue on 2.30.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1705157</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-11-06 01:00:18 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 218562 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>