<?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>233785</bug_id>
          
          <creation_ts>2021-12-02 15:19:40 -0800</creation_ts>
          <short_desc>[GTK4] WebKitWebView::context-menu errors out on GTK4</short_desc>
          <delta_ts>2022-07-28 07:13:00 -0700</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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=240922</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>210100</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alice Mikhaylenko">alicem</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>EvilTwin1</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>pgriffis</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1819896</commentid>
    <comment_count>0</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2021-12-02 15:19:40 -0800</bug_when>
    <thetext>(epiphany:2): GLib-GObject-WARNING **: 04:08:46.838: value_to_ffi_type: Unsupported fundamental type: GdkEvent

I suppose we could use a custom marshaller, but - how important is the event parameter anyway? Epiphany never uses it, for instance. In the past it had taken this event and carried it around, but it never actually did anything with it either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1819976</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-12-02 17:50:50 -0800</bug_when>
    <thetext>(In reply to Alexander Mikhaylenko from comment #0)
&gt; how important is the event parameter anyway? Epiphany never uses it, for instance.

I think you would need this if you were going to present a window, so that you could use the timestamp from the event?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1820036</commentid>
    <comment_count>2</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2021-12-02 23:17:52 -0800</bug_when>
    <thetext>You don&apos;t need a timestamp for showing a popover though. But even then,  if you want to present a toplevel when trying to open a context menu - `GDK_CURRENT_TIME` exists.

However, when writing this I didn&apos;t notice the signal doesn&apos;t pass coordinates to show the menu at otherwise (in case you want to make a completely custom menu), so I guess `GdkEvent` makes sense for that... Though at worst it could be x, y, timestamp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1820115</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-12-03 06:49:19 -0800</bug_when>
    <thetext>(Keep in mind there is a web process version of this signal as well, which doesn&apos;t have the GdkEvent parameter.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1824340</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-12-15 06:47:34 -0800</bug_when>
    <thetext>*** Bug 233997 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1855981</commentid>
    <comment_count>5</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-03-29 04:14:20 -0700</bug_when>
    <thetext>This one is tricky - since it differs between GTK3 and GTK4, we have to split the signal and the vfunc between gtk3 and gtk4 somehow... This likely involves reorganizing WebKitWebView.c/h completely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1856063</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-03-29 10:05:18 -0700</bug_when>
    <thetext>(In reply to Alexander Mikhaylenko from comment #5)
&gt; This one is tricky - since it differs between GTK3 and GTK4, we have to
&gt; split the signal and the vfunc between gtk3 and gtk4 somehow... This likely
&gt; involves reorganizing WebKitWebView.c/h completely.

It shouldn&apos;t require a huge reorg. Remember that we are first waiting for gi-docgen support to land. Then we can move the doc comments that need to differ between GTK3/GTK4/WPE out into separate files, while leaving the code in one place. With this plan, #if won&apos;t work for the doc comments, but it will work for the code. You can just leave a non-doc comment where the doc comment would normally be, pointing to the file that holds the real doc comments.

...right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875443</commentid>
    <comment_count>7</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-12 14:08:20 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; (In reply to Alexander Mikhaylenko from comment #5)
&gt; &gt; This one is tricky - since it differs between GTK3 and GTK4, we have to
&gt; &gt; split the signal and the vfunc between gtk3 and gtk4 somehow... This likely
&gt; &gt; involves reorganizing WebKitWebView.c/h completely.
&gt; 
&gt; It shouldn&apos;t require a huge reorg. Remember that we are first waiting for
&gt; gi-docgen support to land. Then we can move the doc comments that need to
&gt; differ between GTK3/GTK4/WPE out into separate files, while leaving the code
&gt; in one place. With this plan, #if won&apos;t work for the doc comments, but it
&gt; will work for the code. You can just leave a non-doc comment where the doc
&gt; comment would normally be, pointing to the file that holds the real doc
&gt; comments.
&gt; 
&gt; ...right?

Support for gi-docgen landed in #226662 a while ago, but we still need
to go over the documentation and make sure all works fine for GTK4 builds.
Now we should be closer to having this fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879089</commentid>
    <comment_count>8</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-06-29 12:40:13 -0700</bug_when>
    <thetext>Emmanuele mentioned we can keep GdkEvent if we specify a custom marshaller.

I still think we should replace it though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879091</commentid>
    <comment_count>9</comment_count>
    <who name="Patrick Griffis">pgriffis</who>
    <bug_when>2022-06-29 12:52:05 -0700</bug_when>
    <thetext>Epiphany uses button and state from the event to pass along to WebExtensions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879099</commentid>
    <comment_count>10</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-06-29 12:55:51 -0700</bug_when>
    <thetext>Ok yeah, it _just_ landed and I didn&apos;t have it in my local checkout.

Fair enough, let&apos;s keep it then and have a custom marshaller.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886172</commentid>
    <comment_count>11</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-07-22 21:40:22 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/2686</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887317</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-07-28 07:12:55 -0700</bug_when>
    <thetext>Committed 252908@main (7f7932695192): &lt;https://commits.webkit.org/252908@main&gt;

Reviewed commits have been landed. Closing PR #2686 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>