--- a/firefox-kde.patch Fri Jun 08 22:31:03 2018 +0200
+++ b/firefox-kde.patch Fri Jun 08 22:48:29 2018 +0200
@@ -1,11 +1,11 @@
# HG changeset patch
-# Parent 1b44c077e473c5a7d02fab26e2a220ebf219e0ab
+# Parent a01c6385626ce90528d02e5127de5c1444c07efc
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,1280 @@
+@@ -0,0 +1,1293 @@
+#filter substitution
+<?xml version="1.0"?>
+# -*- Mode: HTML -*-
@@ -21,14 +21,17 @@
+<?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
++<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
++<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
+<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
-+
-+<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
++<?xml-stylesheet href="chrome://browser/skin/compacttheme.css" type="text/css" alternate="yes" title="Light/Dark"?>
+
+# All DTD information is stored in a separate file so that it can be shared by
+# hiddenWindow.xul.
++<!DOCTYPE window [
+#include browser-doctype.inc
++]>
+
+<window id="main-window"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -51,14 +54,12 @@
+ titlemodifier_normal="&mainWindow.titlemodifier;"
+ titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
+#endif
-+#ifdef CAN_DRAW_IN_TITLEBAR
+#ifdef XP_WIN
+ chromemargin="0,2,2,2"
+#else
+ chromemargin="0,-1,-1,-1"
+#endif
+ tabsintitlebar="true"
-+#endif
+ titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
+ windowtype="navigator:browser"
+ macanimationtype="document"
@@ -68,18 +69,33 @@
+ retargetdocumentfocus="urlbar"
+ persist="screenX screenY width height sizemode">
+
-+# All JS files which are not content (only) dependent that browser.xul
-+# wishes to include *must* go into the global-scripts.inc file
-+# so that they can be shared by macBrowserOverlay.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
+
+<script type="application/javascript">
+ Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
+ Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
++
++ ChromeUtils.defineModuleGetter(window,
++ "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
++ ChromeUtils.defineModuleGetter(window,
++ "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm");
++ ChromeUtils.defineModuleGetter(window,
++ "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm");
++
++ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
++ XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView",
++ "chrome://browser/content/places/treeView.js");
++ XPCOMUtils.defineLazyScriptGetter(window,
++ ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
++ "chrome://browser/content/places/controller.js");
+</script>
+
-+# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
-+# browser-sets.inc file for sharing with hiddenWindow.xul.
++# All sets except for popupsets (commands, keys, stringbundles and broadcasters)
++# *must* go into the browser-sets.inc file so that they can be shared with other
++# top level windows in macWindow.inc.xul.
+#define FULL_BROWSER_WINDOW
+#include browser-sets.inc
+#undef FULL_BROWSER_WINDOW
@@ -219,7 +235,7 @@
+ <description id="editBookmarkPanelDescription"/>
+ </vbox>
+ </row>
-+ <vbox id="editBookmarkPanelContent" flex="1" hidden="true"/>
++#include ../../components/places/content/editBookmarkPanel.inc.xul
+ <hbox id="editBookmarkPanelBottomButtons" pack="end">
+#ifdef XP_UNIX
+ <button id="editBookmarkPanelDoneButton"
@@ -403,7 +419,7 @@
+#include browser-context.inc
+ </menupopup>
+
-+ <menupopup id="placesContext"/>
++#include ../../components/places/content/placesContextMenu.inc.xul
+
+ <panel id="ctrlTab-panel" hidden="true" norestorefocus="true" level="top">
+ <hbox>
@@ -432,7 +448,8 @@
+ copyURL-title="&pageAction.copyLink.label;"
+ emailLink-title="&emailPageCmd.label;"
+ sendToDevice-title="&pageAction.sendTabToDevice.label;"
-+ sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;">
++ sendToDevice-notReadyTitle="&sendToDevice.syncNotReady.label;"
++ shareURL-title="&pageAction.shareUrl.label;">
+ <panelmultiview id="pageActionPanelMultiView"
+ mainViewId="pageActionPanelMainView"
+ viewCacheId="appMenu-viewCache">
@@ -480,8 +497,7 @@
+ oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
+ </menupopup>
+
-+ <!-- Bookmarks and history tooltip -->
-+ <tooltip id="bhTooltip"/>
++#include ../../components/places/content/bookmarksHistoryTooltip.inc.xul
+
+ <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
+
@@ -515,15 +531,6 @@
+ </vbox>
+ </hbox>
+
-+ <hbox id="bookmarked-notification-container" mousethrough="always">
-+ <vbox id="bookmarked-notification-anchor">
-+ <vbox id="bookmarked-notification"/>
-+ </vbox>
-+ <vbox id="bookmarked-notification-dropmarker-anchor">
-+ <image id="bookmarked-notification-dropmarker-icon"/>
-+ </vbox>
-+ </hbox>
-+
+ <tooltip id="dynamic-shortcut-tooltip"
+ onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
+
@@ -589,7 +596,6 @@
+ </popupset>
+ <box id="appMenu-viewCache" hidden="true"/>
+
-+#ifdef CAN_DRAW_IN_TITLEBAR
+<vbox id="titlebar">
+ <hbox id="titlebar-content">
+ <spacer id="titlebar-spacer" flex="1"/>
@@ -611,7 +617,6 @@
+#endif
+ </hbox>
+</vbox>
-+#endif
+
+ <toolbox id="navigator-toolbox">
+ <!-- Menu -->
@@ -626,17 +631,15 @@
+#endif
+ context="toolbar-context-menu">
+ <toolbaritem id="menubar-items" align="center">
-+# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
-+# hiddenWindow.xul.
++# The entire main menubar is placed into browser-menubar.inc, so that it can be
++# shared with other top level windows in macWindow.inc.xul.
+#include browser-menubar.inc
+ </toolbaritem>
+
-+#ifdef CAN_DRAW_IN_TITLEBAR
+#ifndef XP_MACOSX
+ <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
+ skipintoolbarset="true"/>
+#endif
-+#endif
+ </toolbar>
+
+ <toolbar id="TabsToolbar"
@@ -645,13 +648,9 @@
+ customizable="true"
+ mode="icons"
+ aria-label="&tabsToolbar.label;"
-+ context="toolbar-context-menu"
-+ collapsed="true">
-+
-+#ifdef CAN_DRAW_IN_TITLEBAR
++ context="toolbar-context-menu">
+ <hbox class="titlebar-placeholder" type="pre-tabs"
+ skipintoolbarset="true"/>
-+#endif
+
+ <tabs id="tabbrowser-tabs"
+ flex="1"
@@ -675,7 +674,7 @@
+ removable="true"/>
+
+ <toolbarbutton id="alltabs-button"
-+ class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
++ class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button badged-button"
+ type="menu"
+ label="&listAllTabs.label;"
+ tooltiptext="&listAllTabs.label;"
@@ -692,21 +691,23 @@
+ <menupopup id="alltabs_containersMenuTab" />
+ </menu>
+ <menuseparator id="alltabs-popup-separator-2"/>
++ <menu id="alltabs_hiddenTabs"
++ label="&hiddenTabs.label;">
++ <menupopup id="alltabs_hiddenTabsMenu"/>
++ </menu>
++ <menuseparator id="alltabs-popup-separator-3"/>
+ </menupopup>
+ </toolbarbutton>
+
-+#ifdef CAN_DRAW_IN_TITLEBAR
+ <hbox class="titlebar-placeholder" type="post-tabs"
+ ordinal="1000"
+ skipintoolbarset="true"/>
-+#endif
+
+ <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
+ ordinal="1000"
+ aria-live="polite" skipintoolbarset="true"/>
+ <hbox class="private-browsing-indicator" skipintoolbarset="true"
+ ordinal="1000"/>
-+#ifdef CAN_DRAW_IN_TITLEBAR
+ <hbox class="titlebar-placeholder" type="caption-buttons"
+#ifndef XP_MACOSX
+ ordinal="1000"
@@ -717,7 +718,6 @@
+ <hbox class="titlebar-placeholder" type="fullscreen-button"
+ skipintoolbarset="true"/>
+#endif
-+#endif
+ </toolbar>
+
+ <toolbar id="nav-bar"
@@ -876,7 +876,7 @@
+ <image id="midi-notification-icon" class="notification-anchor-icon midi-icon" role="button"
+ tooltiptext="&urlbar.midiNotificationAnchor.tooltip;"/>
+ <image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
-+ tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
++ tooltiptext="&urlbar.webAuthnAnchor.tooltip;"/>
+ </box>
+ <image id="connection-icon"/>
+ <image id="extension-icon"/>
@@ -1228,8 +1228,12 @@
+ onselect="if (event.target.localName == 'tabpanels') gBrowser.updateCurrentBrowser();">
+ <tabpanels flex="1" class="plain" selectedIndex="0" id="tabbrowser-tabpanels">
+ <notificationbox flex="1" notificationside="top">
-+ <hbox flex="1" class="browserSidebarContainer">
-+ <vbox flex="1" class="browserContainer">
++ <!-- Set large flex to allow the devtools toolbox to set a flex attribute.
++ We don't want the toolbox to actually take up free space, but we do want it to collapse when the window shrinks, and with flex=0 it can't.
++ When the toolbox is on the bottom it's a sibling of browserSidebarContainer,
++ and when it's on the side it's a sibling of browserContainer. -->
++ <hbox flex="10000" class="browserSidebarContainer">
++ <vbox flex="10000" class="browserContainer">
+ <stack flex="1" class="browserStack">
+ <browser id="tabbrowser-initialBrowser" type="content"
+ message="true" messagemanagergroup="browsers"
@@ -1240,6 +1244,15 @@
+ selectmenulist="ContentSelectDropdown"
+ datetimepicker="DateTimePickerPanel"/>
+ </stack>
++ <hbox id="statuspanel" inactive="true" layer="true">
++ <hbox id="statuspanel-inner">
++ <label id="statuspanel-label"
++ role="status"
++ aria-live="off"
++ flex="1"
++ crop="end"/>
++ </hbox>
++ </hbox>
+ </vbox>
+ </hbox>
+ </notificationbox>
@@ -1289,7 +1302,7 @@
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
-@@ -42,16 +42,18 @@ browser.jar:
+@@ -44,16 +44,18 @@ browser.jar:
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
@@ -1330,7 +1343,7 @@
#include "rdf.h"
#include "nsFeedSniffer.h"
-@@ -32,18 +32,16 @@ using namespace mozilla::browser;
+@@ -31,18 +31,16 @@ using namespace mozilla::browser;
/////////////////////////////////////////////////////////////////////////////
@@ -1349,9 +1362,9 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
-@@ -64,17 +62,17 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsSessionStoreUtils)
- NS_DEFINE_NAMED_CID(NS_SESSIONSTOREUTILS_CID);
+@@ -60,17 +58,17 @@ NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME
+ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
+ #endif
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
{ &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
@@ -1371,7 +1384,7 @@
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
-@@ -333,16 +333,23 @@ var gMainPane = {
+@@ -327,16 +327,23 @@ var gMainPane = {
this._backoffIndex++ : backoffTimes.length - 1]);
};
@@ -1395,7 +1408,7 @@
performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
this.updateDefaultPerformanceSettingsPref();
-@@ -1060,16 +1067,27 @@ var gMainPane = {
+@@ -868,16 +875,27 @@ var gMainPane = {
// Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
this._backoffIndex = 0;
@@ -1426,25 +1439,25 @@
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':
- ]
- elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
- SOURCES += [
- 'nsMacShellService.cpp',
+@@ -21,16 +21,18 @@ XPIDL_SOURCES += [
+
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+ XPIDL_SOURCES += [
+ 'nsIMacShellService.idl',
]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
- SOURCES += [
- 'nsGNOMEShellService.cpp',
+ XPIDL_SOURCES += [
+ 'nsIGNOMEShellService.idl',
+ 'nsKDEShellService.cpp',
+ 'nsUnixShellService.cpp',
]
- if SOURCES:
- FINAL_LIBRARY = 'browsercomps'
+ XPIDL_MODULE = 'shellservice'
- EXTRA_COMPONENTS += [
- 'nsSetDefaultBrowser.js',
- 'nsSetDefaultBrowser.manifest',
+ if CONFIG['OS_ARCH'] == 'WINNT':
+ SOURCES += [
+ 'nsWindowsShellService.cpp',
+ ]
diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp
new file mode 100644
--- /dev/null
@@ -1739,7 +1752,7 @@
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
-@@ -646,16 +646,18 @@
+@@ -452,16 +452,18 @@
@RESPATH@/browser/defaults/blocklists
@RESPATH@/browser/defaults/pinning
@@ -1748,13 +1761,13 @@
; gre location for now.
@RESPATH@/defaults/pref/channel-prefs.js
-+@BINPATH@/defaults/pref/kde.js
++@RESPATH@/defaults/pref/kde.js
+
- ; Remote control protocol prefs
- ; defined in ../../testing/marionette/prefs/marionette.js
- @RESPATH@/defaults/pref/marionette.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