From 81ee50ea5f15dee5c52842a20407d18625eefa3a Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Fri, 17 Mar 2023 15:46:38 -0500 Subject: [PATCH] Add user content manager patch and reenable LTO --- unbreak-script-message-received.patch | 35 +++++++++++++++++++++++++++ webkitgtk.spec | 6 ++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 unbreak-script-message-received.patch diff --git a/unbreak-script-message-received.patch b/unbreak-script-message-received.patch new file mode 100644 index 0000000..df91be8 --- /dev/null +++ b/unbreak-script-message-received.patch @@ -0,0 +1,35 @@ +From 7bcb97382f2f347dc348c3c31416ae7fd760ce6b Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Fri, 17 Mar 2023 15:39:52 -0500 +Subject: [PATCH] REGRESSION(261320@main): [GLib] Broke + WebKitUserContentManager::script-message-received + https://bugs.webkit.org/show_bug.cgi?id=254089 + +Reviewed by NOBODY (OOPS!). + +I forgot to update the marshaller used by +WebKitUserContentManager::script-message-received. It worked perfectly +fine in my development environment for whatever reason, but was broken +in at least Ephy Tech Preview. + +* Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp: +--- + Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp +index af2d963bb3b3..f778b19bc816 100644 +--- a/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp ++++ b/Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp +@@ -106,7 +106,11 @@ static void webkit_user_content_manager_class_init(WebKitUserContentManagerClass + G_TYPE_FROM_CLASS(gObjectClass), + static_cast(G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED), + 0, nullptr, nullptr, ++#if ENABLE(2022_GLIB_API) ++ g_cclosure_marshal_VOID__OBJECT, ++#else + g_cclosure_marshal_VOID__BOXED, ++#endif + G_TYPE_NONE, 1, + #if ENABLE(2022_GLIB_API) + JSC_TYPE_VALUE); diff --git a/webkitgtk.spec b/webkitgtk.spec index 580c459..da0e68f 100644 --- a/webkitgtk.spec +++ b/webkitgtk.spec @@ -1,6 +1,3 @@ -# https://bugs.webkit.org/show_bug.cgi?id=249368 -%global _lto_cflags %{nil} - ## NOTE: Lots of files in various subdirectories have the same name (such as ## "LICENSE") so this short macro allows us to distinguish them by using their ## directory names (from the source tree) as prefixes for the files. @@ -32,6 +29,9 @@ Source1: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz.asc # $ gpg --export --export-options export-minimal D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3 5AA3BC334FD7E3369E7C77B291C559DBE4C9123B > webkitgtk-keys.gpg Source2: webkitgtk-keys.gpg +# https://github.com/WebKit/WebKit/pull/11664 +Patch0: unbreak-script-message-received.patch + BuildRequires: bison BuildRequires: bubblewrap BuildRequires: cmake