2bccc014af
* Support for importing payment methods saved in Chrome-based browser * Hardware video decoding is now enabled for Intel GPUs on Linux * The Tab Manager dropdown now features close buttons, so tabs can be closed more quickly * Streamlined the user interface for importing data in from other browsers * Users without platform support for H264 video decoding can now fallback to Cisco's OpenH264 plugin for playback. * Undo and redo are now available in Password fields * Changed: On Linux, middle clicks on the new tab button will now open the xclipboard contents in the new tab. If the xclipboard content is a URL then that URL is opened, any other text is opened with your default search provider. * Changed: For users with a Firefox Colorways built-in theme, the theme will be automatically migrated to the same theme hosted on addons.mozilla.org for Firefox profiles that have disabled add-ons auto-updates. This will allow users to keep their Colorways theme when they are later removed from Firefox installer files. * Changed: Certain Firefox users may come across a message in the extensions panel indicating that their add-ons are not allowed on the site currently open. We have introduced a new back-end feature to only allow some extensions monitored by Mozilla to run on specific websites for various reasons, including security concerns. * HTML5: The builtin editor now behaves similarly to other browsers with `contenteditable` and `designMode` when splitting a node, e.g. typing Enter to split a paragraph, and also when joining two nodes, e.g. typing Backspace at the start of a paragraph to join the paragraph and the previous OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=1071
261 lines
8.6 KiB
Diff
261 lines
8.6 KiB
Diff
# HG changeset patch
|
|
# User msirringhaus@suse.de
|
|
# Date 1559300151 -7200
|
|
# Fri May 31 12:55:51 2019 +0200
|
|
# Node ID 54d41b0033b8d649d842a1f862c6fed8b9874dec
|
|
# Parent 340817025937e2c69bb1643930d7dfdf63656a7b
|
|
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
|
|
|
|
Index: firefox-115.0/browser/components/preferences/main.js
|
|
===================================================================
|
|
--- firefox-115.0.orig/browser/components/preferences/main.js
|
|
+++ firefox-115.0/browser/components/preferences/main.js
|
|
@@ -293,6 +293,13 @@ var gMainPane = {
|
|
}, backoffTimes[this._backoffIndex]);
|
|
}
|
|
|
|
+ var env = Components.classes["@mozilla.org/process/environment;1"]
|
|
+ .getService(Components.interfaces.nsIEnvironment);
|
|
+ var kde_session = 0;
|
|
+ if (env.get('KDE_FULL_SESSION') == "true") {
|
|
+ kde_session = 1;
|
|
+ }
|
|
+
|
|
this.initBrowserContainers();
|
|
this.buildContentProcessCountMenuList();
|
|
|
|
@@ -1762,6 +1769,17 @@ var gMainPane = {
|
|
}
|
|
try {
|
|
shellSvc.setDefaultBrowser(true, false);
|
|
+ if (kde_session == 1) {
|
|
+ var shellObj = Components.classes["@mozilla.org/file/local;1"]
|
|
+ .createInstance(Components.interfaces.nsILocalFile);
|
|
+ shellObj.initWithPath("/usr/bin/kwriteconfig");
|
|
+ var process = Components.classes["@mozilla.org/process/util;1"]
|
|
+ .createInstance(Components.interfaces.nsIProcess);
|
|
+ process.init(shellObj);
|
|
+ var args = ["--file", "kdeglobals", "--group", "General", "--key",
|
|
+ "BrowserApplication", "firefox"];
|
|
+ process.run(false, args, args.length);
|
|
+ }
|
|
} catch (ex) {
|
|
console.error(ex);
|
|
return;
|
|
Index: firefox-115.0/browser/components/shell/moz.build
|
|
===================================================================
|
|
--- firefox-115.0.orig/browser/components/shell/moz.build
|
|
+++ firefox-115.0/browser/components/shell/moz.build
|
|
@@ -36,6 +36,8 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gt
|
|
|
|
SOURCES += [
|
|
"nsGNOMEShellService.cpp",
|
|
+ "nsKDEShellService.cpp",
|
|
+ "nsUnixShellService.cpp",
|
|
]
|
|
if CONFIG["MOZ_ENABLE_DBUS"]:
|
|
SOURCES += [
|
|
Index: firefox-115.0/browser/components/shell/nsKDEShellService.cpp
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ firefox-115.0/browser/components/shell/nsKDEShellService.cpp
|
|
@@ -0,0 +1,109 @@
|
|
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
+
|
|
+#include "mozilla/ArrayUtils.h"
|
|
+
|
|
+#include "nsCOMPtr.h"
|
|
+#include "nsKDEShellService.h"
|
|
+#include "nsShellService.h"
|
|
+#include "nsKDEUtils.h"
|
|
+#include "nsIPrefService.h"
|
|
+#include "nsIProcess.h"
|
|
+#include "nsIFile.h"
|
|
+#include "nsServiceManagerUtils.h"
|
|
+#include "nsComponentManagerUtils.h"
|
|
+#include "nsIMutableArray.h"
|
|
+#include "nsISupportsPrimitives.h"
|
|
+#include "nsArrayUtils.h"
|
|
+
|
|
+using namespace mozilla;
|
|
+
|
|
+nsresult
|
|
+nsKDEShellService::Init()
|
|
+{
|
|
+ if( !nsKDEUtils::kdeSupport())
|
|
+ return NS_ERROR_NOT_AVAILABLE;
|
|
+ return NS_OK;
|
|
+}
|
|
+
|
|
+NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService)
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::IsDefaultBrowser(bool aForAllTypes,
|
|
+ bool* aIsDefaultBrowser)
|
|
+{
|
|
+ *aIsDefaultBrowser = false;
|
|
+
|
|
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
|
|
+ if (!command)
|
|
+ return NS_ERROR_FAILURE;
|
|
+
|
|
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
|
+ if (!str)
|
|
+ return NS_ERROR_FAILURE;
|
|
+
|
|
+ str->SetData("ISDEFAULTBROWSER"_ns);
|
|
+ command->AppendElement( str );
|
|
+
|
|
+ if( nsKDEUtils::command( command ))
|
|
+ *aIsDefaultBrowser = true;
|
|
+ return NS_OK;
|
|
+}
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
|
|
+ bool aForAllUsers)
|
|
+{
|
|
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
|
|
+ if (!command)
|
|
+ return NS_ERROR_FAILURE;
|
|
+
|
|
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
|
+ nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
|
+ if (!cmdstr || !paramstr)
|
|
+ return NS_ERROR_FAILURE;
|
|
+
|
|
+ cmdstr->SetData("SETDEFAULTBROWSER"_ns);
|
|
+ command->AppendElement( cmdstr );
|
|
+
|
|
+ paramstr->SetData( aClaimAllTypes ? "ALLTYPES"_ns : "NORMAL"_ns );
|
|
+ command->AppendElement( paramstr );
|
|
+
|
|
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
|
+}
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::GetCanSetDesktopBackground(bool* aResult)
|
|
+{
|
|
+ *aResult = true;
|
|
+ return NS_OK;
|
|
+}
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::SetDesktopBackground(dom::Element* aElement,
|
|
+ int32_t aPosition,
|
|
+ const nsACString& aImageName)
|
|
+{
|
|
+ return NS_ERROR_NOT_IMPLEMENTED;
|
|
+}
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
|
|
+{
|
|
+ return NS_ERROR_NOT_IMPLEMENTED;
|
|
+}
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
|
|
+{
|
|
+ return NS_ERROR_NOT_IMPLEMENTED;
|
|
+}
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsKDEShellService::IsDefaultForScheme(nsTSubstring<char> const& aScheme, bool* aIsDefaultBrowser)
|
|
+{
|
|
+ return NS_ERROR_NOT_IMPLEMENTED;
|
|
+}
|
|
+
|
|
Index: firefox-115.0/browser/components/shell/nsKDEShellService.h
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ firefox-115.0/browser/components/shell/nsKDEShellService.h
|
|
@@ -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
|
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
+
|
|
+#ifndef nskdeshellservice_h____
|
|
+#define nskdeshellservice_h____
|
|
+
|
|
+#include "nsIGNOMEShellService.h"
|
|
+#include "nsToolkitShellService.h"
|
|
+#include "nsString.h"
|
|
+#include "mozilla/Attributes.h"
|
|
+
|
|
+class nsKDEShellService final : public nsIGNOMEShellService,
|
|
+ public nsToolkitShellService
|
|
+{
|
|
+public:
|
|
+ nsKDEShellService() : mCheckedThisSession(false) { }
|
|
+
|
|
+ NS_DECL_ISUPPORTS
|
|
+ NS_DECL_NSISHELLSERVICE
|
|
+ NS_DECL_NSIGNOMESHELLSERVICE
|
|
+
|
|
+ nsresult Init();
|
|
+
|
|
+private:
|
|
+ ~nsKDEShellService() {}
|
|
+
|
|
+ bool mCheckedThisSession;
|
|
+};
|
|
+
|
|
+#endif // nskdeshellservice_h____
|
|
Index: firefox-115.0/browser/components/shell/nsUnixShellService.cpp
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ firefox-115.0/browser/components/shell/nsUnixShellService.cpp
|
|
@@ -0,0 +1,22 @@
|
|
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
+
|
|
+
|
|
+#include "nsUnixShellService.h"
|
|
+#include "nsGNOMEShellService.h"
|
|
+#include "nsKDEShellService.h"
|
|
+#include "nsKDEUtils.h"
|
|
+#include "mozilla/ModuleUtils.h"
|
|
+
|
|
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
|
|
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsUnixShellServiceConstructor(REFNSIID aIID, void **aResult)
|
|
+{
|
|
+ if( nsKDEUtils::kdeSupport())
|
|
+ return nsKDEShellServiceConstructor( aIID, aResult );
|
|
+ return nsGNOMEShellServiceConstructor( aIID, aResult );
|
|
+}
|
|
Index: firefox-115.0/browser/components/shell/nsUnixShellService.h
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ firefox-115.0/browser/components/shell/nsUnixShellService.h
|
|
@@ -0,0 +1,15 @@
|
|
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
+
|
|
+
|
|
+#ifndef nsunixshellservice_h____
|
|
+#define nsunixshellservice_h____
|
|
+
|
|
+#include "nsIGNOMEShellService.h"
|
|
+
|
|
+NS_IMETHODIMP
|
|
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
|
+
|
|
+#endif // nsunixshellservice_h____
|