Bug 219844

Summary: [GTK] Build failures with GTK4 3.99.5.1
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: WebKitGTKAssignee: Lauro Moura <lmoura>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, benjamin, berto, bugs-noreply, cdumez, cgarcia, cmarcelo, ews-watchlist, gustavo, gyuyoung.kim, pnormand, ryuan.choi, sergio
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=219983
Attachments:
Description Flags
Initial patch
none
Patch
none
Patch pnormand: review+

Lauro Moura
Reported 2020-12-13 20:22:32 PST
While updating GTK4 from 3.99.4 to 3.99.5 in bug219781, the compilation failed due to some deprecated API that were removed between 3.99.4 and 3.99.5: * gtk_window_get_size * gtk_window_resize * gtk_native_check_resize
Attachments
Initial patch (9.66 KB, patch)
2020-12-13 21:00 PST, Lauro Moura
no flags
Patch (6.31 KB, patch)
2020-12-14 02:37 PST, Carlos Garcia Campos
no flags
Patch (6.29 KB, patch)
2020-12-14 02:41 PST, Carlos Garcia Campos
pnormand: review+
Lauro Moura
Comment 1 2020-12-13 21:00:39 PST
Created attachment 416136 [details] Initial patch Initial patch with tentative fixes where the build failed. In `webkitWebViewBaseSizeAllocate` I left the gtk_native_check_resize commented out as I'm not sure how to proceed with it. The GTK changes replaced it with explicit calls to the child types. Should WebKitGTK then do something similar and go through each of the internal children and call the appropiate functions?
EWS Watchlist
Comment 2 2020-12-13 21:01:15 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Carlos Garcia Campos
Comment 3 2020-12-14 02:36:02 PST
Comment on attachment 416136 [details] Initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=416136&action=review I had to fix the build too, I'll submit a new patch > Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp:201 > +#if USE(GTK4) > + gtk_window_get_default_size(GTK_WINDOW(window), &width, &height); > +#else > gtk_window_get_size(GTK_WINDOW(window), &width, &height); > +#endif We normally add the missing function to GtkVersioning.h to avoid the ifdefs. > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:868 > - if (GTK_IS_NATIVE(child)) > - gtk_native_check_resize(GTK_NATIVE(child)); > + // FIXME > + // GTK Replaced check_resize with explicit calls on each widget (eg gtk_popover_present) > + // if (GTK_IS_NATIVE(child)) > + // gtk_native_check_resize(GTK_NATIVE(child)); This is always a popover in our case, it's either the context menu or an input drop down list. > Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp:303 > +#if USE(GTK4) > + // FIXME get the default_widget and resize or just NOP as we just got the default_size? > +#else > gtk_window_resize(window, x, y); > +#endif This is a good point, I guess we will have to save the previous size now in the case of gtk4.
Carlos Garcia Campos
Comment 4 2020-12-14 02:37:09 PST
Carlos Garcia Campos
Comment 5 2020-12-14 02:41:50 PST
Carlos Garcia Campos
Comment 6 2021-01-07 02:02:54 PST
Note You need to log in before you can comment on or make changes to this bug.