diff -r b8c834aafde2 -r c3d884659acf mozilla-kde.patch --- a/mozilla-kde.patch Wed Mar 17 12:24:14 2021 +0100 +++ b/mozilla-kde.patch Sat Mar 27 21:45:50 2021 +0100 @@ -3,7 +3,7 @@ # Date 1559294891 -7200 # Fri May 31 11:28:11 2019 +0200 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 -# Parent 4b9aa59b15c3247d263cc32804786b3a6bff7912 +# Parent 929fbcb071c2e1ff551c73e8c364e9c1f4495171 Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -13,15 +13,15 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp -@@ -82,16 +82,17 @@ - #include "nsXPCOM.h" - #include "nsXULAppAPI.h" - #include "nsZipArchive.h" +@@ -84,16 +84,17 @@ #include "plbase64.h" #include "PLDHashTable.h" #include "plstr.h" #include "prlink.h" #include "xpcpublic.h" + #ifdef MOZ_BACKGROUNDTASKS + # include "mozilla/BackgroundTasks.h" + #endif +#include "nsKDEUtils.h" #ifdef DEBUG @@ -31,7 +31,7 @@ #ifdef MOZ_MEMORY # include "mozmemory.h" #endif -@@ -4459,25 +4460,37 @@ nsresult Preferences::InitInitialObjects +@@ -4573,25 +4574,37 @@ nsresult Preferences::InitInitialObjects // application pref files for backwards compatibility. static const char* specialFiles[] = { #if defined(XP_MACOSX) @@ -69,7 +69,7 @@ // Load jar:$app/omni.jar!/defaults/preferences/*.js // or jar:$gre/omni.jar!/defaults/preferences/*.js. -@@ -4523,17 +4536,17 @@ nsresult Preferences::InitInitialObjects +@@ -4656,17 +4669,17 @@ nsresult Preferences::InitInitialObjects } nsCOMPtr path = do_QueryInterface(elem); @@ -91,7 +91,7 @@ diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build -@@ -116,16 +116,20 @@ EXPORTS.mozilla += [ +@@ -117,16 +117,20 @@ EXPORTS.mozilla += [ ] EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) @@ -115,8 +115,7 @@ diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py --- a/python/mozbuild/mozpack/chrome/flags.py +++ b/python/mozbuild/mozpack/chrome/flags.py -@@ -228,16 +228,17 @@ class Flags(OrderedDict): - "contentaccessible": Flag, +@@ -229,16 +229,17 @@ class Flags(OrderedDict): "os": StringFlag, "osversion": VersionFlag, "abi": StringFlag, @@ -124,7 +123,8 @@ "xpcnativewrappers": Flag, "tablet": Flag, "process": StringFlag, -+ "desktop": StringFlag, + "backgroundtask": StringFlag, ++ "desktop": StringFlag, } RE = re.compile(r"([!<>=]+)") @@ -136,8 +136,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py --- a/python/mozbuild/mozpack/chrome/manifest.py +++ b/python/mozbuild/mozpack/chrome/manifest.py -@@ -38,16 +38,17 @@ class ManifestEntry(object): - "platformversion", +@@ -39,16 +39,17 @@ class ManifestEntry(object): "os", "osversion", "abi", @@ -145,6 +144,7 @@ "tablet", "process", "contentaccessible", + "backgroundtask", + "desktop", ] @@ -175,7 +175,7 @@ diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm -@@ -1243,36 +1243,66 @@ nsUnknownContentTypeDialog.prototype = { +@@ -1231,36 +1231,66 @@ nsUnknownContentTypeDialog.prototype = { params.handlerApp && params.handlerApp.executable && params.handlerApp.executable.isFile() @@ -356,7 +356,7 @@ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build -@@ -91,17 +91,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co +@@ -92,17 +92,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co "../components/printingui", ] elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": @@ -1214,7 +1214,7 @@ #include "nsIFileStreams.h" #include "nsILineInputStream.h" #include "nsIFile.h" -@@ -1019,17 +1019,17 @@ nsresult nsOSHelperAppService::GetHandle +@@ -1020,17 +1020,17 @@ nsresult nsOSHelperAppService::GetHandle nsresult nsOSHelperAppService::OSProtocolHandlerExists( const char* aProtocolScheme, bool* aHandlerExists) { @@ -1233,7 +1233,7 @@ nsCOMPtr handlerSvc = do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); if (NS_SUCCEEDED(rv) && handlerSvc) { -@@ -1039,17 +1039,17 @@ nsresult nsOSHelperAppService::OSProtoco +@@ -1040,17 +1040,17 @@ nsresult nsOSHelperAppService::OSProtoco } return rv; @@ -1252,7 +1252,7 @@ NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( const nsACString& aScheme, bool* _retval) { -@@ -1136,17 +1136,17 @@ already_AddRefed nsOSHel +@@ -1137,17 +1137,17 @@ already_AddRefed nsOSHel nsresult rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, minorType, mime_types_description, true); @@ -1271,7 +1271,7 @@ rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, minorType, mime_types_description, false); -@@ -1247,17 +1247,17 @@ already_AddRefed nsOSHel +@@ -1248,17 +1248,17 @@ already_AddRefed nsOSHel // Now look up our extensions nsAutoString extensions, mime_types_description; @@ -1293,7 +1293,7 @@ diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -138,16 +138,17 @@ FINAL_LIBRARY = "xul" +@@ -137,16 +137,17 @@ FINAL_LIBRARY = "xul" LOCAL_INCLUDES += [ "/layout/base", @@ -1685,7 +1685,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp -@@ -34,16 +34,17 @@ +@@ -38,16 +38,17 @@ #include "nsTextFormatter.h" #include "nsVersionComparator.h" #include "nsXPCOMCIDInternal.h" @@ -1703,7 +1703,7 @@ int argc; bool ischrome; -@@ -393,16 +394,17 @@ void ParseManifest(NSLocationType aType, +@@ -397,16 +398,17 @@ void ParseManifest(NSLocationType aType, constexpr auto kRemoteEnabled = u"remoteenabled"_ns; constexpr auto kRemoteRequired = u"remoterequired"_ns; constexpr auto kApplication = u"application"_ns; @@ -1717,11 +1717,11 @@ #if defined(MOZ_WIDGET_ANDROID) constexpr auto kTablet = u"tablet"_ns; #endif - - constexpr auto kMain = u"main"_ns; - constexpr auto kContent = u"content"_ns; - -@@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType, + // You might expect this to be guarded by MOZ_BACKGROUNDTASKS, but it's not + // possible to have conditional manifest contents, so we need to recognize and + // discard these tokens even when MOZ_BACKGROUNDTASKS is not set. + constexpr auto kBackgroundTask = u"backgroundtask"_ns; +@@ -456,39 +458,44 @@ void ParseManifest(NSLocationType aType, CopyUTF8toUTF16(s, abi); abi.Insert(char16_t('_'), 0); abi.Insert(osTarget, 0); @@ -1766,13 +1766,13 @@ process = kMain; } -@@ -567,25 +574,27 @@ void ParseManifest(NSLocationType aType, - TriState stOsVersion = eUnspecified; - TriState stOs = eUnspecified; - TriState stABI = eUnspecified; - TriState stProcess = eUnspecified; - #if defined(MOZ_WIDGET_ANDROID) - TriState stTablet = eUnspecified; +@@ -583,25 +590,27 @@ void ParseManifest(NSLocationType aType, + // When in background task mode, default to not registering + // category directivies unless backgroundtask=1 is specified. + TriState stBackgroundTask = (BackgroundTasks::IsBackgroundTaskMode() && + strcmp("category", directive->directive) == 0) + ? eBad + : eUnspecified; #endif int flags = 0; + TriState stDesktop = eUnspecified; @@ -1794,7 +1794,7 @@ continue; } -@@ -622,17 +631,17 @@ void ParseManifest(NSLocationType aType, +@@ -650,17 +659,17 @@ void ParseManifest(NSLocationType aType, } LogMessageWithContext( @@ -1808,11 +1808,11 @@ #ifdef MOZ_WIDGET_ANDROID stTablet == eBad || #endif + #ifdef MOZ_BACKGROUNDTASKS + stBackgroundTask == eBad || + #endif stABI == eBad || stProcess == eBad) { continue; - } - - if (directive->regfunc) { diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build --- a/xpcom/components/moz.build +++ b/xpcom/components/moz.build @@ -1833,7 +1833,7 @@ if CONFIG["MOZ_ENABLE_DBUS"]: CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] - include("/ipc/chromium/chromium-config.mozbuild") + if CONFIG["MOZ_BACKGROUNDTASKS"]: diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -1855,7 +1855,7 @@ # include "prmem.h" # include "plbase64.h" -@@ -1968,62 +1969,77 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -2001,62 +2002,77 @@ nsLocalFile::SetPersistentDescriptor(con NS_IMETHODIMP nsLocalFile::Reveal() {