From 535941dd29dec728477a77b9c614bbd7820463ce Mon Sep 17 00:00:00 2001 From: ohfp <1813007-ohfp@users.noreply.gitlab.com> Date: Thu, 15 Dec 2022 14:01:37 +0100 Subject: [PATCH] update unity and kde patches for 108.0 --- patches/mozilla-kde.patch | 28 ++++++++--------- patches/mozilla-kde_after_unity.patch | 44 +++++++++++++-------------- patches/unity-menubar.patch | 2 +- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/patches/mozilla-kde.patch b/patches/mozilla-kde.patch index 4a72e3f..d39dc9b 100644 --- a/patches/mozilla-kde.patch +++ b/patches/mozilla-kde.patch @@ -3,7 +3,7 @@ # Date 1559294891 -7200 # Fri May 31 11:28:11 2019 +0200 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 -# Parent 36f9c3a81777563ef87663a210b1cd38fdd734d9 +# Parent e8919158faed3f4a08289fb293dd87ce56bdcc4d Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -31,7 +31,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp #ifdef MOZ_MEMORY # include "mozmemory.h" #endif -@@ -4849,16 +4850,27 @@ nsresult Preferences::InitInitialObjects +@@ -4847,16 +4848,27 @@ nsresult Preferences::InitInitialObjects "unix.js" # if defined(_AIX) , @@ -57,9 +57,9 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp NS_WARNING("Error parsing application default preferences."); } - // Load jar:$app/omni.jar!/defaults/preferences/*.js - // or jar:$gre/omni.jar!/defaults/preferences/*.js. -@@ -4923,17 +4935,17 @@ nsresult Preferences::InitInitialObjects + #if defined(MOZ_WIDGET_GTK) + // Under Flatpak/Snap package, load /etc/firefox/defaults/pref/*.js. +@@ -4938,17 +4950,17 @@ nsresult Preferences::InitInitialObjects } nsCOMPtr path = do_QueryInterface(elem); @@ -81,7 +81,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build -@@ -123,16 +123,20 @@ EXPORTS.mozilla += [ +@@ -122,16 +122,20 @@ EXPORTS.mozilla += [ ] EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) @@ -151,7 +151,7 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa if CONFIG["MOZ_PLACES"]: EXTRA_JS_MODULES += [ - "DownloadHistory.jsm", + "DownloadHistory.sys.mjs", ] FINAL_LIBRARY = "xul" @@ -255,8 +255,7 @@ diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downlo diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -@@ -10,16 +10,18 @@ - #include "prnetdb.h" +@@ -11,16 +11,18 @@ #include "prenv.h" #include "nsInterfaceHashtable.h" #include "nsHashtablesFwd.h" @@ -264,6 +263,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy #include "nsNetUtil.h" #include "nsISupportsPrimitives.h" #include "nsIGSettingsService.h" + #include "nsReadableUtils.h" +#include "nsPrintfCString.h" +#include "nsKDEUtils.h" @@ -274,7 +274,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy NS_DECL_ISUPPORTS NS_DECL_NSISYSTEMPROXYSETTINGS -@@ -33,16 +35,18 @@ class nsUnixSystemProxySettings final : +@@ -34,16 +36,18 @@ class nsUnixSystemProxySettings final : nsCOMPtr mProxySettings; nsInterfaceHashtable mSchemeProxySettings; @@ -293,7 +293,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { // dbus prevents us from being threadsafe, but this routine should not block // anyhow -@@ -378,21 +382,50 @@ nsresult nsUnixSystemProxySettings::GetP +@@ -392,21 +396,50 @@ nsresult nsUnixSystemProxySettings::GetP return NS_OK; } @@ -1785,7 +1785,7 @@ diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build if CONFIG["MOZ_ENABLE_DBUS"]: CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] - if CONFIG["MOZ_BACKGROUNDTASKS"]: + include("/ipc/chromium/chromium-config.mozbuild") diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -1807,7 +1807,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp # include "prmem.h" # include "plbase64.h" -@@ -2088,20 +2089,29 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -2094,20 +2095,29 @@ nsLocalFile::SetPersistentDescriptor(con NS_IMETHODIMP nsLocalFile::Reveal() { @@ -1839,7 +1839,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp ::CFRelease(url); return rv; } -@@ -2113,16 +2123,23 @@ nsLocalFile::Reveal() { +@@ -2119,16 +2129,23 @@ nsLocalFile::Reveal() { NS_IMETHODIMP nsLocalFile::Launch() { diff --git a/patches/mozilla-kde_after_unity.patch b/patches/mozilla-kde_after_unity.patch index 013d229..e2d9c60 100644 --- a/patches/mozilla-kde_after_unity.patch +++ b/patches/mozilla-kde_after_unity.patch @@ -1,6 +1,6 @@ -From 870d6c8f9b8086c5953300cfa7234dac3db1fcb7 Mon Sep 17 00:00:00 2001 +From af61c9942b1fbfb85cd7cc4950a44804ed6d800b Mon Sep 17 00:00:00 2001 From: ohfp <1813007-ohfp@users.noreply.gitlab.com> -Date: Wed, 16 Nov 2022 10:54:47 +0100 +Date: Thu, 15 Dec 2022 14:00:55 +0100 Subject: [PATCH] kde --- @@ -37,7 +37,7 @@ Subject: [PATCH] kde create mode 100644 uriloader/exthandler/unix/nsKDERegistry.h diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp -index 338a54cc7c6f..178a6cdcdcc2 100644 +index 418daa983069..76ece13df80a 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -94,6 +94,7 @@ @@ -48,7 +48,7 @@ index 338a54cc7c6f..178a6cdcdcc2 100644 #ifdef DEBUG # include -@@ -4854,6 +4855,17 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { +@@ -4852,6 +4853,17 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { #endif }; @@ -66,7 +66,7 @@ index 338a54cc7c6f..178a6cdcdcc2 100644 rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles)); if (NS_FAILED(rv)) { -@@ -4928,7 +4940,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { +@@ -4943,7 +4955,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) { } // Do we care if a file provided by this process fails to load? @@ -76,10 +76,10 @@ index 338a54cc7c6f..178a6cdcdcc2 100644 } diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build -index 8ed2ca5db2d1..4f9923f28a4a 100644 +index e22baa09b420..1fc915ac3ae7 100644 --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build -@@ -128,6 +128,10 @@ UNIFIED_SOURCES += [ +@@ -127,6 +127,10 @@ UNIFIED_SOURCES += [ "SharedPrefMap.cpp", ] @@ -115,7 +115,7 @@ index a733685f95a3..f64b17fb7b17 100644 def __init__(self, base, *flags): diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build -index d4172e2d73ad..8bd0577bc535 100644 +index 3818e8c0db1e..b70986db8111 100644 --- a/toolkit/components/downloads/moz.build +++ b/toolkit/components/downloads/moz.build @@ -51,5 +51,9 @@ if CONFIG["MOZ_PLACES"]: @@ -129,7 +129,7 @@ index d4172e2d73ad..8bd0577bc535 100644 with Files("**"): BUG_COMPONENT = ("Toolkit", "Downloads API") diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm -index 1b8a7ead51b0..fb0191b50abe 100644 +index a161ee4445c9..d4508a73fdd8 100644 --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm @@ -1244,26 +1244,56 @@ nsUnknownContentTypeDialog.prototype = { @@ -210,19 +210,19 @@ index 1b8a7ead51b0..fb0191b50abe 100644 var nsIFilePicker = Ci.nsIFilePicker; var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -index ef110b1287bf..e29e8a5b62de 100644 +index 982faf7d7968..71acbf61b151 100644 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -@@ -15,6 +15,8 @@ - #include "nsNetUtil.h" +@@ -16,6 +16,8 @@ #include "nsISupportsPrimitives.h" #include "nsIGSettingsService.h" + #include "nsReadableUtils.h" +#include "nsPrintfCString.h" +#include "nsKDEUtils.h" using namespace mozilla; -@@ -38,6 +40,8 @@ class nsUnixSystemProxySettings final : public nsISystemProxySettings { +@@ -39,6 +41,8 @@ class nsUnixSystemProxySettings final : public nsISystemProxySettings { nsACString& aResult); nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); @@ -231,7 +231,7 @@ index ef110b1287bf..e29e8a5b62de 100644 }; NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings) -@@ -379,6 +383,9 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, +@@ -393,6 +397,9 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, const nsACString& aHost, const int32_t aPort, nsACString& aResult) { @@ -241,7 +241,7 @@ index ef110b1287bf..e29e8a5b62de 100644 if (mProxySettings) { nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult); if (NS_SUCCEEDED(rv)) return rv; -@@ -387,6 +394,32 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, +@@ -401,6 +408,32 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); } @@ -275,7 +275,7 @@ index ef110b1287bf..e29e8a5b62de 100644 auto result = MakeRefPtr(); result->Init(); diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build -index a3ea40edf0a3..96538442ccb3 100644 +index 970c10d243b8..81e9a05fce90 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -97,7 +97,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": @@ -692,7 +692,7 @@ index 6eefb48f1316..08dfb1e0c7c7 100644 *aHandlerExists = false; #endif diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build -index 260574f3905c..af549112883a 100644 +index 2d4c3de0ef67..a221e0cf4466 100644 --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build @@ -83,7 +83,9 @@ else: @@ -1465,7 +1465,7 @@ index 6f127896e334..b465ff529ce2 100644 stTablet == eBad || #endif diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build -index 779b75dbc495..7accda3776c6 100644 +index 95ee64e985ac..9af8f80497b7 100644 --- a/xpcom/components/moz.build +++ b/xpcom/components/moz.build @@ -71,6 +71,7 @@ LOCAL_INCLUDES += [ @@ -1477,7 +1477,7 @@ index 779b75dbc495..7accda3776c6 100644 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp -index 321f3a1ff9e7..4483248e1dab 100644 +index b420f2a1fb1a..c2bc77cb0ad6 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -51,6 +51,7 @@ @@ -1488,7 +1488,7 @@ index 321f3a1ff9e7..4483248e1dab 100644 #endif #ifdef MOZ_WIDGET_COCOA -@@ -2093,10 +2094,19 @@ nsLocalFile::Reveal() { +@@ -2099,10 +2100,19 @@ nsLocalFile::Reveal() { } #ifdef MOZ_WIDGET_GTK @@ -1510,7 +1510,7 @@ index 321f3a1ff9e7..4483248e1dab 100644 return giovfs->RevealFile(this); #elif defined(MOZ_WIDGET_COCOA) CFURLRef url; -@@ -2118,6 +2128,13 @@ nsLocalFile::Launch() { +@@ -2124,6 +2134,13 @@ nsLocalFile::Launch() { } #ifdef MOZ_WIDGET_GTK @@ -1525,5 +1525,5 @@ index 321f3a1ff9e7..4483248e1dab 100644 if (!giovfs) { return NS_ERROR_FAILURE; -- -2.38.1 +2.39.0 diff --git a/patches/unity-menubar.patch b/patches/unity-menubar.patch index d58efcc..2340c33 100644 --- a/patches/unity-menubar.patch +++ b/patches/unity-menubar.patch @@ -5054,7 +5054,7 @@ + bool nsWindow::CheckForRollup(gdouble aMouseX, gdouble aMouseY, bool aIsWheel, bool aAlwaysRollup) { - nsIRollupListener* rollupListener = GetActiveRollupListener(); + LOG("nsWindow::CheckForRollup() aAlwaysRollup %d", aAlwaysRollup); --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h @@ -26,6 +26,8 @@