diff -r 84cdfb476431 -r 8e9195853a32 firefox-kde.patch
--- a/firefox-kde.patch Sun Mar 17 10:00:10 2019 +0100
+++ b/firefox-kde.patch Tue Nov 19 22:54:22 2019 +0100
@@ -1,1493 +1,21 @@
# HG changeset patch
-# Parent 693f0baece29cc958a7d91b89fd12e3b89a502e3
+# User msirringhaus@suse.de
+# Date 1559300151 -7200
+# Fri May 31 12:55:51 2019 +0200
+# Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
+# Parent 4faaad3619f286bd6077754d8e59d339a5142b80
+How to apply this patch:
+1. Import and apply it
+2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul
+3. Find editBookmarkPanelDoneButton
+4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style)
+5. hg qrefresh
-diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
-new file mode 100644
---- /dev/null
-+++ b/browser/base/content/browser-kde.xul
-@@ -0,0 +1,1395 @@
-+#filter substitution
-+
-+# -*- Mode: HTML -*-
-+#
-+# 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/.
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+# All DTD information is stored in a separate file so that it can be shared by
-+# hiddenWindow.xul.
-+
-+
-+
-+
-+# All JS files which are needed by browser.xul and other top level windows to
-+# support MacOS specific features *must* go into the global-scripts.inc file so
-+# that they can be shared with macWindow.inc.xul.
-+#include global-scripts.inc
-+
-+
-+
-+# All sets except for popupsets (commands, keys, and stringbundles)
-+# *must* go into the browser-sets.inc file so that they can be shared with other
-+# top level windows in macWindow.inc.xul.
-+#include browser-sets.inc
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+#include ../../components/places/content/editBookmarkPanel.inc.xul
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+#include ../../components/places/content/placesContextMenu.inc.xul
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
-+
-+
-+
-+
-+
-+#ifdef XP_MACOSX
-+
-+#else
-+
-+#endif
-+
-+
-+
-+
-+#ifdef XP_MACOSX
-+
-+#else
-+
-+#endif
-+
-+
-+#include popup-notifications.inc
-+
-+#include ../../components/customizableui/content/panelUI.inc.xul
-+#include ../../components/controlcenter/content/panel.inc.xul
-+#include ../../components/downloads/content/downloadsPanel.inc.xul
-+#include browser-allTabsMenu.inc.xul
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+#ifndef XP_MACOSX
-+
-+
-+#endif
-+
-+#include titlebar-items.inc.xul
-+
-+#ifdef XP_MACOSX
-+
-+
-+
-+
-+
-+
-+#endif
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+#include ../../components/customizableui/content/customizeMode.inc.xul
-+
-+
-+
-+
-+ &fullscreenWarning.beforeDomain.label;
-+
-+ &fullscreenWarning.afterDomain.label;
-+
-+
-+ &fullscreenWarning.generic.label;
-+
-+
-+#ifdef XP_MACOSX
-+ &exitDOMFullscreenMac.button;
-+#else
-+ &exitDOMFullscreen.button;
-+#endif
-+
-+
-+
-+
-+
-+ &pointerlockWarning.beforeDomain.label;
-+
-+ &pointerlockWarning.afterDomain.label;
-+
-+
-+ &pointerlockWarning.generic.label;
-+
-+
-+
-+
-+
-+
-+
-+
-diff --git a/browser/base/jar.mn b/browser/base/jar.mn
---- a/browser/base/jar.mn
-+++ b/browser/base/jar.mn
-@@ -28,16 +28,18 @@ browser.jar:
- content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
- content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
- * content/browser/browser.css (content/browser.css)
- content/browser/browser.js (content/browser.js)
- #ifdef MOZ_BROWSER_XHTML
- * content/browser/browser.xhtml (content/browser.xhtml)
- #endif
- * content/browser/browser.xul (content/browser.xul)
-+* content/browser/browser-kde.xul (content/browser-kde.xul)
-+% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
- content/browser/browser-addons.js (content/browser-addons.js)
- content/browser/browser-allTabsMenu.js (content/browser-allTabsMenu.js)
- content/browser/browser-captivePortal.js (content/browser-captivePortal.js)
- content/browser/browser-ctrlTab.js (content/browser-ctrlTab.js)
- content/browser/browser-customization.js (content/browser-customization.js)
- content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
- content/browser/browser-compacttheme.js (content/browser-compacttheme.js)
- content/browser/browser-contentblocking.js (content/browser-contentblocking.js)
-diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
---- a/browser/components/build/nsModule.cpp
-+++ b/browser/components/build/nsModule.cpp
-@@ -8,17 +8,17 @@
- #include "nsBrowserCompsCID.h"
- #include "DirectoryProvider.h"
-
- #if defined(XP_WIN)
- #include "nsWindowsShellService.h"
- #elif defined(XP_MACOSX)
- #include "nsMacShellService.h"
- #elif defined(MOZ_WIDGET_GTK)
--#include "nsGNOMEShellService.h"
-+#include "nsUnixShellService.h"
- #endif
-
- #if defined(MOZ_WIDGET_COCOA)
- #include "nsMacAttribution.h"
- #endif
-
- #if defined(XP_WIN)
- #include "nsIEHistoryEnumerator.h"
-@@ -33,18 +33,16 @@ using namespace mozilla::browser;
-
- /////////////////////////////////////////////////////////////////////////////
-
- NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
- #if defined(XP_WIN)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
- #elif defined(XP_MACOSX)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
--#elif defined(MOZ_WIDGET_GTK)
--NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
- #endif
-
- #if defined(MOZ_WIDGET_COCOA)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacAttributionService)
- #endif
-
- #if defined(XP_WIN)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEHistoryEnumerator)
-@@ -67,17 +65,17 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSER
- #endif
-
- static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
- // clang-format off
- { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
- #if defined(XP_WIN)
- { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
- #elif defined(MOZ_WIDGET_GTK)
-- { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
-+ { &kNS_SHELLSERVICE_CID, false, nullptr, nsUnixShellServiceConstructor },
- #endif
- { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
- #if defined(XP_WIN)
- { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
- #elif defined(XP_MACOSX)
- { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
- #endif
- #if defined(MOZ_WIDGET_COCOA)
diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
-@@ -289,16 +289,23 @@ var gMainPane = {
- this._backoffIndex++ : backoffTimes.length - 1]);
+@@ -341,16 +341,23 @@ var gMainPane = {
+ }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]);
};
window.setTimeout(() => {
@@ -1505,18 +33,18 @@
this.initBrowserContainers();
this.buildContentProcessCountMenuList();
- let performanceSettingsLink = document.getElementById("performanceSettingsLearnMore");
- let performanceSettingsUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "performance";
- performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
-
- this.updateDefaultPerformanceSettingsPref();
-@@ -1012,16 +1019,27 @@ var gMainPane = {
- // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
+ let performanceSettingsLink = document.getElementById(
+ "performanceSettingsLearnMore"
+ );
+ let performanceSettingsUrl =
+ Services.urlFormatter.formatURLPref("app.support.baseURL") +
+@@ -1199,16 +1206,27 @@ var gMainPane = {
this._backoffIndex = 0;
let shellSvc = getShellService();
- if (!shellSvc)
+ if (!shellSvc) {
return;
+ }
try {
shellSvc.setDefaultBrowser(true, false);
+ if (kde_session == 1) {
@@ -1541,30 +69,30 @@
diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
--- a/browser/components/shell/moz.build
+++ b/browser/components/shell/moz.build
-@@ -39,16 +39,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+@@ -28,16 +28,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
]
- elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
- SOURCES += [
- 'nsMacShellService.cpp',
+ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
+ XPIDL_SOURCES += [
+ 'nsIGNOMEShellService.idl',
]
- elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
+
SOURCES += [
'nsGNOMEShellService.cpp',
+ 'nsKDEShellService.cpp',
+ 'nsUnixShellService.cpp',
]
-
- if SOURCES:
- FINAL_LIBRARY = 'browsercomps'
-
- EXTRA_JS_MODULES += [
- 'HeadlessShell.jsm',
- 'ShellService.jsm',
+ elif CONFIG['OS_ARCH'] == 'WINNT':
+ SOURCES += [
+ 'nsWindowsShellService.cpp',
+ ]
+ LOCAL_INCLUDES += [
+ '../../../other-licenses/nsis/Contrib/CityHash/cityhash',
+ ]
diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/nsKDEShellService.cpp
-@@ -0,0 +1,153 @@
+@@ -0,0 +1,103 @@
+/* -*- 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
@@ -1598,13 +126,10 @@
+NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService)
+
+NS_IMETHODIMP
-+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
-+ bool aForAllTypes,
++nsKDEShellService::IsDefaultBrowser(bool aForAllTypes,
+ bool* aIsDefaultBrowser)
+{
+ *aIsDefaultBrowser = false;
-+ if (aStartupCheck)
-+ mCheckedThisSession = true;
+
+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
@@ -1671,58 +196,11 @@
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
-+NS_IMETHODIMP
-+nsKDEShellService::OpenApplication(PRInt32 aApplication)
-+{
-+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
-+ if (!command)
-+ return NS_ERROR_FAILURE;
-+
-+ nsCOMPtr str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
-+ if (!str)
-+ return NS_ERROR_FAILURE;
-+
-+ if( aApplication == APPLICATION_MAIL )
-+ str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
-+ else if( aApplication == APPLICATION_NEWS )
-+ str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
-+ else
-+ return NS_ERROR_NOT_IMPLEMENTED;
-+
-+ command->AppendElement( str );
-+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
-+}
-+
-+NS_IMETHODIMP
-+nsKDEShellService::OpenApplicationWithURI(nsIFile* aApplication, const nsACString& aURI)
-+{
-+ nsCOMPtr command = do_CreateInstance( NS_ARRAY_CONTRACTID );
-+ if (!command)
-+ return NS_ERROR_FAILURE;
-+
-+ nsCOMPtr cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
-+ nsCOMPtr appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
-+ nsCOMPtr uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
-+ if (!cmdstr || !appstr || !uristr)
-+ return NS_ERROR_FAILURE;
-+
-+ cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" ));
-+ command->AppendElement( cmdstr );
-+ nsAutoCString app;
-+ nsresult rv = aApplication->GetNativePath( app );
-+ NS_ENSURE_SUCCESS( rv, rv );
-+ appstr->SetData( app );
-+ command->AppendElement( appstr );
-+ uristr->SetData( aURI );
-+ command->AppendElement( uristr );
-+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
-+}
-+
diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/nsKDEShellService.h
-@@ -0,0 +1,30 @@
+@@ -0,0 +1,32 @@
+/* -*- 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
@@ -1732,10 +210,12 @@
+#define nskdeshellservice_h____
+
+#include "nsIGNOMEShellService.h"
++#include "nsToolkitShellService.h"
+#include "nsString.h"
+#include "mozilla/Attributes.h"
+
-+class nsKDEShellService final : public nsIGNOMEShellService
++class nsKDEShellService final : public nsIGNOMEShellService,
++ public nsToolkitShellService
+{
+public:
+ nsKDEShellService() : mCheckedThisSession(false) { }
@@ -1800,25 +280,3 @@
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
+
+#endif // nsunixshellservice_h____
-diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
---- a/browser/installer/package-manifest.in
-+++ b/browser/installer/package-manifest.in
-@@ -451,16 +451,18 @@
- @RESPATH@/browser/defaults/settings/pinning
- @RESPATH@/browser/defaults/settings/main
-
- ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
- ; Technically this is an app pref file, but we are keeping it in the original
- ; gre location for now.
- @RESPATH@/defaults/pref/channel-prefs.js
-
-+@RESPATH@/defaults/pref/kde.js
-+
- ; Services (gre) prefs
- @RESPATH@/defaults/pref/services-sync.js
-
- ; [Layout Engine Resources]
- ; Style Sheets, Graphics and other Resources used by the layout engine.
- @RESPATH@/res/EditorOverride.css
- @RESPATH@/res/contenteditable.css
- @RESPATH@/res/designmode.css