Bug 212344 - [GTK4] Fix context menu
Summary: [GTK4] Fix context menu
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks: GTK4
  Show dependency treegraph
 
Reported: 2020-05-25 05:19 PDT by Carlos Garcia Campos
Modified: 2020-05-26 00:59 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.05 KB, patch)
2020-05-25 05:24 PDT, Carlos Garcia Campos
aperez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2020-05-25 05:19:19 PDT
It doesn't appear on right click. A warning is shown instead.
Comment 1 Carlos Garcia Campos 2020-05-25 05:24:04 PDT
Created attachment 400196 [details]
Patch
Comment 2 EWS Watchlist 2020-05-25 05:24:45 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Adrian Perez 2020-05-25 06:32:02 PDT
Comment on attachment 400196 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400196&action=review

> Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:859
> +        gtk_native_check_resize(GTK_NATIVE(priv->activeContextMenuProxy->gtkWidget()));

Cannot we do this inside “WebContextMenuProxyGtk”? We know that the
web view widget is valid when instantiating it, so I would expect that
calling “gtk_native_check_resize()” after setting the web view as parent
widget could work as well 🤔️
Comment 4 Carlos Garcia Campos 2020-05-26 00:47:20 PDT
(In reply to Adrian Perez from comment #3)
> Comment on attachment 400196 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=400196&action=review
> 
> > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:859
> > +        gtk_native_check_resize(GTK_NATIVE(priv->activeContextMenuProxy->gtkWidget()));
> 
> Cannot we do this inside “WebContextMenuProxyGtk”? We know that the
> web view widget is valid when instantiating it, so I would expect that
> calling “gtk_native_check_resize()” after setting the web view as parent
> widget could work as well 🤔️

It needs to be called by the parent in its size_request.
Comment 5 Carlos Garcia Campos 2020-05-26 00:59:37 PDT
Committed r262137: <https://trac.webkit.org/changeset/262137>