[gtk-osx] Some corrections for building WebKit2Gtk3 2.30.2.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-osx] Some corrections for building WebKit2Gtk3 2.30.2.
- Date: Fri, 13 Nov 2020 23:50:21 +0000 (UTC)
commit f51c96fc5b7cfb4069455ba2dbc1cea856edd654
Author: John Ralls <jralls ceridwen us>
Date: Mon Nov 9 15:03:53 2020 -0800
Some corrections for building WebKit2Gtk3 2.30.2.
modulesets-stable/gtk-osx-network.modules | 5 +-
modulesets-unstable/gtk-osx-network.modules | 5 +-
modulesets/gtk-osx-network.modules | 5 +-
...-and-fix-build-of-JSCustomXPathNSResolver.patch | 75 --------------------
patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch | 11 +++
...2-Prevent-WebKitWebProcess-from-being-in-.patch | 80 ++++++++++++++++++++++
6 files changed, 97 insertions(+), 84 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx-network.modules b/modulesets-stable/gtk-osx-network.modules
index b513190..3b0ed3f 100644
--- a/modulesets-stable/gtk-osx-network.modules
+++ b/modulesets-stable/gtk-osx-network.modules
@@ -218,11 +218,10 @@
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-webkit2gtk-2282-unprotected-egl-changes.diff"
strip="0"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-webkit2gtk-2282-os-log-availability.diff"
strip="0"/>
<patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-bundle-link-webcore.diff"
strip="0"/>
- <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-clang-fixes.patch"
strip="0"/>
- <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/0001-Prevent-WebKitWebProcess-from-being-in-the-dock-or-p.patch"
strip="1"/>
+ <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch"
strip="1"/>
+ <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.2-Prevent-WebKitWebProcess-from-being-in-.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Disable-AUDIT_TOKEN-for-Gtk-builds.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Disable-WebKitGenericCueAPIEnabled.patch"
strip="1"/>
- <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Enable-and-fix-build-of-JSCustomXPathNSResolver.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Extend-UNIX_DOMAIN_SOCKETS-precedence-over-Mac-and-Win.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Fix-Socket-signal-defines-for-Darwin-and-maybe-BSD.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Force-FindICU-instead-of-inserting-heade.patch"
strip="1"/>
diff --git a/modulesets-unstable/gtk-osx-network.modules b/modulesets-unstable/gtk-osx-network.modules
index e3306b5..c24bd35 100644
--- a/modulesets-unstable/gtk-osx-network.modules
+++ b/modulesets-unstable/gtk-osx-network.modules
@@ -215,11 +215,10 @@
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-webkit2gtk-2282-unprotected-egl-changes.diff"
strip="0"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-webkit2gtk-2282-os-log-availability.diff"
strip="0"/>
<patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-bundle-link-webcore.diff"
strip="0"/>
- <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-clang-fixes.patch"
strip="0"/>
- <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/0001-Prevent-WebKitWebProcess-from-being-in-the-dock-or-p.patch"
strip="1"/>
+ <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch"
strip="1"/>
+ <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.2-Prevent-WebKitWebProcess-from-being-in-.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Disable-AUDIT_TOKEN-for-Gtk-builds.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Disable-WebKitGenericCueAPIEnabled.patch"
strip="1"/>
- <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Enable-and-fix-build-of-JSCustomXPathNSResolver.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Extend-UNIX_DOMAIN_SOCKETS-precedence-over-Mac-and-Win.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Fix-Socket-signal-defines-for-Darwin-and-maybe-BSD.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Force-FindICU-instead-of-inserting-heade.patch"
strip="1"/>
diff --git a/modulesets/gtk-osx-network.modules b/modulesets/gtk-osx-network.modules
index 68ae2dd..45d537b 100644
--- a/modulesets/gtk-osx-network.modules
+++ b/modulesets/gtk-osx-network.modules
@@ -220,11 +220,10 @@
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-webkit2gtk-2282-unprotected-egl-changes.diff"
strip="0"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-webkit2gtk-2282-os-log-availability.diff"
strip="0"/>
<patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/patch-bundle-link-webcore.diff"
strip="0"/>
- <patch file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/webkit-clang-fixes.patch"
strip="0"/>
- <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/0001-Prevent-WebKitWebProcess-from-being-in-the-dock-or-p.patch"
strip="1"/>
+ <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch"
strip="1"/>
+ <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.2-Prevent-WebKitWebProcess-from-being-in-.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Disable-AUDIT_TOKEN-for-Gtk-builds.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Disable-WebKitGenericCueAPIEnabled.patch"
strip="1"/>
- <patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Enable-and-fix-build-of-JSCustomXPathNSResolver.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Extend-UNIX_DOMAIN_SOCKETS-precedence-over-Mac-and-Win.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Fix-Socket-signal-defines-for-Darwin-and-maybe-BSD.patch"
strip="1"/>
<patch
file="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/patches/WebKit2Gtk3-2.30.1-Force-FindICU-instead-of-inserting-heade.patch"
strip="1"/>
diff --git a/patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch b/patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch
new file mode 100644
index 0000000..4a45836
--- /dev/null
+++ b/patches/WebKit2Gtk3-2.30.2-GUniquePtrGtk.patch
@@ -0,0 +1,11 @@
+--- a/Source/WebKit/UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp 2020-02-04 02:24:08.000000000
-0800
++++ b/Source/WebKit/UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp 2020-10-20 14:55:56.000000000
-0700
+@@ -33,7 +33,7 @@
+ #include <WebCore/GtkUtilities.h>
+ #include <WebCore/IntPoint.h>
+ #include <wtf/glib/GRefPtr.h>
+-#include <wtf/glib/GUniquePtr.h>
++#include <WebCore/GUniquePtrGtk.h>
+
+ namespace WebKit {
+
diff --git a/patches/WebKit2Gtk3-2.30.2-Prevent-WebKitWebProcess-from-being-in-.patch
b/patches/WebKit2Gtk3-2.30.2-Prevent-WebKitWebProcess-from-being-in-.patch
new file mode 100644
index 0000000..c5317dd
--- /dev/null
+++ b/patches/WebKit2Gtk3-2.30.2-Prevent-WebKitWebProcess-from-being-in-.patch
@@ -0,0 +1,80 @@
+From 338ef8630d4aa8c15d33e66f438bc5862d4dc930 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls ceridwen us>
+Date: Thu, 29 Oct 2020 18:30:08 -0700
+Subject: [PATCH] Prevent WebKitWebProcess from being in the dock or process
+ switcher.
+
+Thanks to the Nyxt browser project, https://nyxt.atlas.engineer/.
+---
+ Source/WebKit/PlatformGTK.cmake | 4 ++++
+ Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.h | 4 ++++
+ Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.mm | 10 ++++++++++
+ Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp | 2 ++
+ 4 files changed, 20 insertions(+)
+ create mode 100644 Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.h
+ create mode 100644 Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.mm
+
+diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake
+index f6abc65..7214829 100644
+--- a/Source/WebKit/PlatformGTK.cmake
++++ b/Source/WebKit/PlatformGTK.cmake
+@@ -34,6 +34,10 @@ list(APPEND WebKit_UNIFIED_SOURCE_LIST_FILES
+ "SourcesGTK.txt"
+ )
+
++find_library(APPKIT_FRAMEWORK NAMES AppKit)
++target_link_libraries(WebKit PRIVATE ${APPKIT_FRAMEWORK})
++list(APPEND WebKit_SOURCES WebProcess/gtk/NSApplicationActivationPolicy.mm)
++
+ if (NOT USE_GTK4)
+ list(APPEND WebKit_SOURCES
+ UIProcess/ViewGestureController.cpp
+diff --git a/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.h
b/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.h
+new file mode 100644
+index 0000000..7285942
+--- /dev/null
++++ b/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.h
+@@ -0,0 +1,4 @@
++
++// This is the C "trampoline" function that will be used
++// to invoke a specific Objective-C method FROM C++
++void SetActivationPolicyProhibited ();
+diff --git a/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.mm
b/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.mm
+new file mode 100644
+index 0000000..ce1d75c
+--- /dev/null
++++ b/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.mm
+@@ -0,0 +1,10 @@
++#include "config.h"
++#import "NSApplicationActivationPolicy.h"
++#import <AppKit/AppKit.h>
++
++// C "trampoline" function to invoke Objective-C method
++void SetActivationPolicyProhibited ()
++{
++ [NSApp setActivationPolicy: NSApplicationActivationPolicyProhibited];
++ return;
++}
+diff --git a/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp
b/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp
+index 6a4a822..5b4064f 100644
+--- a/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp
++++ b/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp
+@@ -31,6 +31,7 @@
+ #include "WebProcess.h"
+ #include <WebCore/GtkVersioning.h>
+ #include <libintl.h>
++#include "NSApplicationActivationPolicy.h"
+
+ #if PLATFORM(X11)
+ #include <X11/Xlib.h>
+@@ -56,6 +57,7 @@ public:
+
+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
++ SetActivationPolicyProhibited ();
+
+ return true;
+ }
+--
+2.2.2
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]