From 8197a462a51444abf466c083dd90ac83ab0980085368293b48692e751d2c32fb Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 1 Aug 2023 20:59:19 +0000 Subject: [PATCH] - Mozilla Firefox 116.0 - require NSS 3.91 - remove obsolete mozilla-fix-top-level-asm.patch - re-enable LTO OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=1079 --- MozillaFirefox.changes | 8 + MozillaFirefox.spec | 9 +- firefox-115.0.3.source.tar.xz | 3 - firefox-115.0.3.source.tar.xz.asc | 16 - firefox-116.0.source.tar.xz | 3 + firefox-116.0.source.tar.xz.asc | 16 + l10n-115.0.3.tar.xz | 3 - l10n-116.0.tar.xz | 3 + mozilla-bmo1775202.patch | 56 ++- mozilla-fix-top-level-asm.patch | 66 --- mozilla-kde.patch | 643 +++++++++++++++++++++++------- tar_stamps | 8 +- 12 files changed, 599 insertions(+), 235 deletions(-) delete mode 100644 firefox-115.0.3.source.tar.xz delete mode 100644 firefox-115.0.3.source.tar.xz.asc create mode 100644 firefox-116.0.source.tar.xz create mode 100644 firefox-116.0.source.tar.xz.asc delete mode 100644 l10n-115.0.3.tar.xz create mode 100644 l10n-116.0.tar.xz delete mode 100644 mozilla-fix-top-level-asm.patch diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index 84382303..93d2704a 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Jul 30 19:55:49 UTC 2023 - Wolfgang Rosenauer + +- Mozilla Firefox 116.0 +- require NSS 3.91 +- remove obsolete mozilla-fix-top-level-asm.patch +- re-enable LTO + ------------------------------------------------------------------- Fri Jul 28 20:56:00 UTC 2023 - Andreas Stieger diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index 72d53d7a..a542ccf4 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -28,9 +28,9 @@ # orig_suffix b3 # major 69 # mainver %%major.99 -%define major 115 -%define mainver %major.0.3 -%define orig_version 115.0.3 +%define major 116 +%define mainver %major.0 +%define orig_version 116.0 %define orig_suffix %{nil} %define update_channel release %define branding 1 @@ -219,7 +219,6 @@ Patch8: mozilla-reduce-rust-debuginfo.patch Patch10: mozilla-bmo1504834-part1.patch Patch11: mozilla-bmo1504834-part3.patch Patch12: mozilla-bmo1512162.patch -Patch13: mozilla-fix-top-level-asm.patch Patch14: mozilla-bmo849632.patch Patch15: mozilla-bmo998749.patch Patch17: mozilla-libavcodec58_91.patch @@ -493,7 +492,7 @@ ac_add_options --enable-optimize="-O1" %ifarch x86_64 # LTO needs newer toolchain stack only (at least GCC 8.2.1 (r268506) %if 0%{?suse_version} > 1500 -#ac_add_options --enable-lto +ac_add_options --enable-lto %if 0%{?do_profiling} ac_add_options MOZ_PGO=1 %endif diff --git a/firefox-115.0.3.source.tar.xz b/firefox-115.0.3.source.tar.xz deleted file mode 100644 index a797b738..00000000 --- a/firefox-115.0.3.source.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a38c923375639b6a382111f5f6f6388f33a3f1dedff23061dd6b10b11994a90 -size 503556124 diff --git a/firefox-115.0.3.source.tar.xz.asc b/firefox-115.0.3.source.tar.xz.asc deleted file mode 100644 index 6fdb1396..00000000 --- a/firefox-115.0.3.source.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEErdcHlHlwDcrf3VM34207E/PZMnQFAmTBuYkACgkQ4207E/PZ -MnSgbw//QJnIbPkWcEW8pV/kXX8Rv158AkqaGSCrMKQ5YtBF1Ju+JVcq8/zN+Dx2 -8Zd0Z5r7FGuQflVKwt9zZIR4+ezRM525/NNnG4Mu22a8RC1/6OxFYtHrPvZDoQs/ -QTNZRI1LogH+fZVxWCfDaukpw558n6zb962OiYDAnxXUhTYjyTxrapUpYLXPFBQ+ -9Dv8FMzlY+Lhj8Qoo5917gd0okdOdDyE2VpFOM7aucZ3JBDnhYWI+UBV1C6QpE5y -5uS5ctmWgJobjQfH4OgPLW9DjdhSgVShvLnX5tym58kYBHUjBybUve+JdINT4Y8Q -TrmFv5RDyPjyIJSHrfmTT6ccm0tjwzj+rT0bzYqrQ1UDsPMsedBTJ12bAJfsre1g -PGAU58o1L179Yvz9/wQ8JOeAO5+KjPgjC/am9W9013Q5vE6GfoFTGV9E86rRjedx -g3uDXpiOuGs+eq/zCeT5aU4fJV4KE5t5JrgCUcYOoBto/FCKG7WzAYw3QWD1/wkT -lb7MahG6lJsUZtMsdvAOUsa56Gve/R2XFEKNmmCEGwEBvkZiUHNq4Pg4MuTRxSyu -KSzppczrxZX+vm5qoySlx2iceWl5p1oEOj3/Ok7+hZfB2xzx+QS8fZHf3xQomWqW -z8Cu0cd0upI7Fb331pvszWJNee4VpDVQTtNbHecyvz79xB87daQ= -=GmmK ------END PGP SIGNATURE----- diff --git a/firefox-116.0.source.tar.xz b/firefox-116.0.source.tar.xz new file mode 100644 index 00000000..adfcb20d --- /dev/null +++ b/firefox-116.0.source.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:215d076945bf744327a252f498227ab68e9ba4e3b703e058683d9e4ab92cba76 +size 515487160 diff --git a/firefox-116.0.source.tar.xz.asc b/firefox-116.0.source.tar.xz.asc new file mode 100644 index 00000000..6b1347c1 --- /dev/null +++ b/firefox-116.0.source.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEErdcHlHlwDcrf3VM34207E/PZMnQFAmTCupAACgkQ4207E/PZ +MnRzVxAAqF3Wx//aZKtM6gdxqcPkJfI+xyhGrS2I1hELs9Dtz3FHMun/wDXRC/sS +U5wjN0FA9n25azufrLQFfUQc8zru8ospwVtQ4cK+MW9fCU3vxy36tZNoRpJCVlFB +jYzGq1Ti1hHoslJLb6ZJAe7UuBVL3Zt9Tn92vr1w6B39YT3clRHJEVJ7Im4wLe9L +OjWKbVVxq90apV6k5PGGOZ1boNGVjMyL/hQJlZwOFlb4j8Urz/UBySgVZJtZVbzZ +QVRtedFdm1wXLcSA1RKK2tqsY9ph97A83ftEw1MAlq+ILQB3ZozFJ86/ITGRGgmy +jOgGQqDyRkVljER8ydHaaTbK1sFGpROo8/zC+xkrxNh9jMAmG1Mkdkn4AgMoKJE5 +zqj724kqc0LojFHFt3thAPNwpn/s1PaoKXu0RYpFv48fJ62eIm2sXYZILUmGetn6 +v4AKQTTCqJ62uNhFQ9ntood3aE6cMWDiPfkLmw+wMPwj4crTLXPG8hvrz4DUH2T5 ++DPcojyVMkxnyCumC+rTrsrYP+SbIGcYdGoMMkhX1Tw79toCWDCmrD0tSk03LS0M +J9on4pAar451Kc2nxdwZ+aL4WnHjtHfo2+7FyPU0ENxMk3X87Wid4pjhgjiQla01 +wTG3M+wA4Uwg6QvLYSOoACY56KKvDSN5SH7U6HZMZcUfhKkr5t8= +=7wJN +-----END PGP SIGNATURE----- diff --git a/l10n-115.0.3.tar.xz b/l10n-115.0.3.tar.xz deleted file mode 100644 index 98b815ed..00000000 --- a/l10n-115.0.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ce34098d2c6fa150ca2504e00b6d4229a7dbea22d57be54815f7050fcd2b93b -size 31190600 diff --git a/l10n-116.0.tar.xz b/l10n-116.0.tar.xz new file mode 100644 index 00000000..04b458de --- /dev/null +++ b/l10n-116.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ec46082fc23b0ac59a11aecb73b5f452d6089ef56095e46782bc95f794f0eb3 +size 29930756 diff --git a/mozilla-bmo1775202.patch b/mozilla-bmo1775202.patch index 1b1f5b12..e0348763 100644 --- a/mozilla-bmo1775202.patch +++ b/mozilla-bmo1775202.patch @@ -6,11 +6,51 @@ Subject: Work around bz#1775202 to fix FTBFS on ppc64el third_party/libwebrtc/moz.build | 7 +++++++ 1 file changed, 7 insertions(+) +diff --git a/third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build b/third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build +--- a/third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build ++++ b/third_party/libwebrtc/modules/video_capture/video_capture_internal_impl_gn/moz.build +@@ -318,9 +318,32 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CO + + UNIFIED_SOURCES += [ + "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", + "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", + "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", + "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" + ] + ++if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux": ++ ++ DEFINES["WEBRTC_ENABLE_AVX2"] = True ++ DEFINES["WEBRTC_USE_PIPEWIRE"] = True ++ DEFINES["_GNU_SOURCE"] = True ++ ++ LOCAL_INCLUDES += [ ++ "/gfx/angle/checkout/include/", ++ "/third_party/drm/drm/", ++ "/third_party/drm/drm/include/", ++ "/third_party/drm/drm/include/libdrm/", ++ "/third_party/gbm/gbm/", ++ "/third_party/libepoxy/libepoxy/include/", ++ "/third_party/pipewire/" ++ ] ++ ++ UNIFIED_SOURCES += [ ++ "/third_party/libwebrtc/modules/video_capture/linux/camera_portal.cc", ++ "/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc", ++ "/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc", ++ "/third_party/libwebrtc/modules/video_capture/linux/video_capture_pipewire.cc" ++ ] ++ + Library("video_capture_internal_impl_gn") diff --git a/third_party/libwebrtc/moz.build b/third_party/libwebrtc/moz.build -index 976cf373..311519c 100644 --- a/third_party/libwebrtc/moz.build +++ b/third_party/libwebrtc/moz.build -@@ -566,6 +566,13 @@ if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] == "Linux": +@@ -603,16 +603,28 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CO + "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", + "/third_party/libwebrtc/modules/portal/portal_gn", + "/third_party/libwebrtc/third_party/drm/drm_gn", + "/third_party/libwebrtc/third_party/gbm/gbm_gn", + "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn", "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" ] @@ -19,8 +59,18 @@ index 976cf373..311519c 100644 + DIRS += [ + "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn", + "/third_party/libwebrtc/modules/desktop_capture/primitives_gn", ++ "/third_party/libwebrtc/modules/portal/portal_gn", ++ "/third_party/libwebrtc/third_party/drm/drm_gn", ++ "/third_party/libwebrtc/third_party/gbm/gbm_gn", ++ "/third_party/libwebrtc/third_party/libepoxy/libepoxy_gn", ++ "/third_party/libwebrtc/third_party/pipewire/pipewire_gn" + ] + - if CONFIG["CPU_ARCH"] == "x86" and CONFIG["OS_TARGET"] == "Linux": + if CONFIG["CPU_ARCH"] == "aarch64" and CONFIG["OS_TARGET"] == "OpenBSD": DIRS += [ + "/third_party/libwebrtc/common_audio/common_audio_neon_c_gn", + "/third_party/libwebrtc/common_audio/common_audio_neon_gn" + ] + + if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "OpenBSD": diff --git a/mozilla-fix-top-level-asm.patch b/mozilla-fix-top-level-asm.patch deleted file mode 100644 index 72f2c20b..00000000 --- a/mozilla-fix-top-level-asm.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 91bb79836ee274855393bdf6ab10e24899b1b349 Mon Sep 17 00:00:00 2001 -From: Martin Liska -Date: Fri, 17 May 2019 14:41:35 +0200 -Subject: [PATCH] Fix top-level asm issue. - ---- - security/sandbox/linux/moz.build | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build ---- a/security/sandbox/linux/moz.build -+++ b/security/sandbox/linux/moz.build -@@ -66,32 +66,32 @@ UNIFIED_SOURCES += [ - "../chromium/base/time/time_now_posix.cc", - "../chromium/sandbox/linux/bpf_dsl/bpf_dsl.cc", - "../chromium/sandbox/linux/bpf_dsl/codegen.cc", - "../chromium/sandbox/linux/bpf_dsl/dump_bpf.cc", - "../chromium/sandbox/linux/bpf_dsl/policy.cc", - "../chromium/sandbox/linux/bpf_dsl/policy_compiler.cc", - "../chromium/sandbox/linux/bpf_dsl/syscall_set.cc", - "../chromium/sandbox/linux/seccomp-bpf/die.cc", -- "../chromium/sandbox/linux/seccomp-bpf/syscall.cc", - "broker/SandboxBrokerCommon.cpp", - "Sandbox.cpp", - "SandboxBrokerClient.cpp", - "SandboxFilter.cpp", - "SandboxFilterUtil.cpp", - "SandboxHooks.cpp", - "SandboxInfo.cpp", - "SandboxLogging.cpp", - "SandboxOpenedFiles.cpp", - "SandboxReporterClient.cpp", - ] - - SOURCES += [ - "../chromium/base/strings/safe_sprintf.cc", - "../chromium/base/third_party/icu/icu_utf.cc", -+ "../chromium/sandbox/linux/seccomp-bpf/syscall.cc", - "../chromium/sandbox/linux/seccomp-bpf/trap.cc", - "../chromium/sandbox/linux/services/syscall_wrappers.cc", - ] - - # This copy of SafeSPrintf doesn't need to avoid the Chromium logging - # dependency like the one in libxul does, but this way the behavior is - # consistent. See also the comment in SandboxLogging.h. - SOURCES["../chromium/base/strings/safe_sprintf.cc"].flags += ["-DNDEBUG"] -@@ -105,16 +105,19 @@ if CONFIG["CC_TYPE"] in ("clang", "gcc") - "-Wno-unreachable-code-return" - ] - - if CONFIG["CC_TYPE"] in ("clang", "gcc"): - CXXFLAGS += ["-Wno-error=stack-protector"] - SOURCES["../chromium/sandbox/linux/services/syscall_wrappers.cc"].flags += [ - "-Wno-empty-body", - ] -+ SOURCES['../chromium/sandbox/linux/seccomp-bpf/syscall.cc'].flags += [ -+ '-fno-lto' -+ ] - - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. - for f in CONFIG["OS_CXXFLAGS"]: - if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang": - LDFLAGS += ["--param lto-partitions=1"] - diff --git a/mozilla-kde.patch b/mozilla-kde.patch index 989c4a21..7204c193 100644 --- a/mozilla-kde.patch +++ b/mozilla-kde.patch @@ -3,18 +3,22 @@ # Date 1559294891 -7200 # Fri May 31 11:28:11 2019 +0200 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 -# Parent 0086fcc0d5c86a31cbac0a261ed7b526dd2df2e8 +# Parent eaadcfc5cb5ee0eed248051a657a69646334aad7 Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 https://bugzilla.novell.com/show_bug.cgi?id=170055 -Index: firefox-115.0/modules/libpref/Preferences.cpp -=================================================================== ---- firefox-115.0.orig/modules/libpref/Preferences.cpp -+++ firefox-115.0/modules/libpref/Preferences.cpp -@@ -95,6 +95,7 @@ +diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp +--- a/modules/libpref/Preferences.cpp ++++ b/modules/libpref/Preferences.cpp +@@ -90,16 +90,17 @@ + #include "PLDHashTable.h" + #include "prdtoa.h" + #include "prlink.h" + #include "xpcpublic.h" + #include "js/RootingAPI.h" #ifdef MOZ_BACKGROUNDTASKS # include "mozilla/BackgroundTasks.h" #endif @@ -22,7 +26,17 @@ Index: firefox-115.0/modules/libpref/Preferences.cpp #ifdef DEBUG # include -@@ -4911,6 +4912,16 @@ nsresult Preferences::InitInitialObjects + #endif + + #ifdef MOZ_MEMORY + # include "mozmemory.h" + #endif +@@ -4901,16 +4902,26 @@ nsresult Preferences::InitInitialObjects + "unix.js" + # if defined(_AIX) + , + "aix.js" + # endif #endif }; @@ -39,7 +53,17 @@ Index: firefox-115.0/modules/libpref/Preferences.cpp rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles)); if (NS_FAILED(rv)) { -@@ -4985,7 +4996,7 @@ nsresult Preferences::InitInitialObjects + NS_WARNING("Error parsing application default preferences."); + } + + // Load jar:$app/omni.jar!/defaults/preferences/*.js + // or jar:$gre/omni.jar!/defaults/preferences/*.js. +@@ -4975,17 +4986,17 @@ nsresult Preferences::InitInitialObjects + } + + nsCOMPtr path = do_QueryInterface(elem); + if (!path) { + continue; } // Do we care if a file provided by this process fails to load? @@ -48,11 +72,20 @@ Index: firefox-115.0/modules/libpref/Preferences.cpp } } -Index: firefox-115.0/modules/libpref/moz.build -=================================================================== ---- firefox-115.0.orig/modules/libpref/moz.build -+++ firefox-115.0/modules/libpref/moz.build -@@ -126,6 +126,10 @@ UNIFIED_SOURCES += [ + #if defined(MOZ_WIDGET_GTK) + // To ensure the system-wide preferences are not overwritten by + // firefox/browser/defauts/preferences/*.js we need to load + // the /etc/firefox/defaults/pref/*.js settings as last. + // Under Flatpak, the NS_OS_SYSTEM_CONFIG_DIR points to /app/etc/firefox +diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build +--- a/modules/libpref/moz.build ++++ b/modules/libpref/moz.build +@@ -121,16 +121,20 @@ EXPORTS.mozilla += [ + ] + EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) + + UNIFIED_SOURCES += [ + "Preferences.cpp", "SharedPrefMap.cpp", ] @@ -63,11 +96,20 @@ Index: firefox-115.0/modules/libpref/moz.build gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs) GeneratedFile( -Index: firefox-115.0/python/mozbuild/mozpack/chrome/flags.py -=================================================================== ---- firefox-115.0.orig/python/mozbuild/mozpack/chrome/flags.py -+++ firefox-115.0/python/mozbuild/mozpack/chrome/flags.py -@@ -234,6 +234,7 @@ class Flags(OrderedDict): + *gen_all_tuple, + script="init/generate_static_pref_list.py", + entry_point="emit_code", + inputs=["init/StaticPrefList.yaml"] + ) +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 +@@ -229,16 +229,17 @@ class Flags(OrderedDict): + "os": StringFlag, + "osversion": VersionFlag, + "abi": StringFlag, + "platform": Flag, + "xpcnativewrappers": Flag, "tablet": Flag, "process": StringFlag, "backgroundtask": StringFlag, @@ -75,11 +117,20 @@ Index: firefox-115.0/python/mozbuild/mozpack/chrome/flags.py } RE = re.compile(r"([!<>=]+)") -Index: firefox-115.0/python/mozbuild/mozpack/chrome/manifest.py -=================================================================== ---- firefox-115.0.orig/python/mozbuild/mozpack/chrome/manifest.py -+++ firefox-115.0/python/mozbuild/mozpack/chrome/manifest.py -@@ -43,6 +43,7 @@ class ManifestEntry(object): + def __init__(self, *flags): + """ + Initialize a set of flags given in string form. + flags = Flags('contentaccessible=yes', 'appversion>=3.5') + """ +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): + "os", + "osversion", + "abi", + "xpcnativewrappers", + "tablet", "process", "contentaccessible", "backgroundtask", @@ -87,11 +138,20 @@ Index: firefox-115.0/python/mozbuild/mozpack/chrome/manifest.py ] def __init__(self, base, *flags): -Index: firefox-115.0/toolkit/components/downloads/moz.build -=================================================================== ---- firefox-115.0.orig/toolkit/components/downloads/moz.build -+++ firefox-115.0/toolkit/components/downloads/moz.build -@@ -51,5 +51,9 @@ if CONFIG["MOZ_PLACES"]: + """ + Initialize a manifest entry with the given base path and flags. + """ + self.base = base + self.flags = Flags(*flags) +diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build +--- a/toolkit/components/downloads/moz.build ++++ b/toolkit/components/downloads/moz.build +@@ -46,10 +46,14 @@ XPCOM_MANIFESTS += [ + + if CONFIG["MOZ_PLACES"]: + EXTRA_JS_MODULES += [ + "DownloadHistory.sys.mjs", + ] FINAL_LIBRARY = "xul" @@ -101,11 +161,15 @@ Index: firefox-115.0/toolkit/components/downloads/moz.build + with Files("**"): BUG_COMPONENT = ("Toolkit", "Downloads API") -Index: firefox-115.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs -=================================================================== ---- firefox-115.0.orig/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs -+++ firefox-115.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs -@@ -1246,26 +1246,56 @@ nsUnknownContentTypeDialog.prototype = { +diff --git a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs +--- a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs ++++ b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs +@@ -1241,36 +1241,66 @@ nsUnknownContentTypeDialog.prototype = { + params.handlerApp && + params.handlerApp.executable && + params.handlerApp.executable.isFile() + ) { + // Remember the file they chose to run. this.chosenApp = params.handlerApp; } } else if ("@mozilla.org/applicationchooser;1" in Cc) { @@ -182,11 +246,20 @@ Index: firefox-115.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs } else { var nsIFilePicker = Ci.nsIFilePicker; var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); -Index: firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -=================================================================== ---- firefox-115.0.orig/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -+++ firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp -@@ -16,6 +16,8 @@ + fp.init( + this.mDialog, + this.dialogElement("strings").getString("chooseAppFilePickerTitle"), + nsIFilePicker.modeOpen + ); +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 +@@ -11,16 +11,18 @@ + #include "prenv.h" + #include "nsInterfaceHashtable.h" + #include "nsHashtablesFwd.h" + #include "nsHashKeys.h" + #include "nsNetUtil.h" #include "nsISupportsPrimitives.h" #include "nsIGSettingsService.h" #include "nsReadableUtils.h" @@ -195,7 +268,17 @@ Index: firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp using namespace mozilla; -@@ -39,6 +41,8 @@ class nsUnixSystemProxySettings final : + class nsUnixSystemProxySettings final : public nsISystemProxySettings { + public: + NS_DECL_ISUPPORTS + NS_DECL_NSISYSTEMPROXYSETTINGS + +@@ -34,16 +36,18 @@ class nsUnixSystemProxySettings final : + nsCOMPtr mProxySettings; + nsInterfaceHashtable + mSchemeProxySettings; + nsresult GetProxyFromGSettings(const nsACString& aScheme, + const nsACString& aHost, int32_t aPort, nsACString& aResult); nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); @@ -204,7 +287,17 @@ Index: firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp }; NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings) -@@ -396,6 +400,9 @@ nsresult nsUnixSystemProxySettings::GetP + + NS_IMETHODIMP + nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { + // dbus prevents us from being threadsafe, but this routine should not block + // anyhow +@@ -391,21 +395,46 @@ nsresult nsUnixSystemProxySettings::GetP + return NS_OK; + } + + nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, + const nsACString& aScheme, const nsACString& aHost, const int32_t aPort, nsACString& aResult) { @@ -214,7 +307,8 @@ Index: firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp if (mProxySettings) { nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult); if (NS_SUCCEEDED(rv)) return rv; -@@ -404,6 +411,28 @@ nsresult nsUnixSystemProxySettings::GetP + } + return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); } @@ -243,11 +337,17 @@ Index: firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { auto result = MakeRefPtr(); result->Init(); -Index: firefox-115.0/toolkit/xre/moz.build -=================================================================== ---- firefox-115.0.orig/toolkit/xre/moz.build -+++ firefox-115.0/toolkit/xre/moz.build -@@ -96,7 +96,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "ui + return result.forget().downcast(); + } +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 + "../components/printingui", + ] + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": + UNIFIED_SOURCES += [ + "nsNativeAppSupportDefault.cpp", "UIKitDirProvider.mm", ] elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": @@ -257,10 +357,15 @@ Index: firefox-115.0/toolkit/xre/moz.build "nsNativeAppSupportUnix.cpp", ] CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] -Index: firefox-115.0/toolkit/xre/nsKDEUtils.cpp -=================================================================== + else: + UNIFIED_SOURCES += [ + "nsNativeAppSupportDefault.cpp", + ] + +diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp +new file mode 100644 --- /dev/null -+++ firefox-115.0/toolkit/xre/nsKDEUtils.cpp ++++ b/toolkit/xre/nsKDEUtils.cpp @@ -0,0 +1,286 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public @@ -548,10 +653,10 @@ Index: firefox-115.0/toolkit/xre/nsKDEUtils.cpp + commandFile); // done as \E, so it cannot happen in normal data + fflush(commandFile); +} -Index: firefox-115.0/toolkit/xre/nsKDEUtils.h -=================================================================== +diff --git a/toolkit/xre/nsKDEUtils.h b/toolkit/xre/nsKDEUtils.h +new file mode 100644 --- /dev/null -+++ firefox-115.0/toolkit/xre/nsKDEUtils.h ++++ b/toolkit/xre/nsKDEUtils.h @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public @@ -606,11 +711,15 @@ Index: firefox-115.0/toolkit/xre/nsKDEUtils.h +}; + +#endif // nsKDEUtils -Index: firefox-115.0/uriloader/exthandler/HandlerServiceParent.cpp -=================================================================== ---- firefox-115.0.orig/uriloader/exthandler/HandlerServiceParent.cpp -+++ firefox-115.0/uriloader/exthandler/HandlerServiceParent.cpp -@@ -18,7 +18,7 @@ +diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp +--- a/uriloader/exthandler/HandlerServiceParent.cpp ++++ b/uriloader/exthandler/HandlerServiceParent.cpp +@@ -13,17 +13,17 @@ + #include "ContentHandlerService.h" + #include "nsIExternalProtocolService.h" + #include "nsStringEnumerator.h" + #include "nsIMutableArray.h" + #include "nsCExternalHandlerService.h" #include "nsComponentManagerUtils.h" #include "nsServiceManagerUtils.h" #ifdef MOZ_WIDGET_GTK @@ -619,7 +728,17 @@ Index: firefox-115.0/uriloader/exthandler/HandlerServiceParent.cpp #endif using mozilla::dom::ContentHandlerService; -@@ -310,8 +310,8 @@ mozilla::ipc::IPCResult HandlerServicePa + using mozilla::dom::HandlerApp; + using mozilla::dom::HandlerInfo; + using mozilla::dom::RemoteHandlerApp; + + namespace { +@@ -305,18 +305,18 @@ mozilla::ipc::IPCResult HandlerServicePa + mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocolOS( + const nsACString& aProtocolScheme, bool* aHandlerExists) { + if (aProtocolScheme.Length() > MAX_SCHEME_LENGTH) { + *aHandlerExists = false; + return IPC_OK(); } #ifdef MOZ_WIDGET_GTK // Check the GNOME registry for a protocol handler @@ -630,11 +749,20 @@ Index: firefox-115.0/uriloader/exthandler/HandlerServiceParent.cpp #else *aHandlerExists = false; #endif -Index: firefox-115.0/uriloader/exthandler/moz.build -=================================================================== ---- firefox-115.0.orig/uriloader/exthandler/moz.build -+++ firefox-115.0/uriloader/exthandler/moz.build -@@ -86,7 +86,9 @@ else: + return IPC_OK(); + } + + /* + * Check if a handler exists for the provided protocol. Check the datastore +diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build +--- a/uriloader/exthandler/moz.build ++++ b/uriloader/exthandler/moz.build +@@ -81,17 +81,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "ui + else: + # These files can't be built in unified mode because they redefine LOG. + SOURCES += [ + osdir + "/nsOSHelperAppService.cpp", + ] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": UNIFIED_SOURCES += [ @@ -644,7 +772,17 @@ Index: firefox-115.0/uriloader/exthandler/moz.build "unix/nsMIMEInfoUnix.cpp", ] elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": -@@ -134,6 +136,7 @@ LOCAL_INCLUDES += [ + UNIFIED_SOURCES += [ + "android/nsMIMEInfoAndroid.cpp", + ] + elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": + UNIFIED_SOURCES += [ +@@ -129,16 +131,17 @@ include("/ipc/chromium/chromium-config.m + FINAL_LIBRARY = "xul" + + LOCAL_INCLUDES += [ + "/docshell/base", + "/dom/base", "/dom/ipc", "/netwerk/base", "/netwerk/protocol/http", @@ -652,10 +790,15 @@ Index: firefox-115.0/uriloader/exthandler/moz.build ] if CONFIG["MOZ_ENABLE_DBUS"]: -Index: firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.cpp -=================================================================== + CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] + + if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] + CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] +diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp +new file mode 100644 --- /dev/null -+++ firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.cpp ++++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public @@ -699,10 +842,10 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.cpp + if (nsKDEUtils::kdeSupport()) return nsKDERegistry::GetFromType(aMIMEType); + return nsGNOMERegistry::GetFromType(aMIMEType); +} -Index: firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.h -=================================================================== +diff --git a/uriloader/exthandler/unix/nsCommonRegistry.h b/uriloader/exthandler/unix/nsCommonRegistry.h +new file mode 100644 --- /dev/null -+++ firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.h ++++ b/uriloader/exthandler/unix/nsCommonRegistry.h @@ -0,0 +1,28 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -732,10 +875,10 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.h +}; + +#endif -Index: firefox-115.0/uriloader/exthandler/unix/nsKDERegistry.cpp -=================================================================== +diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp +new file mode 100644 --- /dev/null -+++ firefox-115.0/uriloader/exthandler/unix/nsKDERegistry.cpp ++++ b/uriloader/exthandler/unix/nsKDERegistry.cpp @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public @@ -812,10 +955,10 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsKDERegistry.cpp + } + return nullptr; +} -Index: firefox-115.0/uriloader/exthandler/unix/nsKDERegistry.h -=================================================================== +diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h +new file mode 100644 --- /dev/null -+++ firefox-115.0/uriloader/exthandler/unix/nsKDERegistry.h ++++ b/uriloader/exthandler/unix/nsKDERegistry.h @@ -0,0 +1,35 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -852,11 +995,14 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsKDERegistry.h +}; + +#endif // nsKDERegistry_h__ -Index: firefox-115.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp -=================================================================== ---- firefox-115.0.orig/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp -+++ firefox-115.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp -@@ -5,16 +5,19 @@ +diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp ++++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +@@ -1,48 +1,51 @@ + /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsMIMEInfoUnix.h" @@ -878,7 +1024,14 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp } NS_IMETHODIMP -@@ -29,15 +32,15 @@ nsMIMEInfoUnix::GetHasDefaultHandler(boo + nsMIMEInfoUnix::GetHasDefaultHandler(bool* _retval) { + // if a default app is set, it means the application has been set from + // either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to + // give the GNOME answer. + if (GetDefaultApplication()) { + return nsMIMEInfoImpl::GetHasDefaultHandler(_retval); + } + *_retval = false; if (mClass == eProtocolInfo) { @@ -897,7 +1050,17 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp } } if (mimeInfo) *_retval = true; -@@ -59,6 +62,21 @@ nsresult nsMIMEInfoUnix::LaunchDefaultWi + } + + if (*_retval) return NS_OK; + + return NS_OK; +@@ -54,16 +57,31 @@ nsresult nsMIMEInfoUnix::LaunchDefaultWi + // give the GNOME answer. + if (GetDefaultApplication()) { + return nsMIMEInfoImpl::LaunchDefaultWithFile(aFile); + } + nsAutoCString nativePath; aFile->GetNativePath(nativePath); @@ -919,11 +1082,20 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); if (!giovfs) { return NS_ERROR_FAILURE; -Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp -=================================================================== ---- firefox-115.0.orig/uriloader/exthandler/unix/nsOSHelperAppService.cpp -+++ firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp -@@ -10,7 +10,7 @@ + } + + // nsGIOMimeApp->Launch wants a URI string instead of local file + nsresult rv; + nsCOMPtr ioservice = +diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp +--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp ++++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp +@@ -5,17 +5,17 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + + #include + #include + #include "nsOSHelperAppService.h" #include "nsMIMEInfoUnix.h" #ifdef MOZ_WIDGET_GTK @@ -932,7 +1104,17 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp # ifdef MOZ_BUILD_APP_IS_BROWSER # include "nsIToolkitShellService.h" # include "nsIGNOMEShellService.h" -@@ -1106,7 +1106,7 @@ nsresult nsOSHelperAppService::OSProtoco + # endif + #endif + #include "nsISupports.h" + #include "nsString.h" + #include "nsReadableUtils.h" +@@ -1101,17 +1101,17 @@ nsresult nsOSHelperAppService::GetHandle + + nsresult nsOSHelperAppService::OSProtocolHandlerExists( + const char* aProtocolScheme, bool* aHandlerExists) { + nsresult rv = NS_OK; + if (!XRE_IsContentProcess()) { #ifdef MOZ_WIDGET_GTK // Check the GNOME registry for a protocol handler @@ -941,7 +1123,17 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp #else *aHandlerExists = false; #endif -@@ -1126,7 +1126,7 @@ nsresult nsOSHelperAppService::OSProtoco + } else { + *aHandlerExists = false; + nsCOMPtr handlerSvc = + do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); + if (NS_SUCCEEDED(rv) && handlerSvc) { +@@ -1121,17 +1121,17 @@ nsresult nsOSHelperAppService::OSProtoco + } + + return rv; + } + NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription( const nsACString& aScheme, nsAString& _retval) { #ifdef MOZ_WIDGET_GTK @@ -950,7 +1142,17 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; #else return NS_ERROR_NOT_AVAILABLE; -@@ -1231,7 +1231,7 @@ already_AddRefed nsOSHel + #endif + } + + NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( + const nsACString& aScheme, bool* _retval) { +@@ -1226,17 +1226,17 @@ already_AddRefed nsOSHel + nsresult rv = + LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, + minorType, mime_types_description, true); + + if (NS_FAILED(rv) || majorType.IsEmpty()) { #ifdef MOZ_WIDGET_GTK LOG("Looking in GNOME registry\n"); RefPtr gnomeInfo = @@ -959,7 +1161,17 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp if (gnomeInfo) { LOG("Got MIMEInfo from GNOME registry\n"); return gnomeInfo.forget(); -@@ -1344,7 +1344,7 @@ already_AddRefed nsOSHel + } + #endif + + rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, + minorType, mime_types_description, false); +@@ -1339,17 +1339,17 @@ already_AddRefed nsOSHel + + // Now look up our extensions + nsAutoString extensions, mime_types_description; + LookUpExtensionsAndDescription(majorType, minorType, extensions, + mime_types_description); #ifdef MOZ_WIDGET_GTK if (handler.IsEmpty()) { @@ -968,23 +1180,40 @@ Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp if (gnomeInfo) { LOG("Got MIMEInfo from GNOME registry without extensions; setting them " "to %s\n", -Index: firefox-115.0/widget/gtk/moz.build -=================================================================== ---- firefox-115.0.orig/widget/gtk/moz.build -+++ firefox-115.0/widget/gtk/moz.build -@@ -149,6 +149,7 @@ LOCAL_INCLUDES += [ + NS_LossyConvertUTF16toASCII(extensions).get()); + + NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); + gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); + return gnomeInfo.forget(); +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -146,16 +146,17 @@ FINAL_LIBRARY = "xul" + + LOCAL_INCLUDES += [ + "/layout/base", + "/layout/forms", + "/layout/generic", "/layout/xul", "/other-licenses/atk-1.0", "/third_party/cups/include", + "/toolkit/xre", "/widget", "/widget/headless", + "/widget/x11", ] -Index: firefox-115.0/widget/gtk/nsFilePicker.cpp -=================================================================== ---- firefox-115.0.orig/widget/gtk/nsFilePicker.cpp -+++ firefox-115.0/widget/gtk/nsFilePicker.cpp -@@ -5,6 +5,7 @@ + + DEFINES["CAIRO_GFX"] = True + + DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"] +diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp +--- a/widget/gtk/nsFilePicker.cpp ++++ b/widget/gtk/nsFilePicker.cpp +@@ -1,15 +1,16 @@ + /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include @@ -992,7 +1221,17 @@ Index: firefox-115.0/widget/gtk/nsFilePicker.cpp #include #include #include -@@ -28,6 +29,8 @@ + + #include "mozilla/Types.h" + #include "nsGtkUtils.h" + #include "nsIFileURL.h" + #include "nsIGIOService.h" +@@ -23,16 +24,18 @@ + #include "nsArrayEnumerator.h" + #include "nsEnumeratorUtils.h" + #include "nsNetUtil.h" + #include "nsReadableUtils.h" + #include "MozContainer.h" #include "WidgetUtilsGtk.h" #include "nsFilePicker.h" @@ -1001,7 +1240,17 @@ Index: firefox-115.0/widget/gtk/nsFilePicker.cpp #undef LOG #ifdef MOZ_LOGGING -@@ -242,7 +245,8 @@ NS_IMETHODIMP + # include "mozilla/Logging.h" + # include "nsTArray.h" + # include "Units.h" + extern mozilla::LazyLogModule gWidgetLog; + # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) +@@ -237,17 +240,18 @@ nsFilePicker::AppendFilters(int32_t aFil + mAllowURLs = !!(aFilterMask & filterAllowURLs); + return nsBaseFilePicker::AppendFilters(aFilterMask); + } + + NS_IMETHODIMP nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) { if (aFilter.EqualsLiteral("..apps")) { // No platform specific thing we can do here, really.... @@ -1011,7 +1260,17 @@ Index: firefox-115.0/widget/gtk/nsFilePicker.cpp } nsAutoCString filter, name; -@@ -352,6 +356,31 @@ nsFilePicker::Open(nsIFilePickerShownCal + CopyUTF16toUTF8(aFilter, filter); + CopyUTF16toUTF8(aTitle, name); + + mFilters.AppendElement(filter); + mFilterNames.AppendElement(name); +@@ -347,16 +351,41 @@ nsresult nsFilePicker::Show(nsIFilePicke + return NS_OK; + } + + NS_IMETHODIMP + nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { // Can't show two dialogs concurrently with the same filepicker if (mRunning) return NS_ERROR_NOT_AVAILABLE; @@ -1043,7 +1302,17 @@ Index: firefox-115.0/widget/gtk/nsFilePicker.cpp NS_ConvertUTF16toUTF8 title(mTitle); GtkWindow* parent_widget = -@@ -633,6 +662,205 @@ void nsFilePicker::Done(void* file_choos + GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); + + GtkFileChooserAction action = GetGtkFileChooserAction(mMode); + + const gchar* accept_button; +@@ -628,16 +657,215 @@ void nsFilePicker::Done(void* file_choos + mCallback->Done(result); + mCallback = nullptr; + } else { + mResult = result; + } NS_RELEASE_THIS(); } @@ -1249,11 +1518,20 @@ Index: firefox-115.0/widget/gtk/nsFilePicker.cpp // All below functions available as of GTK 3.20+ void* nsFilePicker::GtkFileChooserNew(const gchar* title, GtkWindow* parent, GtkFileChooserAction action, -Index: firefox-115.0/widget/gtk/nsFilePicker.h -=================================================================== ---- firefox-115.0.orig/widget/gtk/nsFilePicker.h -+++ firefox-115.0/widget/gtk/nsFilePicker.h -@@ -74,6 +74,12 @@ class nsFilePicker : public nsBaseFilePi + const gchar* accept_label) { + static auto sGtkFileChooserNativeNewPtr = + (void* (*)(const gchar*, GtkWindow*, GtkFileChooserAction, const gchar*, + const gchar*))dlsym(RTLD_DEFAULT, + "gtk_file_chooser_native_new"); +diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h +--- a/widget/gtk/nsFilePicker.h ++++ b/widget/gtk/nsFilePicker.h +@@ -69,16 +69,22 @@ class nsFilePicker : public nsBaseFilePi + nsString mDefaultExtension; + + nsTArray mFilters; + nsTArray mFilterNames; + private: static nsIFile* mPrevDisplayDirectory; @@ -1266,11 +1544,20 @@ Index: firefox-115.0/widget/gtk/nsFilePicker.h void* GtkFileChooserNew(const gchar* title, GtkWindow* parent, GtkFileChooserAction action, const gchar* accept_label); -Index: firefox-115.0/xpcom/components/ManifestParser.cpp -=================================================================== ---- firefox-115.0.orig/xpcom/components/ManifestParser.cpp -+++ firefox-115.0/xpcom/components/ManifestParser.cpp -@@ -43,6 +43,7 @@ + void GtkFileChooserShow(void* file_chooser); + void GtkFileChooserDestroy(void* file_chooser); + void GtkFileChooserSetModal(void* file_chooser, GtkWindow* parent_widget, + gboolean modal); + +diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp +--- a/xpcom/components/ManifestParser.cpp ++++ b/xpcom/components/ManifestParser.cpp +@@ -38,16 +38,17 @@ + #include "nsTextFormatter.h" + #include "nsVersionComparator.h" + #include "nsXPCOMCIDInternal.h" + + #include "nsIConsoleService.h" #include "nsIScriptError.h" #include "nsIXULAppInfo.h" #include "nsIXULRuntime.h" @@ -1278,7 +1565,17 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp using namespace mozilla; -@@ -394,6 +395,7 @@ void ParseManifest(NSLocationType aType, + struct ManifestDirective { + const char* directive; + int argc; + + bool ischrome; +@@ -389,16 +390,17 @@ void ParseManifest(NSLocationType aType, + constexpr auto kRemoteEnabled = u"remoteenabled"_ns; + constexpr auto kRemoteRequired = u"remoterequired"_ns; + constexpr auto kApplication = u"application"_ns; + constexpr auto kAppVersion = u"appversion"_ns; + constexpr auto kGeckoVersion = u"platformversion"_ns; constexpr auto kOs = u"os"_ns; constexpr auto kOsVersion = u"osversion"_ns; constexpr auto kABI = u"abi"_ns; @@ -1286,7 +1583,17 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp constexpr auto kProcess = u"process"_ns; #if defined(MOZ_WIDGET_ANDROID) constexpr auto kTablet = u"tablet"_ns; -@@ -453,6 +455,7 @@ void ParseManifest(NSLocationType aType, + #endif + // 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; +@@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType, + CopyUTF8toUTF16(s, abi); + abi.Insert(char16_t('_'), 0); + abi.Insert(osTarget, 0); + } + } } nsAutoString osVersion; @@ -1294,7 +1601,8 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp #if defined(XP_WIN) # pragma warning(push) # pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx -@@ -461,14 +464,17 @@ void ParseManifest(NSLocationType aType, + OSVERSIONINFO info = {sizeof(OSVERSIONINFO)}; + if (GetVersionEx(&info)) { nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, info.dwMinorVersion); } @@ -1312,7 +1620,7 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp #elif defined(MOZ_WIDGET_ANDROID) bool isTablet = false; if (jni::IsAvailable()) { -@@ -476,6 +482,7 @@ void ParseManifest(NSLocationType aType, + jni::String::LocalRef release = java::sdk::Build::VERSION::RELEASE(); osVersion.Assign(release->ToString()); isTablet = java::GeckoAppShell::IsTablet(); } @@ -1320,7 +1628,17 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp #endif if (XRE_IsContentProcess()) { -@@ -576,6 +583,7 @@ void ParseManifest(NSLocationType aType, + process = kContent; + } else { + process = kMain; + } + +@@ -571,25 +578,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; @@ -1328,7 +1646,9 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { -@@ -585,6 +593,7 @@ void ParseManifest(NSLocationType aType, + ToLowerCase(token); + NS_ConvertASCIItoUTF16 wtoken(token); + if (CheckStringFlag(kApplication, wtoken, appID, stApp) || CheckOsFlag(kOs, wtoken, osTarget, stOs) || CheckStringFlag(kABI, wtoken, abi, stABI) || @@ -1336,7 +1656,17 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp CheckStringFlag(kProcess, wtoken, process, stProcess) || CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || -@@ -644,6 +653,7 @@ void ParseManifest(NSLocationType aType, + CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, + stGeckoVersion)) { + continue; + } + +@@ -639,16 +648,17 @@ void ParseManifest(NSLocationType aType, + + LogMessageWithContext( + aFile, line, "Unrecognized chrome manifest modifier '%s'.", token); + ok = false; + } if (!ok || stApp == eBad || stAppVersion == eBad || stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || @@ -1344,11 +1674,20 @@ Index: firefox-115.0/xpcom/components/ManifestParser.cpp #ifdef MOZ_WIDGET_ANDROID stTablet == eBad || #endif -Index: firefox-115.0/xpcom/components/moz.build -=================================================================== ---- firefox-115.0.orig/xpcom/components/moz.build -+++ firefox-115.0/xpcom/components/moz.build -@@ -71,6 +71,7 @@ LOCAL_INCLUDES += [ + #ifdef MOZ_BACKGROUNDTASKS + stBackgroundTask == eBad || + #endif + stABI == eBad || stProcess == eBad) { + continue; +diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build +--- a/xpcom/components/moz.build ++++ b/xpcom/components/moz.build +@@ -66,16 +66,17 @@ LOCAL_INCLUDES += [ + "!..", + "../base", + "../build", + "../ds", + "/chrome", "/js/xpconnect/loader", "/layout/build", "/modules/libjar", @@ -1356,11 +1695,20 @@ Index: firefox-115.0/xpcom/components/moz.build ] if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": -Index: firefox-115.0/xpcom/io/nsLocalFileUnix.cpp -=================================================================== ---- firefox-115.0.orig/xpcom/io/nsLocalFileUnix.cpp -+++ firefox-115.0/xpcom/io/nsLocalFileUnix.cpp -@@ -51,6 +51,7 @@ + CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] + if CONFIG["MOZ_ENABLE_DBUS"]: + CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] + + 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 +@@ -46,16 +46,17 @@ + #include "nsString.h" + #include "nsIDirectoryEnumerator.h" + #include "nsSimpleEnumerator.h" + #include "private/pprio.h" + #include "prlink.h" #ifdef MOZ_WIDGET_GTK # include "nsIGIOService.h" @@ -1368,7 +1716,17 @@ Index: firefox-115.0/xpcom/io/nsLocalFileUnix.cpp #endif #ifdef MOZ_WIDGET_COCOA -@@ -2172,10 +2173,18 @@ nsLocalFile::Reveal() { + # include + # include "CocoaFileUtils.h" + # include "prmem.h" + # include "plbase64.h" + +@@ -2167,20 +2168,28 @@ nsLocalFile::SetPersistentDescriptor(con + + NS_IMETHODIMP + nsLocalFile::Reveal() { + if (!FilePreferences::IsAllowedPath(mPath)) { + return NS_ERROR_FILE_ACCESS_DENIED; } #ifdef MOZ_WIDGET_GTK @@ -1389,7 +1747,17 @@ Index: firefox-115.0/xpcom/io/nsLocalFileUnix.cpp return giovfs->RevealFile(this); #elif defined(MOZ_WIDGET_COCOA) CFURLRef url; -@@ -2197,6 +2206,13 @@ nsLocalFile::Launch() { + if (NS_SUCCEEDED(GetCFURL(&url))) { + nsresult rv = CocoaFileUtils::RevealFileInFinder(url); + ::CFRelease(url); + return rv; + } +@@ -2192,16 +2201,23 @@ nsLocalFile::Reveal() { + + NS_IMETHODIMP + nsLocalFile::Launch() { + if (!FilePreferences::IsAllowedPath(mPath)) { + return NS_ERROR_FILE_ACCESS_DENIED; } #ifdef MOZ_WIDGET_GTK @@ -1403,3 +1771,8 @@ Index: firefox-115.0/xpcom/io/nsLocalFileUnix.cpp nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); if (!giovfs) { return NS_ERROR_FAILURE; + } + + return giovfs->LaunchFile(mPath); + #elif defined(MOZ_WIDGET_ANDROID) + // Not supported on GeckoView diff --git a/tar_stamps b/tar_stamps index 8afbc078..4f9543de 100644 --- a/tar_stamps +++ b/tar_stamps @@ -1,10 +1,10 @@ PRODUCT="firefox" CHANNEL="release" -VERSION="115.0.3" +VERSION="116.0" VERSION_SUFFIX="" -PREV_VERSION="115.0.2" +PREV_VERSION="115.0.3" PREV_VERSION_SUFFIX="" #SKIP_LOCALES="" # Uncomment to skip l10n and compare-locales-generation RELEASE_REPO="https://hg.mozilla.org/releases/mozilla-release" -RELEASE_TAG="326212e7271a9c9f0776153095cf48d7153260aa" -RELEASE_TIMESTAMP="20230726201356" +RELEASE_TAG="e98f6440351172ce5ccd0e3c690025d9e7cb35c3" +RELEASE_TIMESTAMP="20230727152340"