--- a/firefox-kde.patch Sun Dec 06 22:23:18 2015 +0100
+++ b/firefox-kde.patch Mon Dec 14 00:04:31 2015 +0100
@@ -1,11 +1,11 @@
# HG changeset patch
-# Parent 95b421ca30846be2b5d7230d72263e6dff042d0b
+# Parent 3fedb882f767b2e4ff72ef972a9cce4c5d1af4af
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,1234 @@
+@@ -0,0 +1,1222 @@
+#filter substitution
+<?xml version="1.0"?>
+# -*- Mode: HTML -*-
@@ -91,6 +91,7 @@
+ onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
+ <menuitem id="context_reloadTab" label="&reloadTab.label;" accesskey="&reloadTab.accesskey;"
+ oncommand="gBrowser.reloadTab(TabContextMenu.contextTab);"/>
++ <menuitem id="context_toggleMuteTab" oncommand="TabContextMenu.contextTab.toggleMuteAudio();"/>
+ <menuseparator/>
+ <menuitem id="context_pinTab" label="&pinTab.label;"
+ accesskey="&pinTab.accesskey;"
@@ -170,7 +171,7 @@
+ <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
+ <menupopup rolluponmousewheel="true"
+#ifdef XP_WIN
-+ consumeoutsideclicks="false"
++ consumeoutsideclicks="false" ignorekeys="handled"
+#endif
+ />
+ </menulist>
@@ -456,28 +457,6 @@
+ </hbox>
+ </panel>
+
-+ <!-- Sync Error Panel -->
-+ <panel id="sync-error-panel" class="sync-panel" type="arrow" hidden="true"
-+ noautofocus="true" onclick="this.hidePopup();"
-+ flip="slide">
-+ <hbox class="sync-panel-outer">
-+ <image class="sync-panel-icon"/>
-+ <vbox class="sync-panel-inner">
-+ <description id="sync-error-panel-title"
-+ value="&syncErrorPanel.heading;"/>
-+ <description id="sync-error-panel-subtitle"
-+ value="&syncErrorPanel.subTitle;"/>
-+ <hbox class="sync-panel-button-box">
-+ <spacer flex="1"/>
-+ <button class="sync-panel-button"
-+ label="&syncErrorPanel.signInButton.label;"
-+ accesskey="&syncErrorPanel.signInButton.accesskey;"
-+ onclick="gFxAccounts.openSignInAgainPage();"/>
-+ </hbox>
-+ </vbox>
-+ </hbox>
-+ </panel>
-+
+ <!-- Bookmarks and history tooltip -->
+ <tooltip id="bhTooltip"/>
+
@@ -823,7 +802,6 @@
+
+ <toolbarbutton id="bookmarks-menu-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
-+ persist="class"
+ removable="true"
+ type="menu-button"
+ label="&bookmarksMenuButton.label;"
@@ -947,7 +925,7 @@
+ tooltip="dynamic-shortcut-tooltip"/>
+
+ <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+ persist="class" removable="true"
++ removable="true"
+ label="&homeButton.label;"
+ ondragover="homeButtonObserver.onDragOver(event)"
+ ondragenter="homeButtonObserver.onDragOver(event)"
@@ -1181,14 +1159,24 @@
+#include ../../components/customizableui/content/customizeMode.inc.xul
+ </deck>
+
-+ <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
-+ <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
-+ <vbox id="full-screen-warning-message" align="center">
-+ <description id="full-screen-domain-text"/>
-+ <description class="full-screen-description" value="&fullscreenExitHint2.value;"/>
-+ </vbox>
-+ </hbox>
-+ </hbox>
++ <html:div id="fullscreen-warning" hidden="true">
++ <html:div id="fullscreen-domain-text">
++ &fullscreenWarning.beforeDomain.label;
++ <html:span id="fullscreen-domain"/>
++ &fullscreenWarning.afterDomain.label;
++ </html:div>
++ <html:div id="fullscreen-generic-text">
++ &fullscreenWarning.generic.label;
++ </html:div>
++ <html:button id="fullscreen-exit-button"
++ onclick="FullScreen.exitDomFullScreen();">
++#ifdef XP_MACOSX
++ &exitDOMFullscreenMac.button;
++#else
++ &exitDOMFullscreen.button;
++#endif
++ </html:button>
++ </html:div>
+
+ <vbox id="browser-bottombox" layer="true">
+ <notificationbox id="global-notificationbox"/>
@@ -1402,7 +1390,7 @@
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/nsKDEShellService.cpp
-@@ -0,0 +1,238 @@
+@@ -0,0 +1,292 @@
+/* -*- 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
@@ -1483,6 +1471,47 @@
+}
+
+NS_IMETHODIMP
++nsKDEShellService::GetShouldSkipCheckDefaultBrowser(bool* aResult)
++{
++ NS_ENSURE_ARG_POINTER(aResult);
++
++ nsresult rv;
++ nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
++ if (NS_FAILED(rv)) {
++ return rv;
++ }
++
++ rv = prefs->GetBoolPref(PREF_SKIPDEFAULTBROWSERCHECK, aResult);
++ if (NS_FAILED(rv)) {
++ return rv;
++ }
++ if (*aResult) {
++ // Only skip the default browser check once. The next attempt in
++ // a new session should proceed.
++ return prefs->SetBoolPref(PREF_SKIPDEFAULTBROWSERCHECK, false);
++ }
++
++ int32_t defaultBrowserCheckCount;
++ rv = prefs->GetIntPref(PREF_DEFAULTBROWSERCHECKCOUNT,
++ &defaultBrowserCheckCount);
++ if (NS_FAILED(rv)) {
++ return rv;
++ }
++ if (defaultBrowserCheckCount < 4) {
++ *aResult = false;
++ return prefs->SetIntPref(PREF_DEFAULTBROWSERCHECKCOUNT,
++ defaultBrowserCheckCount + 1);
++ }
++
++ // Disable the default browser check after three attempts.
++ // Don't modify PREF_CHECKDEFAULTBROWSER since that is a
++ // user-initiated action and it shouldn't get re-enabled
++ // if it has been user disabled.
++ *aResult = true;
++ return rv;
++}
++
++NS_IMETHODIMP
+nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
+{
+ // If we've already checked, the browser has been started and this is a
@@ -1492,6 +1521,19 @@
+ return NS_OK;
+ }
+
++ nsresult rv;
++#ifndef RELEASE_BUILD
++ bool skipDefaultBrowserCheck;
++ rv = GetShouldSkipCheckDefaultBrowser(&skipDefaultBrowserCheck);
++ if (NS_FAILED(rv)) {
++ return rv;
++ }
++ if (skipDefaultBrowserCheck) {
++ *aResult = false;
++ return rv;
++ }
++#endif
++
+ nsCOMPtr<nsIPrefBranch> prefs;
+ nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
+ if (pserve)
@@ -1645,42 +1687,11 @@
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/nsKDEShellService.h
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,29 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is Shell Service.
-+ *
-+ * The Initial Developer of the Original Code is mozilla.org.
-+ * Portions created by the Initial Developer are Copyright (C) 2004
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
++/* 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____
@@ -1697,7 +1708,7 @@
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSISHELLSERVICE
+
-+ nsresult Init() NS_HIDDEN;
++ nsresult Init();
+
+private:
+ ~nsKDEShellService() {}
@@ -1710,42 +1721,12 @@
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/nsUnixShellService.cpp
-@@ -0,0 +1,52 @@
+@@ -0,0 +1,22 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is Shell Service.
-+ *
-+ * The Initial Developer of the Original Code is mozilla.org.
-+ * Portions created by the Initial Developer are Copyright (C) 2004
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
++/* 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"
@@ -1767,42 +1748,12 @@
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/nsUnixShellService.h
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,15 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is Shell Service.
-+ *
-+ * The Initial Developer of the Original Code is mozilla.org.
-+ * Portions created by the Initial Developer are Copyright (C) 2004
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
++/* 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____
@@ -1816,9 +1767,9 @@
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
-@@ -709,19 +709,21 @@
- @RESPATH@/defaults/autoconfig/prefcalls.js
+@@ -699,19 +699,21 @@
@RESPATH@/browser/defaults/profile/prefs.js
+ @RESPATH@/browser/defaults/permissions
#ifndef LIBXUL_SDK
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)