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
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?
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
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.
Created attachment 416142 [details] Patch
Created attachment 416144 [details] Patch
Committed r271231: <https://trac.webkit.org/changeset/271231>