--- a/mozilla-kde.patch Tue Jun 26 07:37:04 2018 +0200
+++ b/mozilla-kde.patch Mon Dec 10 22:33:01 2018 +0100
@@ -6,15 +6,11 @@
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
https://bugzilla.novell.com/show_bug.cgi?id=170055
-diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
---- a/modules/libpref/Preferences.cpp
-+++ b/modules/libpref/Preferences.cpp
-@@ -76,16 +76,17 @@
- #include "nsXPCOMCID.h"
- #include "nsXPCOM.h"
- #include "nsXULAppAPI.h"
- #include "nsZipArchive.h"
- #include "plbase64.h"
+Index: firefox-60.2.0/modules/libpref/Preferences.cpp
+===================================================================
+--- firefox-60.2.0.orig/modules/libpref/Preferences.cpp 2018-09-05 21:49:23.102829401 +0200
++++ firefox-60.2.0/modules/libpref/Preferences.cpp 2018-09-05 21:49:31.498872824 +0200
+@@ -81,6 +81,7 @@
#include "PLDHashTable.h"
#include "plstr.h"
#include "prlink.h"
@@ -22,17 +18,7 @@
#ifdef XP_WIN
#include "windows.h"
- #endif
-
- using namespace mozilla;
-
- #ifdef DEBUG
-@@ -3868,25 +3869,37 @@ Preferences::InitInitialObjects()
- // application pref files for backwards compatibility.
- static const char* specialFiles[] = {
- #if defined(XP_MACOSX)
- "macprefs.js"
- #elif defined(XP_WIN)
+@@ -3873,6 +3874,7 @@ Preferences::InitInitialObjects()
"winpref.js"
#elif defined(XP_UNIX)
"unix.js"
@@ -40,9 +26,7 @@
#if defined(_AIX)
,
"aix.js"
- #endif
- #elif defined(XP_BEOS)
- "beos.js"
+@@ -3882,6 +3884,17 @@ Preferences::InitInitialObjects()
#endif
};
@@ -60,17 +44,7 @@
rv = pref_LoadPrefsInDir(
defaultPrefDir, specialFiles, ArrayLength(specialFiles));
if (NS_FAILED(rv)) {
- NS_WARNING("Error parsing application default preferences.");
- }
-
- // Load jar:$app/omni.jar!/defaults/preferences/*.js
- // or jar:$gre/omni.jar!/defaults/preferences/*.js.
-@@ -3935,17 +3948,17 @@ Preferences::InitInitialObjects()
- }
-
- nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
- if (!path) {
- continue;
+@@ -3940,7 +3953,7 @@ Preferences::InitInitialObjects()
}
// Do we care if a file provided by this process fails to load?
@@ -79,20 +53,11 @@
}
}
- #ifdef MOZ_WIDGET_ANDROID
- // Set up the correct default for toolkit.telemetry.enabled. If this build
- // has MOZ_TELEMETRY_ON_BY_DEFAULT *or* we're on the beta channel, telemetry
- // is on by default, otherwise not. This is necessary so that beta users who
- // are testing final release builds don't flipflop defaults.
-diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
---- a/modules/libpref/moz.build
-+++ b/modules/libpref/moz.build
-@@ -27,16 +27,20 @@ XPIDL_MODULE = 'pref'
- EXPORTS.mozilla += [
- 'Preferences.h',
- ]
-
- UNIFIED_SOURCES += [
+Index: firefox-60.2.0/modules/libpref/moz.build
+===================================================================
+--- firefox-60.2.0.orig/modules/libpref/moz.build 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/modules/libpref/moz.build 2018-09-05 21:49:31.498872824 +0200
+@@ -32,6 +32,10 @@ UNIFIED_SOURCES += [
'Preferences.cpp',
]
@@ -103,20 +68,11 @@
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
-
- DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
- DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
- if CONFIG['MOZ_ENABLE_WEBRENDER']:
- DEFINES['MOZ_ENABLE_WEBRENDER'] = True
-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
-@@ -220,16 +220,17 @@ class Flags(OrderedDict):
- 'contentaccessible': Flag,
- 'os': StringFlag,
- 'osversion': VersionFlag,
- 'abi': StringFlag,
- 'platform': Flag,
+Index: firefox-60.2.0/python/mozbuild/mozpack/chrome/flags.py
+===================================================================
+--- firefox-60.2.0.orig/python/mozbuild/mozpack/chrome/flags.py 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/python/mozbuild/mozpack/chrome/flags.py 2018-09-05 21:49:31.498872824 +0200
+@@ -225,6 +225,7 @@ class Flags(OrderedDict):
'xpcnativewrappers': Flag,
'tablet': Flag,
'process': StringFlag,
@@ -124,20 +80,11 @@
}
RE = re.compile(r'([!<>=]+)')
- 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
-@@ -34,16 +34,17 @@ class ManifestEntry(object):
- 'platformversion',
- 'os',
- 'osversion',
- 'abi',
- 'xpcnativewrappers',
+Index: firefox-60.2.0/python/mozbuild/mozpack/chrome/manifest.py
+===================================================================
+--- firefox-60.2.0.orig/python/mozbuild/mozpack/chrome/manifest.py 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/python/mozbuild/mozpack/chrome/manifest.py 2018-09-05 21:49:31.498872824 +0200
+@@ -39,6 +39,7 @@ class ManifestEntry(object):
'tablet',
'process',
'contentaccessible',
@@ -145,20 +92,11 @@
]
def __init__(self, base, *flags):
- '''
- 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
-@@ -41,10 +41,14 @@ EXTRA_JS_MODULES += [
-
- if CONFIG['MOZ_PLACES']:
- EXTRA_JS_MODULES += [
- 'DownloadHistory.jsm',
- ]
+Index: firefox-60.2.0/toolkit/components/downloads/moz.build
+===================================================================
+--- firefox-60.2.0.orig/toolkit/components/downloads/moz.build 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/toolkit/components/downloads/moz.build 2018-09-05 21:49:31.498872824 +0200
+@@ -46,5 +46,9 @@ if CONFIG['MOZ_PLACES']:
FINAL_LIBRARY = 'xul'
@@ -168,15 +106,11 @@
+
with Files('**'):
BUG_COMPONENT = ('Toolkit', 'Download Manager')
-diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
---- a/toolkit/content/jar.mn
-+++ b/toolkit/content/jar.mn
-@@ -69,16 +69,18 @@ toolkit.jar:
- content/global/bindings/checkbox.xml (widgets/checkbox.xml)
- content/global/bindings/colorpicker.xml (widgets/colorpicker.xml)
- content/global/bindings/datekeeper.js (widgets/datekeeper.js)
- content/global/bindings/datepicker.js (widgets/datepicker.js)
- content/global/bindings/datetimepopup.xml (widgets/datetimepopup.xml)
+Index: firefox-60.2.0/toolkit/content/jar.mn
+===================================================================
+--- firefox-60.2.0.orig/toolkit/content/jar.mn 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/toolkit/content/jar.mn 2018-09-05 21:49:31.498872824 +0200
+@@ -74,6 +74,8 @@ toolkit.jar:
content/global/bindings/datetimebox.xml (widgets/datetimebox.xml)
content/global/bindings/datetimebox.css (widgets/datetimebox.css)
* content/global/bindings/dialog.xml (widgets/dialog.xml)
@@ -185,15 +119,10 @@
content/global/bindings/editor.xml (widgets/editor.xml)
content/global/bindings/filefield.xml (widgets/filefield.xml)
* content/global/bindings/findbar.xml (widgets/findbar.xml)
- content/global/bindings/general.xml (widgets/general.xml)
- content/global/bindings/groupbox.xml (widgets/groupbox.xml)
- content/global/bindings/listbox.xml (widgets/listbox.xml)
- content/global/bindings/menu.xml (widgets/menu.xml)
- content/global/bindings/menulist.xml (widgets/menulist.xml)
-diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
-new file mode 100644
---- /dev/null
-+++ b/toolkit/content/widgets/dialog-kde.xml
+Index: firefox-60.2.0/toolkit/content/widgets/dialog-kde.xml
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/toolkit/content/widgets/dialog-kde.xml 2018-09-05 21:49:31.498872824 +0200
@@ -0,0 +1,478 @@
+<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
@@ -673,15 +602,11 @@
+ </binding>
+
+</bindings>
-diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
---- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
-+++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
-@@ -627,17 +627,17 @@ nsUnknownContentTypeDialog.prototype = {
- else
- typeString = mimeInfo.MIMEType;
- }
- // When the length is unknown, contentLength would be -1
- if (this.mLauncher.contentLength >= 0) {
+Index: firefox-60.2.0/toolkit/mozapps/downloads/nsHelperAppDlg.js
+===================================================================
+--- firefox-60.2.0.orig/toolkit/mozapps/downloads/nsHelperAppDlg.js 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/toolkit/mozapps/downloads/nsHelperAppDlg.js 2018-09-05 21:49:31.498872824 +0200
+@@ -632,7 +632,7 @@ nsUnknownContentTypeDialog.prototype = {
let [size, unit] = DownloadUtils.
convertByteUnits(this.mLauncher.contentLength);
type.value = this.dialogElement("strings")
@@ -690,17 +615,7 @@
[typeString, size, unit]);
}
else {
- type.value = typeString;
- }
- },
-
- // Returns true if opening the default application makes sense.
-@@ -801,17 +801,17 @@ nsUnknownContentTypeDialog.prototype = {
- switch (this.dialogElement("openHandler").selectedIndex) {
- case 0:
- // No app need be specified in this case.
- ok = true;
- break;
+@@ -806,7 +806,7 @@ nsUnknownContentTypeDialog.prototype = {
case 1:
// only enable the OK button if we have a default app to use or if
// the user chose an app....
@@ -709,17 +624,7 @@
break;
}
}
-
- // Enable Ok button if ok to press.
- this.mDialog.document.documentElement.getButton("accept").disabled = !ok;
- },
-
-@@ -1066,30 +1066,60 @@ nsUnknownContentTypeDialog.prototype = {
-
- if (params.handlerApp &&
- params.handlerApp.executable &&
- params.handlerApp.executable.isFile()) {
- // Remember the file they chose to run.
+@@ -1071,20 +1071,50 @@ nsUnknownContentTypeDialog.prototype = {
this.chosenApp = params.handlerApp;
}
} else if ("@mozilla.org/applicationchooser;1" in Cc) {
@@ -784,20 +689,11 @@
} else {
var nsIFilePicker = Ci.nsIFilePicker;
var fp = Cc["@mozilla.org/filepicker;1"]
- .createInstance(nsIFilePicker);
- 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
-@@ -15,16 +15,17 @@
- #include "nsPrintfCString.h"
- #include "nsNetCID.h"
- #include "nsNetUtil.h"
- #include "nsISupportsPrimitives.h"
- #include "nsIGSettingsService.h"
+Index: firefox-60.2.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+===================================================================
+--- firefox-60.2.0.orig/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2018-09-05 21:49:31.498872824 +0200
+@@ -20,6 +20,7 @@
#include "nsInterfaceHashtable.h"
#include "mozilla/Attributes.h"
#include "nsIURI.h"
@@ -805,17 +701,7 @@
class nsUnixSystemProxySettings final : public nsISystemProxySettings {
public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSISYSTEMPROXYSETTINGS
-
- nsUnixSystemProxySettings()
- : mSchemeProxySettings(4)
-@@ -39,16 +40,17 @@ private:
- nsCOMPtr<nsIGSettingsService> mGSettings;
- nsCOMPtr<nsIGSettingsCollection> mProxySettings;
- nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
- bool IsProxyMode(const char* aMode);
- nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
+@@ -44,6 +45,7 @@ private:
nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
@@ -823,17 +709,7 @@
};
NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings)
-
- NS_IMETHODIMP
- nsUnixSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
- {
- // dbus prevents us from being threadsafe, but this routine should not block anyhow
-@@ -505,16 +507,19 @@ nsUnixSystemProxySettings::GetProxyFromG
-
- nsresult
- nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
- const nsACString & aScheme,
- const nsACString & aHost,
+@@ -510,6 +512,9 @@ nsUnixSystemProxySettings::GetProxyForUR
const int32_t aPort,
nsACString & aResult)
{
@@ -843,17 +719,7 @@
if (mProxySettings) {
nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult);
if (NS_SUCCEEDED(rv))
- return rv;
- }
- if (mGConf)
- return GetProxyFromGConf(aScheme, aHost, aPort, aResult);
-
-@@ -540,8 +545,34 @@ static const mozilla::Module::ContractID
-
- static const mozilla::Module kUnixProxyModule = {
- mozilla::Module::kVersion,
- kUnixProxyCIDs,
- kUnixProxyContracts
+@@ -545,3 +550,29 @@ static const mozilla::Module kUnixProxyM
};
NSMODULE_DEFN(nsUnixProxyModule) = &kUnixProxyModule;
@@ -883,15 +749,11 @@
+ return NS_OK;
+}
+
-diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
---- a/toolkit/xre/moz.build
-+++ b/toolkit/xre/moz.build
-@@ -65,17 +65,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
- '../components/printingui',
- ]
- elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
- UNIFIED_SOURCES += [
- 'nsNativeAppSupportDefault.cpp',
+Index: firefox-60.2.0/toolkit/xre/moz.build
+===================================================================
+--- firefox-60.2.0.orig/toolkit/xre/moz.build 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/toolkit/xre/moz.build 2018-09-05 21:49:31.498872824 +0200
+@@ -70,7 +70,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'ui
'UIKitDirProvider.mm',
]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
@@ -901,15 +763,10 @@
'nsNativeAppSupportUnix.cpp',
]
else:
- UNIFIED_SOURCES += [
- 'nsNativeAppSupportDefault.cpp',
- ]
-
- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
-diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/nsKDEUtils.cpp
+Index: firefox-60.2.0/toolkit/xre/nsKDEUtils.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/toolkit/xre/nsKDEUtils.cpp 2018-09-05 21:49:31.498872824 +0200
@@ -0,0 +1,344 @@
+/* -*- 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
@@ -1255,10 +1112,10 @@
+ fputs( "\\E\n", commandFile ); // done as \E, so it cannot happen in normal data
+ fflush( commandFile );
+ }
-diff --git a/toolkit/xre/nsKDEUtils.h b/toolkit/xre/nsKDEUtils.h
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/nsKDEUtils.h
+Index: firefox-60.2.0/toolkit/xre/nsKDEUtils.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/toolkit/xre/nsKDEUtils.h 2018-09-05 21:49:31.498872824 +0200
@@ -0,0 +1,48 @@
+/* -*- 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
@@ -1308,14 +1165,11 @@
+ };
+
+#endif // nsKDEUtils
-diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp
---- a/uriloader/exthandler/HandlerServiceParent.cpp
-+++ b/uriloader/exthandler/HandlerServiceParent.cpp
-@@ -1,16 +1,16 @@
- #include "mozilla/Logging.h"
- #include "HandlerServiceParent.h"
- #include "nsIHandlerService.h"
- #include "nsIMIMEInfo.h"
+Index: firefox-60.2.0/uriloader/exthandler/HandlerServiceParent.cpp
+===================================================================
+--- firefox-60.2.0.orig/uriloader/exthandler/HandlerServiceParent.cpp 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/uriloader/exthandler/HandlerServiceParent.cpp 2018-09-05 21:49:31.502872845 +0200
+@@ -5,7 +5,7 @@
#include "ContentHandlerService.h"
#include "nsStringEnumerator.h"
#ifdef MOZ_WIDGET_GTK
@@ -1324,17 +1178,7 @@
#endif
using mozilla::dom::HandlerInfo;
- using mozilla::dom::HandlerApp;
- using mozilla::dom::ContentHandlerService;
- using mozilla::dom::RemoteHandlerApp;
-
- namespace {
-@@ -264,17 +264,17 @@ HandlerServiceParent::RecvExists(const H
- }
-
- mozilla::ipc::IPCResult
- HandlerServiceParent::RecvExistsForProtocol(const nsCString& aProtocolScheme,
- bool* aHandlerExists)
+@@ -269,7 +269,7 @@ HandlerServiceParent::RecvExistsForProto
{
#ifdef MOZ_WIDGET_GTK
// Check the GNOME registry for a protocol handler
@@ -1343,20 +1187,11 @@
#else
*aHandlerExists = false;
#endif
- return IPC_OK();
- }
-
- mozilla::ipc::IPCResult
- HandlerServiceParent::RecvGetTypeFromExtension(const nsCString& aFileExtension,
-diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
---- a/uriloader/exthandler/moz.build
-+++ b/uriloader/exthandler/moz.build
-@@ -77,17 +77,19 @@ else:
- SOURCES += [
- osdir + '/nsOSHelperAppService.cpp',
- ]
- if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
- CXXFLAGS += ['-Wno-error=shadow']
+Index: firefox-60.2.0/uriloader/exthandler/moz.build
+===================================================================
+--- firefox-60.2.0.orig/uriloader/exthandler/moz.build 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/uriloader/exthandler/moz.build 2018-09-05 21:49:31.502872845 +0200
+@@ -82,7 +82,9 @@ else:
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
UNIFIED_SOURCES += [
@@ -1366,17 +1201,7 @@
'unix/nsMIMEInfoUnix.cpp',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- UNIFIED_SOURCES += [
- 'android/nsAndroidHandlerApp.cpp',
- 'android/nsExternalSharingAppService.cpp',
- 'android/nsExternalURLHandlerService.cpp',
- 'android/nsMIMEInfoAndroid.cpp',
-@@ -124,16 +126,17 @@ include('/ipc/chromium/chromium-config.m
- FINAL_LIBRARY = 'xul'
-
- LOCAL_INCLUDES += [
- '/docshell/base',
- '/dom/base',
+@@ -129,6 +131,7 @@ LOCAL_INCLUDES += [
'/dom/ipc',
'/netwerk/base',
'/netwerk/protocol/http',
@@ -1384,15 +1209,10 @@
]
if CONFIG['MOZ_ENABLE_DBUS']:
- CXXFLAGS += CONFIG['TK_CFLAGS']
- CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
-
- if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
- CXXFLAGS += CONFIG['TK_CFLAGS']
-diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp
-new file mode 100644
---- /dev/null
-+++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp
+Index: firefox-60.2.0/uriloader/exthandler/unix/nsCommonRegistry.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/uriloader/exthandler/unix/nsCommonRegistry.cpp 2018-09-05 21:49:31.502872845 +0200
@@ -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
@@ -1447,10 +1267,10 @@
+ return nsKDERegistry::GetFromType( aMIMEType );
+ return nsGNOMERegistry::GetFromType( aMIMEType );
+}
-diff --git a/uriloader/exthandler/unix/nsCommonRegistry.h b/uriloader/exthandler/unix/nsCommonRegistry.h
-new file mode 100644
---- /dev/null
-+++ b/uriloader/exthandler/unix/nsCommonRegistry.h
+Index: firefox-60.2.0/uriloader/exthandler/unix/nsCommonRegistry.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/uriloader/exthandler/unix/nsCommonRegistry.h 2018-09-05 21:49:31.502872845 +0200
@@ -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
@@ -1480,10 +1300,10 @@
+};
+
+#endif
-diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp
-new file mode 100644
---- /dev/null
-+++ b/uriloader/exthandler/unix/nsKDERegistry.cpp
+Index: firefox-60.2.0/uriloader/exthandler/unix/nsKDERegistry.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/uriloader/exthandler/unix/nsKDERegistry.cpp 2018-09-05 21:49:31.502872845 +0200
@@ -0,0 +1,87 @@
+/* -*- 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
@@ -1572,10 +1392,10 @@
+ }
+ return nullptr;
+}
-diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h
-new file mode 100644
---- /dev/null
-+++ b/uriloader/exthandler/unix/nsKDERegistry.h
+Index: firefox-60.2.0/uriloader/exthandler/unix/nsKDERegistry.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ firefox-60.2.0/uriloader/exthandler/unix/nsKDERegistry.h 2018-09-05 21:49:31.502872845 +0200
@@ -0,0 +1,34 @@
+/* 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
@@ -1611,14 +1431,11 @@
+};
+
+#endif //nsKDERegistry_h__
-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,50 +1,53 @@
- /* -*- 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
+Index: firefox-60.2.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
+===================================================================
+--- firefox-60.2.0.orig/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 2018-09-05 21:49:31.502872845 +0200
+@@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMIMEInfoUnix.h"
@@ -1627,7 +1444,7 @@
#include "nsIGIOService.h"
#include "nsNetCID.h"
#include "nsIIOService.h"
- #include "nsAutoPtr.h"
+@@ -13,11 +13,14 @@
#ifdef MOZ_ENABLE_DBUS
#include "nsDBusHandlerApp.h"
#endif
@@ -1643,14 +1460,7 @@
}
NS_IMETHODIMP
- nsMIMEInfoUnix::GetHasDefaultHandler(bool *_retval)
- {
- // if mDefaultApplication 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 (mDefaultApplication)
- return nsMIMEInfoImpl::GetHasDefaultHandler(_retval);
-
+@@ -32,14 +35,14 @@ nsMIMEInfoUnix::GetHasDefaultHandler(boo
*_retval = false;
if (mClass == eProtocolInfo) {
@@ -1668,17 +1478,7 @@
}
}
if (mimeInfo)
- *_retval = true;
- }
-
- if (*_retval)
- return NS_OK;
-@@ -59,16 +62,33 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
- // either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to
- // give the GNOME answer.
- if (mDefaultApplication)
- return nsMIMEInfoImpl::LaunchDefaultWithFile(aFile);
-
+@@ -64,6 +67,23 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
nsAutoCString nativePath;
aFile->GetNativePath(nativePath);
@@ -1702,20 +1502,11 @@
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
if (!giovfs) {
return NS_ERROR_FAILURE;
- }
-
- // nsGIOMimeApp->Launch wants a URI string instead of local file
- nsresult rv;
- nsCOMPtr<nsIIOService> ioservice = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
-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 <sys/types.h>
- #include <sys/stat.h>
-
+Index: firefox-60.2.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp
+===================================================================
+--- firefox-60.2.0.orig/uriloader/exthandler/unix/nsOSHelperAppService.cpp 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/uriloader/exthandler/unix/nsOSHelperAppService.cpp 2018-09-05 21:49:31.502872845 +0200
+@@ -10,7 +10,7 @@
#include "nsOSHelperAppService.h"
#include "nsMIMEInfoUnix.h"
#ifdef MOZ_WIDGET_GTK
@@ -1724,17 +1515,7 @@
#endif
#include "nsISupports.h"
#include "nsString.h"
- #include "nsReadableUtils.h"
- #include "nsUnicharUtils.h"
- #include "nsIURL.h"
- #include "nsIFileStreams.h"
- #include "nsILineInputStream.h"
-@@ -1128,17 +1128,17 @@ nsOSHelperAppService::GetHandlerAndDescr
-
- nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists)
- {
- nsresult rv = NS_OK;
-
+@@ -1133,7 +1133,7 @@ nsresult nsOSHelperAppService::OSProtoco
if (!XRE_IsContentProcess()) {
#ifdef MOZ_WIDGET_GTK
// Check the GNOME registry for a protocol handler
@@ -1743,17 +1524,7 @@
#else
*aHandlerExists = false;
#endif
- } else {
- *aHandlerExists = false;
- nsCOMPtr<nsIHandlerService> handlerSvc = do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
- if (NS_SUCCEEDED(rv) && handlerSvc) {
- rv = handlerSvc->ExistsForProtocol(nsCString(aProtocolScheme), aHandlerExists);
-@@ -1146,17 +1146,17 @@ nsresult nsOSHelperAppService::OSProtoco
- }
-
- return rv;
- }
-
+@@ -1151,7 +1151,7 @@ nsresult nsOSHelperAppService::OSProtoco
NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval)
{
#ifdef MOZ_WIDGET_GTK
@@ -1762,17 +1533,7 @@
return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK;
#else
return NS_ERROR_NOT_AVAILABLE;
- #endif
- }
-
- nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
- {
-@@ -1243,17 +1243,17 @@ nsOSHelperAppService::GetFromExtension(c
- mime_types_description,
- true);
-
- if (NS_FAILED(rv) || majorType.IsEmpty()) {
-
+@@ -1248,7 +1248,7 @@ nsOSHelperAppService::GetFromExtension(c
#ifdef MOZ_WIDGET_GTK
LOG(("Looking in GNOME registry\n"));
RefPtr<nsMIMEInfoBase> gnomeInfo =
@@ -1781,17 +1542,7 @@
if (gnomeInfo) {
LOG(("Got MIMEInfo from GNOME registry\n"));
return gnomeInfo.forget();
- }
- #endif
-
- rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
- majorType,
-@@ -1364,17 +1364,17 @@ nsOSHelperAppService::GetFromType(const
- nsAutoString extensions, mime_types_description;
- LookUpExtensionsAndDescription(majorType,
- minorType,
- extensions,
- mime_types_description);
+@@ -1369,7 +1369,7 @@ nsOSHelperAppService::GetFromType(const
#ifdef MOZ_WIDGET_GTK
if (handler.IsEmpty()) {
@@ -1800,20 +1551,11 @@
if (gnomeInfo) {
LOG(("Got MIMEInfo from GNOME registry without extensions; setting them "
"to %s\n", 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
-@@ -121,16 +121,17 @@ else:
- include('/ipc/chromium/chromium-config.mozbuild')
-
- FINAL_LIBRARY = 'xul'
-
- LOCAL_INCLUDES += [
+Index: firefox-60.2.0/widget/gtk/moz.build
+===================================================================
+--- firefox-60.2.0.orig/widget/gtk/moz.build 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/widget/gtk/moz.build 2018-09-05 21:49:31.502872845 +0200
+@@ -126,6 +126,7 @@ LOCAL_INCLUDES += [
'/layout/generic',
'/layout/xul',
'/other-licenses/atk-1.0',
@@ -1821,20 +1563,11 @@
'/widget',
'/widget/headless',
]
-
- if CONFIG['MOZ_X11']:
- LOCAL_INCLUDES += [
- '/widget/x11',
- ]
-diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
---- a/widget/gtk/nsFilePicker.cpp
-+++ b/widget/gtk/nsFilePicker.cpp
-@@ -4,32 +4,34 @@
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- #include "mozilla/Types.h"
- #include <sys/types.h>
- #include <sys/stat.h>
+Index: firefox-60.2.0/widget/gtk/nsFilePicker.cpp
+===================================================================
+--- firefox-60.2.0.orig/widget/gtk/nsFilePicker.cpp 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/widget/gtk/nsFilePicker.cpp 2018-09-05 21:49:31.502872845 +0200
+@@ -9,6 +9,7 @@
#include <unistd.h>
#include <gtk/gtk.h>
@@ -1842,16 +1575,7 @@
#include "nsGtkUtils.h"
#include "nsIFileURL.h"
- #include "nsIURI.h"
- #include "nsIWidget.h"
- #include "nsIFile.h"
- #include "nsIStringBundle.h"
-
- #include "nsArrayEnumerator.h"
- #include "nsMemory.h"
- #include "nsEnumeratorUtils.h"
- #include "nsNetUtil.h"
- #include "nsReadableUtils.h"
+@@ -25,6 +26,7 @@
#include "mozcontainer.h"
#include "nsFilePicker.h"
@@ -1859,17 +1583,7 @@
using namespace mozilla;
- #define MAX_PREVIEW_SIZE 180
- // bug 1184009
- #define MAX_PREVIEW_SOURCE_SIZE 4096
-
- nsIFile *nsFilePicker::mPrevDisplayDirectory = nullptr;
-@@ -246,17 +248,19 @@ nsFilePicker::AppendFilters(int32_t aFil
- return nsBaseFilePicker::AppendFilters(aFilterMask);
- }
-
- NS_IMETHODIMP
- nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter)
+@@ -251,7 +253,9 @@ nsFilePicker::AppendFilter(const nsAStri
{
if (aFilter.EqualsLiteral("..apps")) {
// No platform specific thing we can do here, really....
@@ -1880,17 +1594,7 @@
}
nsAutoCString filter, name;
- CopyUTF16toUTF8(aFilter, filter);
- CopyUTF16toUTF8(aTitle, name);
-
- mFilters.AppendElement(filter);
- mFilterNames.AppendElement(name);
-@@ -371,16 +375,39 @@ nsFilePicker::Show(int16_t *aReturn)
-
- NS_IMETHODIMP
- nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
- {
- // Can't show two dialogs concurrently with the same filepicker
+@@ -376,6 +380,29 @@ nsFilePicker::Open(nsIFilePickerShownCal
if (mRunning)
return NS_ERROR_NOT_AVAILABLE;
@@ -1920,17 +1624,7 @@
nsCString title;
title.Adopt(ToNewUTF8String(mTitle));
- GtkWindow *parent_widget =
- GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
-
- GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
-
-@@ -608,8 +635,233 @@ nsFilePicker::Done(GtkWidget* file_choos
- if (mCallback) {
- mCallback->Done(result);
- mCallback = nullptr;
- } else {
- mResult = result;
+@@ -613,3 +640,228 @@ nsFilePicker::Done(GtkWidget* file_choos
}
NS_RELEASE_THIS();
}
@@ -2159,15 +1853,11 @@
+ return NS_OK;
+ }
+
-diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h
---- a/widget/gtk/nsFilePicker.h
-+++ b/widget/gtk/nsFilePicker.h
-@@ -69,14 +69,20 @@ protected:
- nsString mDefaultExtension;
-
- nsTArray<nsCString> mFilters;
- nsTArray<nsCString> mFilterNames;
-
+Index: firefox-60.2.0/widget/gtk/nsFilePicker.h
+===================================================================
+--- firefox-60.2.0.orig/widget/gtk/nsFilePicker.h 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/widget/gtk/nsFilePicker.h 2018-09-05 21:49:31.502872845 +0200
+@@ -74,6 +74,12 @@ protected:
private:
static nsIFile *mPrevDisplayDirectory;
@@ -2180,18 +1870,11 @@
#ifdef MOZ_WIDGET_GTK
GtkFileChooserWidget *mFileChooserDelegate;
#endif
- };
-
- #endif
-diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
---- a/xpcom/components/ManifestParser.cpp
-+++ b/xpcom/components/ManifestParser.cpp
-@@ -33,16 +33,17 @@
- #include "nsTextFormatter.h"
- #include "nsVersionComparator.h"
- #include "nsXPCOMCIDInternal.h"
-
- #include "nsIConsoleService.h"
+Index: firefox-60.2.0/xpcom/components/ManifestParser.cpp
+===================================================================
+--- firefox-60.2.0.orig/xpcom/components/ManifestParser.cpp 2018-09-05 21:49:23.106829422 +0200
++++ firefox-60.2.0/xpcom/components/ManifestParser.cpp 2018-09-05 21:49:31.502872845 +0200
+@@ -38,6 +38,7 @@
#include "nsIScriptError.h"
#include "nsIXULAppInfo.h"
#include "nsIXULRuntime.h"
@@ -2199,17 +1882,7 @@
using namespace mozilla;
- struct ManifestDirective
- {
- const char* directive;
- int argc;
-
-@@ -444,16 +445,17 @@ ParseManifest(NSLocationType aType, File
- NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
- NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
- NS_NAMED_LITERAL_STRING(kApplication, "application");
- NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
- NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
+@@ -449,6 +450,7 @@ ParseManifest(NSLocationType aType, File
NS_NAMED_LITERAL_STRING(kOs, "os");
NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
NS_NAMED_LITERAL_STRING(kABI, "abi");
@@ -2217,17 +1890,7 @@
NS_NAMED_LITERAL_STRING(kProcess, "process");
#if defined(MOZ_WIDGET_ANDROID)
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
- #endif
-
- NS_NAMED_LITERAL_STRING(kMain, "main");
- NS_NAMED_LITERAL_STRING(kContent, "content");
-
-@@ -499,44 +501,49 @@ ParseManifest(NSLocationType aType, File
- CopyUTF8toUTF16(s, abi);
- abi.Insert(char16_t('_'), 0);
- abi.Insert(osTarget, 0);
- }
- }
+@@ -504,6 +506,7 @@ ParseManifest(NSLocationType aType, File
}
nsAutoString osVersion;
@@ -2235,9 +1898,7 @@
#if defined(XP_WIN)
#pragma warning(push)
#pragma warning(disable:4996) // VC12+ deprecates GetVersionEx
- OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
- if (GetVersionEx(&info)) {
- nsTextFormatter::ssprintf(osVersion, u"%ld.%ld",
+@@ -513,6 +516,7 @@ ParseManifest(NSLocationType aType, File
info.dwMajorVersion,
info.dwMinorVersion);
}
@@ -2245,7 +1906,7 @@
#pragma warning(pop)
#elif defined(MOZ_WIDGET_COCOA)
SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor();
- SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor();
+@@ -520,10 +524,12 @@ ParseManifest(NSLocationType aType, File
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld",
majorVersion,
minorVersion);
@@ -2258,8 +1919,7 @@
#elif defined(MOZ_WIDGET_ANDROID)
bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) {
- mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION",
- "RELEASE",
+@@ -532,6 +538,7 @@ ParseManifest(NSLocationType aType, File
osVersion);
isTablet = java::GeckoAppShell::IsTablet();
}
@@ -2267,17 +1927,7 @@
#endif
if (XRE_IsContentProcess()) {
- process = kContent;
- } else {
- process = kMain;
- }
-
-@@ -638,25 +645,27 @@ ParseManifest(NSLocationType aType, File
- TriState stOsVersion = eUnspecified;
- TriState stOs = eUnspecified;
- TriState stABI = eUnspecified;
- TriState stProcess = eUnspecified;
- #if defined(MOZ_WIDGET_ANDROID)
+@@ -643,6 +650,7 @@ ParseManifest(NSLocationType aType, File
TriState stTablet = eUnspecified;
#endif
int flags = 0;
@@ -2285,9 +1935,7 @@
while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) &&
ok) {
- ToLowerCase(token);
- NS_ConvertASCIItoUTF16 wtoken(token);
-
+@@ -652,6 +660,7 @@ ParseManifest(NSLocationType aType, File
if (CheckStringFlag(kApplication, wtoken, appID, stApp) ||
CheckOsFlag(kOs, wtoken, osTarget, stOs) ||
CheckStringFlag(kABI, wtoken, abi, stABI) ||
@@ -2295,17 +1943,7 @@
CheckStringFlag(kProcess, wtoken, process, stProcess) ||
CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) ||
CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) ||
- CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) {
- continue;
- }
-
- #if defined(MOZ_WIDGET_ANDROID)
-@@ -701,16 +710,17 @@ ParseManifest(NSLocationType aType, File
- }
-
- if (!ok ||
- stApp == eBad ||
- stAppVersion == eBad ||
+@@ -706,6 +715,7 @@ ParseManifest(NSLocationType aType, File
stGeckoVersion == eBad ||
stOs == eBad ||
stOsVersion == eBad ||
@@ -2313,20 +1951,11 @@
#ifdef MOZ_WIDGET_ANDROID
stTablet == 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
-@@ -44,12 +44,13 @@ FINAL_LIBRARY = 'xul'
- LOCAL_INCLUDES += [
- '!..',
- '../base',
- '../build',
- '../ds',
+Index: firefox-60.2.0/xpcom/components/moz.build
+===================================================================
+--- firefox-60.2.0.orig/xpcom/components/moz.build 2018-09-05 21:49:23.110829442 +0200
++++ firefox-60.2.0/xpcom/components/moz.build 2018-09-05 21:49:31.502872845 +0200
+@@ -49,6 +49,7 @@ LOCAL_INCLUDES += [
'../reflect/xptinfo',
'/chrome',
'/modules/libjar',
@@ -2334,16 +1963,11 @@
]
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
- CXXFLAGS += CONFIG['TK_CFLAGS']
-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 "prproces.h"
- #include "nsIDirectoryEnumerator.h"
- #include "nsISimpleEnumerator.h"
- #include "private/pprio.h"
- #include "prlink.h"
+Index: firefox-60.2.0/xpcom/io/nsLocalFileUnix.cpp
+===================================================================
+--- firefox-60.2.0.orig/xpcom/io/nsLocalFileUnix.cpp 2018-09-05 21:49:23.110829442 +0200
++++ firefox-60.2.0/xpcom/io/nsLocalFileUnix.cpp 2018-09-05 21:56:47.649117623 +0200
+@@ -52,6 +52,7 @@
#ifdef MOZ_WIDGET_GTK
#include "nsIGIOService.h"
@@ -2351,19 +1975,9 @@
#endif
#ifdef MOZ_WIDGET_COCOA
- #include <Carbon/Carbon.h>
- #include "CocoaFileUtils.h"
- #include "prmem.h"
- #include "plbase64.h"
+@@ -2010,18 +2011,16 @@ nsLocalFile::Reveal()
+ }
-@@ -1955,59 +1956,74 @@ nsLocalFile::SetPersistentDescriptor(con
- return InitWithNativePath(aPersistentDescriptor);
- #endif
- }
-
- NS_IMETHODIMP
- nsLocalFile::Reveal()
- {
#ifdef MOZ_WIDGET_GTK
- nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
- if (!giovfs) {
@@ -2383,13 +1997,7 @@
}
if (NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
return NS_OK;
- }
- nsCOMPtr<nsIFile> parentDir;
- nsAutoCString dirPath;
- if (NS_FAILED(GetParent(getter_AddRefs(parentDir)))) {
- return NS_ERROR_FAILURE;
- }
- if (NS_FAILED(parentDir->GetNativePath(dirPath))) {
+@@ -2035,7 +2034,7 @@ nsLocalFile::Reveal()
return NS_ERROR_FAILURE;
}
@@ -2398,11 +2006,7 @@
#elif defined(MOZ_WIDGET_COCOA)
CFURLRef url;
if (NS_SUCCEEDED(GetCFURL(&url))) {
- nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
- ::CFRelease(url);
- return rv;
- }
- return NS_ERROR_FAILURE;
+@@ -2047,6 +2046,17 @@ nsLocalFile::Reveal()
#else
return NS_ERROR_FAILURE;
#endif
@@ -2420,8 +2024,9 @@
}
NS_IMETHODIMP
- nsLocalFile::Launch()
- {
+@@ -2057,6 +2067,12 @@ nsLocalFile::Launch()
+ }
+
#ifdef MOZ_WIDGET_GTK
+ if( nsKDEUtils::kdeSupport()) {
+ nsTArray<nsCString> command;
@@ -2432,8 +2037,3 @@
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
if (!giovfs) {
return NS_ERROR_FAILURE;
- }
-
- return giovfs->ShowURIForInput(mPath);
- #elif defined(MOZ_WIDGET_ANDROID)
- // Try to get a mimetype, if this fails just use the file uri alone