37 + } |
51 + } |
38 + |
52 + |
39 rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, |
53 rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, |
40 ArrayLength(specialFiles)); |
54 ArrayLength(specialFiles)); |
41 if (NS_FAILED(rv)) { |
55 if (NS_FAILED(rv)) { |
42 @@ -4985,7 +4996,7 @@ nsresult Preferences::InitInitialObjects |
56 NS_WARNING("Error parsing application default preferences."); |
|
57 } |
|
58 |
|
59 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
|
60 // or jar:$gre/omni.jar!/defaults/preferences/*.js. |
|
61 @@ -4975,17 +4986,17 @@ nsresult Preferences::InitInitialObjects |
|
62 } |
|
63 |
|
64 nsCOMPtr<nsIFile> path = do_QueryInterface(elem); |
|
65 if (!path) { |
|
66 continue; |
43 } |
67 } |
44 |
68 |
45 // Do we care if a file provided by this process fails to load? |
69 // Do we care if a file provided by this process fails to load? |
46 - pref_LoadPrefsInDir(path, nullptr, 0); |
70 - pref_LoadPrefsInDir(path, nullptr, 0); |
47 + pref_LoadPrefsInDir(path, specialFiles, ArrayLength(specialFiles)); |
71 + pref_LoadPrefsInDir(path, specialFiles, ArrayLength(specialFiles)); |
48 } |
72 } |
49 } |
73 } |
50 |
74 |
51 Index: firefox-115.0/modules/libpref/moz.build |
75 #if defined(MOZ_WIDGET_GTK) |
52 =================================================================== |
76 // To ensure the system-wide preferences are not overwritten by |
53 --- firefox-115.0.orig/modules/libpref/moz.build |
77 // firefox/browser/defauts/preferences/*.js we need to load |
54 +++ firefox-115.0/modules/libpref/moz.build |
78 // the /etc/firefox/defaults/pref/*.js settings as last. |
55 @@ -126,6 +126,10 @@ UNIFIED_SOURCES += [ |
79 // Under Flatpak, the NS_OS_SYSTEM_CONFIG_DIR points to /app/etc/firefox |
|
80 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build |
|
81 --- a/modules/libpref/moz.build |
|
82 +++ b/modules/libpref/moz.build |
|
83 @@ -121,16 +121,20 @@ EXPORTS.mozilla += [ |
|
84 ] |
|
85 EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) |
|
86 |
|
87 UNIFIED_SOURCES += [ |
|
88 "Preferences.cpp", |
56 "SharedPrefMap.cpp", |
89 "SharedPrefMap.cpp", |
57 ] |
90 ] |
58 |
91 |
59 +LOCAL_INCLUDES += [ |
92 +LOCAL_INCLUDES += [ |
60 + '/toolkit/xre' |
93 + '/toolkit/xre' |
61 +] |
94 +] |
62 + |
95 + |
63 gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs) |
96 gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs) |
64 |
97 |
65 GeneratedFile( |
98 GeneratedFile( |
66 Index: firefox-115.0/python/mozbuild/mozpack/chrome/flags.py |
99 *gen_all_tuple, |
67 =================================================================== |
100 script="init/generate_static_pref_list.py", |
68 --- firefox-115.0.orig/python/mozbuild/mozpack/chrome/flags.py |
101 entry_point="emit_code", |
69 +++ firefox-115.0/python/mozbuild/mozpack/chrome/flags.py |
102 inputs=["init/StaticPrefList.yaml"] |
70 @@ -234,6 +234,7 @@ class Flags(OrderedDict): |
103 ) |
|
104 diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py |
|
105 --- a/python/mozbuild/mozpack/chrome/flags.py |
|
106 +++ b/python/mozbuild/mozpack/chrome/flags.py |
|
107 @@ -229,16 +229,17 @@ class Flags(OrderedDict): |
|
108 "os": StringFlag, |
|
109 "osversion": VersionFlag, |
|
110 "abi": StringFlag, |
|
111 "platform": Flag, |
|
112 "xpcnativewrappers": Flag, |
71 "tablet": Flag, |
113 "tablet": Flag, |
72 "process": StringFlag, |
114 "process": StringFlag, |
73 "backgroundtask": StringFlag, |
115 "backgroundtask": StringFlag, |
74 + "desktop": StringFlag, |
116 + "desktop": StringFlag, |
75 } |
117 } |
76 RE = re.compile(r"([!<>=]+)") |
118 RE = re.compile(r"([!<>=]+)") |
77 |
119 |
78 Index: firefox-115.0/python/mozbuild/mozpack/chrome/manifest.py |
120 def __init__(self, *flags): |
79 =================================================================== |
121 """ |
80 --- firefox-115.0.orig/python/mozbuild/mozpack/chrome/manifest.py |
122 Initialize a set of flags given in string form. |
81 +++ firefox-115.0/python/mozbuild/mozpack/chrome/manifest.py |
123 flags = Flags('contentaccessible=yes', 'appversion>=3.5') |
82 @@ -43,6 +43,7 @@ class ManifestEntry(object): |
124 """ |
|
125 diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py |
|
126 --- a/python/mozbuild/mozpack/chrome/manifest.py |
|
127 +++ b/python/mozbuild/mozpack/chrome/manifest.py |
|
128 @@ -38,16 +38,17 @@ class ManifestEntry(object): |
|
129 "os", |
|
130 "osversion", |
|
131 "abi", |
|
132 "xpcnativewrappers", |
|
133 "tablet", |
83 "process", |
134 "process", |
84 "contentaccessible", |
135 "contentaccessible", |
85 "backgroundtask", |
136 "backgroundtask", |
86 + "desktop", |
137 + "desktop", |
87 ] |
138 ] |
88 |
139 |
89 def __init__(self, base, *flags): |
140 def __init__(self, base, *flags): |
90 Index: firefox-115.0/toolkit/components/downloads/moz.build |
141 """ |
91 =================================================================== |
142 Initialize a manifest entry with the given base path and flags. |
92 --- firefox-115.0.orig/toolkit/components/downloads/moz.build |
143 """ |
93 +++ firefox-115.0/toolkit/components/downloads/moz.build |
144 self.base = base |
94 @@ -51,5 +51,9 @@ if CONFIG["MOZ_PLACES"]: |
145 self.flags = Flags(*flags) |
|
146 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build |
|
147 --- a/toolkit/components/downloads/moz.build |
|
148 +++ b/toolkit/components/downloads/moz.build |
|
149 @@ -46,10 +46,14 @@ XPCOM_MANIFESTS += [ |
|
150 |
|
151 if CONFIG["MOZ_PLACES"]: |
|
152 EXTRA_JS_MODULES += [ |
|
153 "DownloadHistory.sys.mjs", |
|
154 ] |
95 |
155 |
96 FINAL_LIBRARY = "xul" |
156 FINAL_LIBRARY = "xul" |
97 |
157 |
98 +LOCAL_INCLUDES += [ |
158 +LOCAL_INCLUDES += [ |
99 + '/toolkit/xre' |
159 + '/toolkit/xre' |
100 +] |
160 +] |
101 + |
161 + |
102 with Files("**"): |
162 with Files("**"): |
103 BUG_COMPONENT = ("Toolkit", "Downloads API") |
163 BUG_COMPONENT = ("Toolkit", "Downloads API") |
104 Index: firefox-115.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs |
164 diff --git a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs |
105 =================================================================== |
165 --- a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs |
106 --- firefox-115.0.orig/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs |
166 +++ b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs |
107 +++ firefox-115.0/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs |
167 @@ -1241,36 +1241,66 @@ nsUnknownContentTypeDialog.prototype = { |
108 @@ -1246,26 +1246,56 @@ nsUnknownContentTypeDialog.prototype = { |
168 params.handlerApp && |
|
169 params.handlerApp.executable && |
|
170 params.handlerApp.executable.isFile() |
|
171 ) { |
|
172 // Remember the file they chose to run. |
109 this.chosenApp = params.handlerApp; |
173 this.chosenApp = params.handlerApp; |
110 } |
174 } |
111 } else if ("@mozilla.org/applicationchooser;1" in Cc) { |
175 } else if ("@mozilla.org/applicationchooser;1" in Cc) { |
112 - var nsIApplicationChooser = Ci.nsIApplicationChooser; |
176 - var nsIApplicationChooser = Ci.nsIApplicationChooser; |
113 - var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance( |
177 - var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance( |
180 + return; |
244 + return; |
181 + } |
245 + } |
182 } else { |
246 } else { |
183 var nsIFilePicker = Ci.nsIFilePicker; |
247 var nsIFilePicker = Ci.nsIFilePicker; |
184 var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); |
248 var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); |
185 Index: firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
249 fp.init( |
186 =================================================================== |
250 this.mDialog, |
187 --- firefox-115.0.orig/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
251 this.dialogElement("strings").getString("chooseAppFilePickerTitle"), |
188 +++ firefox-115.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
252 nsIFilePicker.modeOpen |
189 @@ -16,6 +16,8 @@ |
253 ); |
|
254 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
|
255 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
|
256 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
|
257 @@ -11,16 +11,18 @@ |
|
258 #include "prenv.h" |
|
259 #include "nsInterfaceHashtable.h" |
|
260 #include "nsHashtablesFwd.h" |
|
261 #include "nsHashKeys.h" |
|
262 #include "nsNetUtil.h" |
190 #include "nsISupportsPrimitives.h" |
263 #include "nsISupportsPrimitives.h" |
191 #include "nsIGSettingsService.h" |
264 #include "nsIGSettingsService.h" |
192 #include "nsReadableUtils.h" |
265 #include "nsReadableUtils.h" |
193 +#include "nsPrintfCString.h" |
266 +#include "nsPrintfCString.h" |
194 +#include "nsKDEUtils.h" |
267 +#include "nsKDEUtils.h" |
195 |
268 |
196 using namespace mozilla; |
269 using namespace mozilla; |
197 |
270 |
198 @@ -39,6 +41,8 @@ class nsUnixSystemProxySettings final : |
271 class nsUnixSystemProxySettings final : public nsISystemProxySettings { |
|
272 public: |
|
273 NS_DECL_ISUPPORTS |
|
274 NS_DECL_NSISYSTEMPROXYSETTINGS |
|
275 |
|
276 @@ -34,16 +36,18 @@ class nsUnixSystemProxySettings final : |
|
277 nsCOMPtr<nsIGSettingsCollection> mProxySettings; |
|
278 nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> |
|
279 mSchemeProxySettings; |
|
280 nsresult GetProxyFromGSettings(const nsACString& aScheme, |
|
281 const nsACString& aHost, int32_t aPort, |
199 nsACString& aResult); |
282 nsACString& aResult); |
200 nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, |
283 nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, |
201 nsACString& aResult); |
284 nsACString& aResult); |
202 + nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, |
285 + nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, |
203 + PRInt32 aPort, nsACString& aResult); |
286 + PRInt32 aPort, nsACString& aResult); |
204 }; |
287 }; |
205 |
288 |
206 NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings) |
289 NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings) |
207 @@ -396,6 +400,9 @@ nsresult nsUnixSystemProxySettings::GetP |
290 |
|
291 NS_IMETHODIMP |
|
292 nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { |
|
293 // dbus prevents us from being threadsafe, but this routine should not block |
|
294 // anyhow |
|
295 @@ -391,21 +395,46 @@ nsresult nsUnixSystemProxySettings::GetP |
|
296 return NS_OK; |
|
297 } |
|
298 |
|
299 nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, |
|
300 const nsACString& aScheme, |
208 const nsACString& aHost, |
301 const nsACString& aHost, |
209 const int32_t aPort, |
302 const int32_t aPort, |
210 nsACString& aResult) { |
303 nsACString& aResult) { |
211 + if (nsKDEUtils::kdeSupport()) |
304 + if (nsKDEUtils::kdeSupport()) |
212 + return GetProxyFromKDE(aScheme, aHost, aPort, aResult); |
305 + return GetProxyFromKDE(aScheme, aHost, aPort, aResult); |
213 + |
306 + |
214 if (mProxySettings) { |
307 if (mProxySettings) { |
215 nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult); |
308 nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult); |
216 if (NS_SUCCEEDED(rv)) return rv; |
309 if (NS_SUCCEEDED(rv)) return rv; |
217 @@ -404,6 +411,28 @@ nsresult nsUnixSystemProxySettings::GetP |
310 } |
|
311 |
218 return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); |
312 return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult); |
219 } |
313 } |
220 |
314 |
221 +nsresult nsUnixSystemProxySettings::GetProxyFromKDE(const nsACString& aScheme, |
315 +nsresult nsUnixSystemProxySettings::GetProxyFromKDE(const nsACString& aScheme, |
222 + const nsACString& aHost, |
316 + const nsACString& aHost, |
241 +} |
335 +} |
242 + |
336 + |
243 NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { |
337 NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) { |
244 auto result = MakeRefPtr<nsUnixSystemProxySettings>(); |
338 auto result = MakeRefPtr<nsUnixSystemProxySettings>(); |
245 result->Init(); |
339 result->Init(); |
246 Index: firefox-115.0/toolkit/xre/moz.build |
340 return result.forget().downcast<nsISupports>(); |
247 =================================================================== |
341 } |
248 --- firefox-115.0.orig/toolkit/xre/moz.build |
342 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build |
249 +++ firefox-115.0/toolkit/xre/moz.build |
343 --- a/toolkit/xre/moz.build |
250 @@ -96,7 +96,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "ui |
344 +++ b/toolkit/xre/moz.build |
|
345 @@ -91,17 +91,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co |
|
346 "../components/printingui", |
|
347 ] |
|
348 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": |
|
349 UNIFIED_SOURCES += [ |
|
350 "nsNativeAppSupportDefault.cpp", |
251 "UIKitDirProvider.mm", |
351 "UIKitDirProvider.mm", |
252 ] |
352 ] |
253 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
353 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
254 + EXPORTS += ['nsKDEUtils.h'] |
354 + EXPORTS += ['nsKDEUtils.h'] |
255 UNIFIED_SOURCES += [ |
355 UNIFIED_SOURCES += [ |
256 + "nsKDEUtils.cpp", |
356 + "nsKDEUtils.cpp", |
257 "nsNativeAppSupportUnix.cpp", |
357 "nsNativeAppSupportUnix.cpp", |
258 ] |
358 ] |
259 CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] |
359 CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"] |
260 Index: firefox-115.0/toolkit/xre/nsKDEUtils.cpp |
360 else: |
261 =================================================================== |
361 UNIFIED_SOURCES += [ |
|
362 "nsNativeAppSupportDefault.cpp", |
|
363 ] |
|
364 |
|
365 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
|
366 new file mode 100644 |
262 --- /dev/null |
367 --- /dev/null |
263 +++ firefox-115.0/toolkit/xre/nsKDEUtils.cpp |
368 +++ b/toolkit/xre/nsKDEUtils.cpp |
264 @@ -0,0 +1,286 @@ |
369 @@ -0,0 +1,286 @@ |
265 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
370 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
266 +/* This Source Code Form is subject to the terms of the Mozilla Public |
371 +/* This Source Code Form is subject to the terms of the Mozilla Public |
267 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
372 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
268 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
373 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
604 + FILE* commandFile; |
709 + FILE* commandFile; |
605 + FILE* replyFile; |
710 + FILE* replyFile; |
606 +}; |
711 +}; |
607 + |
712 + |
608 +#endif // nsKDEUtils |
713 +#endif // nsKDEUtils |
609 Index: firefox-115.0/uriloader/exthandler/HandlerServiceParent.cpp |
714 diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp |
610 =================================================================== |
715 --- a/uriloader/exthandler/HandlerServiceParent.cpp |
611 --- firefox-115.0.orig/uriloader/exthandler/HandlerServiceParent.cpp |
716 +++ b/uriloader/exthandler/HandlerServiceParent.cpp |
612 +++ firefox-115.0/uriloader/exthandler/HandlerServiceParent.cpp |
717 @@ -13,17 +13,17 @@ |
613 @@ -18,7 +18,7 @@ |
718 #include "ContentHandlerService.h" |
|
719 #include "nsIExternalProtocolService.h" |
|
720 #include "nsStringEnumerator.h" |
|
721 #include "nsIMutableArray.h" |
|
722 #include "nsCExternalHandlerService.h" |
614 #include "nsComponentManagerUtils.h" |
723 #include "nsComponentManagerUtils.h" |
615 #include "nsServiceManagerUtils.h" |
724 #include "nsServiceManagerUtils.h" |
616 #ifdef MOZ_WIDGET_GTK |
725 #ifdef MOZ_WIDGET_GTK |
617 -# include "unix/nsGNOMERegistry.h" |
726 -# include "unix/nsGNOMERegistry.h" |
618 +# include "unix/nsCommonRegistry.h" |
727 +# include "unix/nsCommonRegistry.h" |
619 #endif |
728 #endif |
620 |
729 |
621 using mozilla::dom::ContentHandlerService; |
730 using mozilla::dom::ContentHandlerService; |
622 @@ -310,8 +310,8 @@ mozilla::ipc::IPCResult HandlerServicePa |
731 using mozilla::dom::HandlerApp; |
|
732 using mozilla::dom::HandlerInfo; |
|
733 using mozilla::dom::RemoteHandlerApp; |
|
734 |
|
735 namespace { |
|
736 @@ -305,18 +305,18 @@ mozilla::ipc::IPCResult HandlerServicePa |
|
737 mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocolOS( |
|
738 const nsACString& aProtocolScheme, bool* aHandlerExists) { |
|
739 if (aProtocolScheme.Length() > MAX_SCHEME_LENGTH) { |
|
740 *aHandlerExists = false; |
|
741 return IPC_OK(); |
623 } |
742 } |
624 #ifdef MOZ_WIDGET_GTK |
743 #ifdef MOZ_WIDGET_GTK |
625 // Check the GNOME registry for a protocol handler |
744 // Check the GNOME registry for a protocol handler |
626 - *aHandlerExists = |
745 - *aHandlerExists = |
627 - nsGNOMERegistry::HandlerExists(PromiseFlatCString(aProtocolScheme).get()); |
746 - nsGNOMERegistry::HandlerExists(PromiseFlatCString(aProtocolScheme).get()); |
628 + *aHandlerExists = nsCommonRegistry::HandlerExists( |
747 + *aHandlerExists = nsCommonRegistry::HandlerExists( |
629 + PromiseFlatCString(aProtocolScheme).get()); |
748 + PromiseFlatCString(aProtocolScheme).get()); |
630 #else |
749 #else |
631 *aHandlerExists = false; |
750 *aHandlerExists = false; |
632 #endif |
751 #endif |
633 Index: firefox-115.0/uriloader/exthandler/moz.build |
752 return IPC_OK(); |
634 =================================================================== |
753 } |
635 --- firefox-115.0.orig/uriloader/exthandler/moz.build |
754 |
636 +++ firefox-115.0/uriloader/exthandler/moz.build |
755 /* |
637 @@ -86,7 +86,9 @@ else: |
756 * Check if a handler exists for the provided protocol. Check the datastore |
|
757 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build |
|
758 --- a/uriloader/exthandler/moz.build |
|
759 +++ b/uriloader/exthandler/moz.build |
|
760 @@ -81,17 +81,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "ui |
|
761 else: |
|
762 # These files can't be built in unified mode because they redefine LOG. |
|
763 SOURCES += [ |
|
764 osdir + "/nsOSHelperAppService.cpp", |
|
765 ] |
638 |
766 |
639 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
767 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
640 UNIFIED_SOURCES += [ |
768 UNIFIED_SOURCES += [ |
641 + "unix/nsCommonRegistry.cpp", |
769 + "unix/nsCommonRegistry.cpp", |
642 "unix/nsGNOMERegistry.cpp", |
770 "unix/nsGNOMERegistry.cpp", |
643 + "unix/nsKDERegistry.cpp", |
771 + "unix/nsKDERegistry.cpp", |
644 "unix/nsMIMEInfoUnix.cpp", |
772 "unix/nsMIMEInfoUnix.cpp", |
645 ] |
773 ] |
646 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": |
774 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": |
647 @@ -134,6 +136,7 @@ LOCAL_INCLUDES += [ |
775 UNIFIED_SOURCES += [ |
|
776 "android/nsMIMEInfoAndroid.cpp", |
|
777 ] |
|
778 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": |
|
779 UNIFIED_SOURCES += [ |
|
780 @@ -129,16 +131,17 @@ include("/ipc/chromium/chromium-config.m |
|
781 FINAL_LIBRARY = "xul" |
|
782 |
|
783 LOCAL_INCLUDES += [ |
|
784 "/docshell/base", |
|
785 "/dom/base", |
648 "/dom/ipc", |
786 "/dom/ipc", |
649 "/netwerk/base", |
787 "/netwerk/base", |
650 "/netwerk/protocol/http", |
788 "/netwerk/protocol/http", |
651 + "/toolkit/xre", |
789 + "/toolkit/xre", |
652 ] |
790 ] |
653 |
791 |
654 if CONFIG["MOZ_ENABLE_DBUS"]: |
792 if CONFIG["MOZ_ENABLE_DBUS"]: |
655 Index: firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.cpp |
793 CXXFLAGS += CONFIG["MOZ_DBUS_CFLAGS"] |
656 =================================================================== |
794 |
|
795 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
|
796 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] |
|
797 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] |
|
798 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
|
799 new file mode 100644 |
657 --- /dev/null |
800 --- /dev/null |
658 +++ firefox-115.0/uriloader/exthandler/unix/nsCommonRegistry.cpp |
801 +++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
659 @@ -0,0 +1,42 @@ |
802 @@ -0,0 +1,42 @@ |
660 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
803 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
661 +/* This Source Code Form is subject to the terms of the Mozilla Public |
804 +/* This Source Code Form is subject to the terms of the Mozilla Public |
662 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
805 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
663 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
806 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
917 + } |
1080 + } |
918 + |
1081 + |
919 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
1082 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
920 if (!giovfs) { |
1083 if (!giovfs) { |
921 return NS_ERROR_FAILURE; |
1084 return NS_ERROR_FAILURE; |
922 Index: firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp |
1085 } |
923 =================================================================== |
1086 |
924 --- firefox-115.0.orig/uriloader/exthandler/unix/nsOSHelperAppService.cpp |
1087 // nsGIOMimeApp->Launch wants a URI string instead of local file |
925 +++ firefox-115.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp |
1088 nsresult rv; |
926 @@ -10,7 +10,7 @@ |
1089 nsCOMPtr<nsIIOService> ioservice = |
|
1090 diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp |
|
1091 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp |
|
1092 +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp |
|
1093 @@ -5,17 +5,17 @@ |
|
1094 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
1095 |
|
1096 #include <sys/types.h> |
|
1097 #include <sys/stat.h> |
|
1098 |
927 #include "nsOSHelperAppService.h" |
1099 #include "nsOSHelperAppService.h" |
928 #include "nsMIMEInfoUnix.h" |
1100 #include "nsMIMEInfoUnix.h" |
929 #ifdef MOZ_WIDGET_GTK |
1101 #ifdef MOZ_WIDGET_GTK |
930 -# include "nsGNOMERegistry.h" |
1102 -# include "nsGNOMERegistry.h" |
931 +# include "nsCommonRegistry.h" |
1103 +# include "nsCommonRegistry.h" |
932 # ifdef MOZ_BUILD_APP_IS_BROWSER |
1104 # ifdef MOZ_BUILD_APP_IS_BROWSER |
933 # include "nsIToolkitShellService.h" |
1105 # include "nsIToolkitShellService.h" |
934 # include "nsIGNOMEShellService.h" |
1106 # include "nsIGNOMEShellService.h" |
935 @@ -1106,7 +1106,7 @@ nsresult nsOSHelperAppService::OSProtoco |
1107 # endif |
|
1108 #endif |
|
1109 #include "nsISupports.h" |
|
1110 #include "nsString.h" |
|
1111 #include "nsReadableUtils.h" |
|
1112 @@ -1101,17 +1101,17 @@ nsresult nsOSHelperAppService::GetHandle |
|
1113 |
|
1114 nsresult nsOSHelperAppService::OSProtocolHandlerExists( |
|
1115 const char* aProtocolScheme, bool* aHandlerExists) { |
|
1116 nsresult rv = NS_OK; |
|
1117 |
936 if (!XRE_IsContentProcess()) { |
1118 if (!XRE_IsContentProcess()) { |
937 #ifdef MOZ_WIDGET_GTK |
1119 #ifdef MOZ_WIDGET_GTK |
938 // Check the GNOME registry for a protocol handler |
1120 // Check the GNOME registry for a protocol handler |
939 - *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); |
1121 - *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); |
940 + *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); |
1122 + *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); |
941 #else |
1123 #else |
942 *aHandlerExists = false; |
1124 *aHandlerExists = false; |
943 #endif |
1125 #endif |
944 @@ -1126,7 +1126,7 @@ nsresult nsOSHelperAppService::OSProtoco |
1126 } else { |
|
1127 *aHandlerExists = false; |
|
1128 nsCOMPtr<nsIHandlerService> handlerSvc = |
|
1129 do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); |
|
1130 if (NS_SUCCEEDED(rv) && handlerSvc) { |
|
1131 @@ -1121,17 +1121,17 @@ nsresult nsOSHelperAppService::OSProtoco |
|
1132 } |
|
1133 |
|
1134 return rv; |
|
1135 } |
|
1136 |
945 NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription( |
1137 NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription( |
946 const nsACString& aScheme, nsAString& _retval) { |
1138 const nsACString& aScheme, nsAString& _retval) { |
947 #ifdef MOZ_WIDGET_GTK |
1139 #ifdef MOZ_WIDGET_GTK |
948 - nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); |
1140 - nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); |
949 + nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); |
1141 + nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); |
950 return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; |
1142 return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; |
951 #else |
1143 #else |
952 return NS_ERROR_NOT_AVAILABLE; |
1144 return NS_ERROR_NOT_AVAILABLE; |
953 @@ -1231,7 +1231,7 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1145 #endif |
|
1146 } |
|
1147 |
|
1148 NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( |
|
1149 const nsACString& aScheme, bool* _retval) { |
|
1150 @@ -1226,17 +1226,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
|
1151 nsresult rv = |
|
1152 LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
|
1153 minorType, mime_types_description, true); |
|
1154 |
|
1155 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
954 #ifdef MOZ_WIDGET_GTK |
1156 #ifdef MOZ_WIDGET_GTK |
955 LOG("Looking in GNOME registry\n"); |
1157 LOG("Looking in GNOME registry\n"); |
956 RefPtr<nsMIMEInfoBase> gnomeInfo = |
1158 RefPtr<nsMIMEInfoBase> gnomeInfo = |
957 - nsGNOMERegistry::GetFromExtension(aFileExt); |
1159 - nsGNOMERegistry::GetFromExtension(aFileExt); |
958 + nsCommonRegistry::GetFromExtension(aFileExt); |
1160 + nsCommonRegistry::GetFromExtension(aFileExt); |
959 if (gnomeInfo) { |
1161 if (gnomeInfo) { |
960 LOG("Got MIMEInfo from GNOME registry\n"); |
1162 LOG("Got MIMEInfo from GNOME registry\n"); |
961 return gnomeInfo.forget(); |
1163 return gnomeInfo.forget(); |
962 @@ -1344,7 +1344,7 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1164 } |
|
1165 #endif |
|
1166 |
|
1167 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
|
1168 minorType, mime_types_description, false); |
|
1169 @@ -1339,17 +1339,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
|
1170 |
|
1171 // Now look up our extensions |
|
1172 nsAutoString extensions, mime_types_description; |
|
1173 LookUpExtensionsAndDescription(majorType, minorType, extensions, |
|
1174 mime_types_description); |
963 |
1175 |
964 #ifdef MOZ_WIDGET_GTK |
1176 #ifdef MOZ_WIDGET_GTK |
965 if (handler.IsEmpty()) { |
1177 if (handler.IsEmpty()) { |
966 - RefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType); |
1178 - RefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType); |
967 + RefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType); |
1179 + RefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType); |
968 if (gnomeInfo) { |
1180 if (gnomeInfo) { |
969 LOG("Got MIMEInfo from GNOME registry without extensions; setting them " |
1181 LOG("Got MIMEInfo from GNOME registry without extensions; setting them " |
970 "to %s\n", |
1182 "to %s\n", |
971 Index: firefox-115.0/widget/gtk/moz.build |
1183 NS_LossyConvertUTF16toASCII(extensions).get()); |
972 =================================================================== |
1184 |
973 --- firefox-115.0.orig/widget/gtk/moz.build |
1185 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
974 +++ firefox-115.0/widget/gtk/moz.build |
1186 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
975 @@ -149,6 +149,7 @@ LOCAL_INCLUDES += [ |
1187 return gnomeInfo.forget(); |
|
1188 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
|
1189 --- a/widget/gtk/moz.build |
|
1190 +++ b/widget/gtk/moz.build |
|
1191 @@ -146,16 +146,17 @@ FINAL_LIBRARY = "xul" |
|
1192 |
|
1193 LOCAL_INCLUDES += [ |
|
1194 "/layout/base", |
|
1195 "/layout/forms", |
|
1196 "/layout/generic", |
976 "/layout/xul", |
1197 "/layout/xul", |
977 "/other-licenses/atk-1.0", |
1198 "/other-licenses/atk-1.0", |
978 "/third_party/cups/include", |
1199 "/third_party/cups/include", |
979 + "/toolkit/xre", |
1200 + "/toolkit/xre", |
980 "/widget", |
1201 "/widget", |
981 "/widget/headless", |
1202 "/widget/headless", |
|
1203 "/widget/x11", |
982 ] |
1204 ] |
983 Index: firefox-115.0/widget/gtk/nsFilePicker.cpp |
1205 |
984 =================================================================== |
1206 DEFINES["CAIRO_GFX"] = True |
985 --- firefox-115.0.orig/widget/gtk/nsFilePicker.cpp |
1207 |
986 +++ firefox-115.0/widget/gtk/nsFilePicker.cpp |
1208 DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"] |
987 @@ -5,6 +5,7 @@ |
1209 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp |
|
1210 --- a/widget/gtk/nsFilePicker.cpp |
|
1211 +++ b/widget/gtk/nsFilePicker.cpp |
|
1212 @@ -1,15 +1,16 @@ |
|
1213 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
1214 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
1215 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
1216 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
988 |
1217 |
989 #include <dlfcn.h> |
1218 #include <dlfcn.h> |
990 #include <gtk/gtk.h> |
1219 #include <gtk/gtk.h> |
991 +#include <gdk/gdkx.h> |
1220 +#include <gdk/gdkx.h> |
992 #include <sys/types.h> |
1221 #include <sys/types.h> |
993 #include <sys/stat.h> |
1222 #include <sys/stat.h> |
994 #include <unistd.h> |
1223 #include <unistd.h> |
995 @@ -28,6 +29,8 @@ |
1224 |
|
1225 #include "mozilla/Types.h" |
|
1226 #include "nsGtkUtils.h" |
|
1227 #include "nsIFileURL.h" |
|
1228 #include "nsIGIOService.h" |
|
1229 @@ -23,16 +24,18 @@ |
|
1230 #include "nsArrayEnumerator.h" |
|
1231 #include "nsEnumeratorUtils.h" |
|
1232 #include "nsNetUtil.h" |
|
1233 #include "nsReadableUtils.h" |
|
1234 #include "MozContainer.h" |
996 #include "WidgetUtilsGtk.h" |
1235 #include "WidgetUtilsGtk.h" |
997 |
1236 |
998 #include "nsFilePicker.h" |
1237 #include "nsFilePicker.h" |
999 +#include "nsKDEUtils.h" |
1238 +#include "nsKDEUtils.h" |
1000 +#include "nsURLHelper.h" |
1239 +#include "nsURLHelper.h" |
1001 |
1240 |
1002 #undef LOG |
1241 #undef LOG |
1003 #ifdef MOZ_LOGGING |
1242 #ifdef MOZ_LOGGING |
1004 @@ -242,7 +245,8 @@ NS_IMETHODIMP |
1243 # include "mozilla/Logging.h" |
|
1244 # include "nsTArray.h" |
|
1245 # include "Units.h" |
|
1246 extern mozilla::LazyLogModule gWidgetLog; |
|
1247 # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) |
|
1248 @@ -237,17 +240,18 @@ nsFilePicker::AppendFilters(int32_t aFil |
|
1249 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
|
1250 return nsBaseFilePicker::AppendFilters(aFilterMask); |
|
1251 } |
|
1252 |
|
1253 NS_IMETHODIMP |
1005 nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) { |
1254 nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) { |
1006 if (aFilter.EqualsLiteral("..apps")) { |
1255 if (aFilter.EqualsLiteral("..apps")) { |
1007 // No platform specific thing we can do here, really.... |
1256 // No platform specific thing we can do here, really.... |
1008 - return NS_OK; |
1257 - return NS_OK; |
1009 + // Unless it's KDE. |
1258 + // Unless it's KDE. |
1010 + if (mMode != modeOpen || !nsKDEUtils::kdeSupport()) return NS_OK; |
1259 + if (mMode != modeOpen || !nsKDEUtils::kdeSupport()) return NS_OK; |
1011 } |
1260 } |
1012 |
1261 |
1013 nsAutoCString filter, name; |
1262 nsAutoCString filter, name; |
1014 @@ -352,6 +356,31 @@ nsFilePicker::Open(nsIFilePickerShownCal |
1263 CopyUTF16toUTF8(aFilter, filter); |
|
1264 CopyUTF16toUTF8(aTitle, name); |
|
1265 |
|
1266 mFilters.AppendElement(filter); |
|
1267 mFilterNames.AppendElement(name); |
|
1268 @@ -347,16 +351,41 @@ nsresult nsFilePicker::Show(nsIFilePicke |
|
1269 return NS_OK; |
|
1270 } |
|
1271 |
|
1272 NS_IMETHODIMP |
|
1273 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1015 // Can't show two dialogs concurrently with the same filepicker |
1274 // Can't show two dialogs concurrently with the same filepicker |
1016 if (mRunning) return NS_ERROR_NOT_AVAILABLE; |
1275 if (mRunning) return NS_ERROR_NOT_AVAILABLE; |
1017 |
1276 |
1018 + // KDE file picker is not handled via callback |
1277 + // KDE file picker is not handled via callback |
1019 + if (nsKDEUtils::kdeSupport()) { |
1278 + if (nsKDEUtils::kdeSupport()) { |
1264 + nsCString kdeMakeFilter(int index); |
1542 + nsCString kdeMakeFilter(int index); |
1265 + |
1543 + |
1266 void* GtkFileChooserNew(const gchar* title, GtkWindow* parent, |
1544 void* GtkFileChooserNew(const gchar* title, GtkWindow* parent, |
1267 GtkFileChooserAction action, |
1545 GtkFileChooserAction action, |
1268 const gchar* accept_label); |
1546 const gchar* accept_label); |
1269 Index: firefox-115.0/xpcom/components/ManifestParser.cpp |
1547 void GtkFileChooserShow(void* file_chooser); |
1270 =================================================================== |
1548 void GtkFileChooserDestroy(void* file_chooser); |
1271 --- firefox-115.0.orig/xpcom/components/ManifestParser.cpp |
1549 void GtkFileChooserSetModal(void* file_chooser, GtkWindow* parent_widget, |
1272 +++ firefox-115.0/xpcom/components/ManifestParser.cpp |
1550 gboolean modal); |
1273 @@ -43,6 +43,7 @@ |
1551 |
|
1552 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
|
1553 --- a/xpcom/components/ManifestParser.cpp |
|
1554 +++ b/xpcom/components/ManifestParser.cpp |
|
1555 @@ -38,16 +38,17 @@ |
|
1556 #include "nsTextFormatter.h" |
|
1557 #include "nsVersionComparator.h" |
|
1558 #include "nsXPCOMCIDInternal.h" |
|
1559 |
|
1560 #include "nsIConsoleService.h" |
1274 #include "nsIScriptError.h" |
1561 #include "nsIScriptError.h" |
1275 #include "nsIXULAppInfo.h" |
1562 #include "nsIXULAppInfo.h" |
1276 #include "nsIXULRuntime.h" |
1563 #include "nsIXULRuntime.h" |
1277 +#include "nsKDEUtils.h" |
1564 +#include "nsKDEUtils.h" |
1278 |
1565 |
1279 using namespace mozilla; |
1566 using namespace mozilla; |
1280 |
1567 |
1281 @@ -394,6 +395,7 @@ void ParseManifest(NSLocationType aType, |
1568 struct ManifestDirective { |
|
1569 const char* directive; |
|
1570 int argc; |
|
1571 |
|
1572 bool ischrome; |
|
1573 @@ -389,16 +390,17 @@ void ParseManifest(NSLocationType aType, |
|
1574 constexpr auto kRemoteEnabled = u"remoteenabled"_ns; |
|
1575 constexpr auto kRemoteRequired = u"remoterequired"_ns; |
|
1576 constexpr auto kApplication = u"application"_ns; |
|
1577 constexpr auto kAppVersion = u"appversion"_ns; |
|
1578 constexpr auto kGeckoVersion = u"platformversion"_ns; |
1282 constexpr auto kOs = u"os"_ns; |
1579 constexpr auto kOs = u"os"_ns; |
1283 constexpr auto kOsVersion = u"osversion"_ns; |
1580 constexpr auto kOsVersion = u"osversion"_ns; |
1284 constexpr auto kABI = u"abi"_ns; |
1581 constexpr auto kABI = u"abi"_ns; |
1285 + constexpr auto kDesktop = u"desktop"_ns; |
1582 + constexpr auto kDesktop = u"desktop"_ns; |
1286 constexpr auto kProcess = u"process"_ns; |
1583 constexpr auto kProcess = u"process"_ns; |
1287 #if defined(MOZ_WIDGET_ANDROID) |
1584 #if defined(MOZ_WIDGET_ANDROID) |
1288 constexpr auto kTablet = u"tablet"_ns; |
1585 constexpr auto kTablet = u"tablet"_ns; |
1289 @@ -453,6 +455,7 @@ void ParseManifest(NSLocationType aType, |
1586 #endif |
|
1587 // You might expect this to be guarded by MOZ_BACKGROUNDTASKS, but it's not |
|
1588 // possible to have conditional manifest contents, so we need to recognize and |
|
1589 // discard these tokens even when MOZ_BACKGROUNDTASKS is not set. |
|
1590 constexpr auto kBackgroundTask = u"backgroundtask"_ns; |
|
1591 @@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType, |
|
1592 CopyUTF8toUTF16(s, abi); |
|
1593 abi.Insert(char16_t('_'), 0); |
|
1594 abi.Insert(osTarget, 0); |
|
1595 } |
|
1596 } |
1290 } |
1597 } |
1291 |
1598 |
1292 nsAutoString osVersion; |
1599 nsAutoString osVersion; |
1293 + nsAutoString desktop; |
1600 + nsAutoString desktop; |
1294 #if defined(XP_WIN) |
1601 #if defined(XP_WIN) |
1295 # pragma warning(push) |
1602 # pragma warning(push) |
1296 # pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx |
1603 # pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx |
1297 @@ -461,14 +464,17 @@ void ParseManifest(NSLocationType aType, |
1604 OSVERSIONINFO info = {sizeof(OSVERSIONINFO)}; |
|
1605 if (GetVersionEx(&info)) { |
1298 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, |
1606 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, |
1299 info.dwMinorVersion); |
1607 info.dwMinorVersion); |
1300 } |
1608 } |
1301 + desktop = u"win"_ns; |
1609 + desktop = u"win"_ns; |
1302 # pragma warning(pop) |
1610 # pragma warning(pop) |
1310 gtk_minor_version); |
1618 gtk_minor_version); |
1311 + desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns; |
1619 + desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns; |
1312 #elif defined(MOZ_WIDGET_ANDROID) |
1620 #elif defined(MOZ_WIDGET_ANDROID) |
1313 bool isTablet = false; |
1621 bool isTablet = false; |
1314 if (jni::IsAvailable()) { |
1622 if (jni::IsAvailable()) { |
1315 @@ -476,6 +482,7 @@ void ParseManifest(NSLocationType aType, |
1623 jni::String::LocalRef release = java::sdk::Build::VERSION::RELEASE(); |
1316 osVersion.Assign(release->ToString()); |
1624 osVersion.Assign(release->ToString()); |
1317 isTablet = java::GeckoAppShell::IsTablet(); |
1625 isTablet = java::GeckoAppShell::IsTablet(); |
1318 } |
1626 } |
1319 + desktop = u"android"_ns; |
1627 + desktop = u"android"_ns; |
1320 #endif |
1628 #endif |
1321 |
1629 |
1322 if (XRE_IsContentProcess()) { |
1630 if (XRE_IsContentProcess()) { |
1323 @@ -576,6 +583,7 @@ void ParseManifest(NSLocationType aType, |
1631 process = kContent; |
|
1632 } else { |
|
1633 process = kMain; |
|
1634 } |
|
1635 |
|
1636 @@ -571,25 +578,27 @@ void ParseManifest(NSLocationType aType, |
|
1637 // When in background task mode, default to not registering |
|
1638 // category directivies unless backgroundtask=1 is specified. |
|
1639 TriState stBackgroundTask = (BackgroundTasks::IsBackgroundTaskMode() && |
|
1640 strcmp("category", directive->directive) == 0) |
|
1641 ? eBad |
1324 : eUnspecified; |
1642 : eUnspecified; |
1325 #endif |
1643 #endif |
1326 int flags = 0; |
1644 int flags = 0; |
1327 + TriState stDesktop = eUnspecified; |
1645 + TriState stDesktop = eUnspecified; |
1328 |
1646 |
1329 while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && |
1647 while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && |
1330 ok) { |
1648 ok) { |
1331 @@ -585,6 +593,7 @@ void ParseManifest(NSLocationType aType, |
1649 ToLowerCase(token); |
|
1650 NS_ConvertASCIItoUTF16 wtoken(token); |
|
1651 |
1332 if (CheckStringFlag(kApplication, wtoken, appID, stApp) || |
1652 if (CheckStringFlag(kApplication, wtoken, appID, stApp) || |
1333 CheckOsFlag(kOs, wtoken, osTarget, stOs) || |
1653 CheckOsFlag(kOs, wtoken, osTarget, stOs) || |
1334 CheckStringFlag(kABI, wtoken, abi, stABI) || |
1654 CheckStringFlag(kABI, wtoken, abi, stABI) || |
1335 + CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || |
1655 + CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || |
1336 CheckStringFlag(kProcess, wtoken, process, stProcess) || |
1656 CheckStringFlag(kProcess, wtoken, process, stProcess) || |
1337 CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || |
1657 CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || |
1338 CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || |
1658 CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || |
1339 @@ -644,6 +653,7 @@ void ParseManifest(NSLocationType aType, |
1659 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, |
|
1660 stGeckoVersion)) { |
|
1661 continue; |
|
1662 } |
|
1663 |
|
1664 @@ -639,16 +648,17 @@ void ParseManifest(NSLocationType aType, |
|
1665 |
|
1666 LogMessageWithContext( |
|
1667 aFile, line, "Unrecognized chrome manifest modifier '%s'.", token); |
|
1668 ok = false; |
|
1669 } |
1340 |
1670 |
1341 if (!ok || stApp == eBad || stAppVersion == eBad || |
1671 if (!ok || stApp == eBad || stAppVersion == eBad || |
1342 stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || |
1672 stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || |
1343 + stDesktop == eBad || |
1673 + stDesktop == eBad || |
1344 #ifdef MOZ_WIDGET_ANDROID |
1674 #ifdef MOZ_WIDGET_ANDROID |
1345 stTablet == eBad || |
1675 stTablet == eBad || |
1346 #endif |
1676 #endif |
1347 Index: firefox-115.0/xpcom/components/moz.build |
1677 #ifdef MOZ_BACKGROUNDTASKS |
1348 =================================================================== |
1678 stBackgroundTask == eBad || |
1349 --- firefox-115.0.orig/xpcom/components/moz.build |
1679 #endif |
1350 +++ firefox-115.0/xpcom/components/moz.build |
1680 stABI == eBad || stProcess == eBad) { |
1351 @@ -71,6 +71,7 @@ LOCAL_INCLUDES += [ |
1681 continue; |
|
1682 diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build |
|
1683 --- a/xpcom/components/moz.build |
|
1684 +++ b/xpcom/components/moz.build |
|
1685 @@ -66,16 +66,17 @@ LOCAL_INCLUDES += [ |
|
1686 "!..", |
|
1687 "../base", |
|
1688 "../build", |
|
1689 "../ds", |
|
1690 "/chrome", |
1352 "/js/xpconnect/loader", |
1691 "/js/xpconnect/loader", |
1353 "/layout/build", |
1692 "/layout/build", |
1354 "/modules/libjar", |
1693 "/modules/libjar", |
1355 + "/toolkit/xre", |
1694 + "/toolkit/xre", |
1356 ] |
1695 ] |
1357 |
1696 |
1358 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
1697 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
1359 Index: firefox-115.0/xpcom/io/nsLocalFileUnix.cpp |
1698 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] |
1360 =================================================================== |
1699 if CONFIG["MOZ_ENABLE_DBUS"]: |
1361 --- firefox-115.0.orig/xpcom/io/nsLocalFileUnix.cpp |
1700 CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] |
1362 +++ firefox-115.0/xpcom/io/nsLocalFileUnix.cpp |
1701 |
1363 @@ -51,6 +51,7 @@ |
1702 include("/ipc/chromium/chromium-config.mozbuild") |
|
1703 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |
|
1704 --- a/xpcom/io/nsLocalFileUnix.cpp |
|
1705 +++ b/xpcom/io/nsLocalFileUnix.cpp |
|
1706 @@ -46,16 +46,17 @@ |
|
1707 #include "nsString.h" |
|
1708 #include "nsIDirectoryEnumerator.h" |
|
1709 #include "nsSimpleEnumerator.h" |
|
1710 #include "private/pprio.h" |
|
1711 #include "prlink.h" |
1364 |
1712 |
1365 #ifdef MOZ_WIDGET_GTK |
1713 #ifdef MOZ_WIDGET_GTK |
1366 # include "nsIGIOService.h" |
1714 # include "nsIGIOService.h" |
1367 +# include "nsKDEUtils.h" |
1715 +# include "nsKDEUtils.h" |
1368 #endif |
1716 #endif |
1369 |
1717 |
1370 #ifdef MOZ_WIDGET_COCOA |
1718 #ifdef MOZ_WIDGET_COCOA |
1371 @@ -2172,10 +2173,18 @@ nsLocalFile::Reveal() { |
1719 # include <Carbon/Carbon.h> |
|
1720 # include "CocoaFileUtils.h" |
|
1721 # include "prmem.h" |
|
1722 # include "plbase64.h" |
|
1723 |
|
1724 @@ -2167,20 +2168,28 @@ nsLocalFile::SetPersistentDescriptor(con |
|
1725 |
|
1726 NS_IMETHODIMP |
|
1727 nsLocalFile::Reveal() { |
|
1728 if (!FilePreferences::IsAllowedPath(mPath)) { |
|
1729 return NS_ERROR_FILE_ACCESS_DENIED; |
1372 } |
1730 } |
1373 |
1731 |
1374 #ifdef MOZ_WIDGET_GTK |
1732 #ifdef MOZ_WIDGET_GTK |
1375 + nsAutoCString url; |
1733 + nsAutoCString url; |
1376 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
1734 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |