--- a/firefox-kde.patch Sat Aug 05 15:05:11 2017 +0200
+++ b/firefox-kde.patch Sat Aug 05 20:31:55 2017 +0200
@@ -1,11 +1,11 @@
# HG changeset patch
-# Parent 2d666d6d44b2c1f6bc3e033c7e0ac94652af9fee
+# Parent 36e478aec136484b59a9fda90f63fa7ddc962018
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,1149 @@
+@@ -0,0 +1,1306 @@
+#filter substitution
+<?xml version="1.0"?>
+# -*- Mode: HTML -*-
@@ -17,7 +17,6 @@
+<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
-+<?xml-stylesheet href="chrome://devtools/skin/devtools-browser.css" type="text/css"?>
+<?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/" type="text/css"?>
@@ -34,6 +33,7 @@
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:html="http://www.w3.org/1999/xhtml"
++ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
+ title="&mainWindow.title;"
@@ -114,7 +114,7 @@
+ <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
+ accesskey="&sendTabToDevice.accesskey;" hidden="true">
+ <menupopup id="context_sendTabToDevicePopupMenu"
-+ onpopupshowing="gFxAccounts.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
++ onpopupshowing="gSync.populateSendTabToDevicesMenu(event.target, TabContextMenu.contextTab.linkedBrowser.currentURI.spec, TabContextMenu.contextTab.linkedBrowser.contentTitle);"/>
+ </menu>
+ <menuseparator/>
+ <menuitem id="context_reloadAllTabs" label="&reloadAllTabs.label;" accesskey="&reloadAllTabs.accesskey;"
@@ -173,10 +173,10 @@
+ hidden="true"
+ orient="vertical"
+ noautofocus="true"
++ noautohide="true"
+ consumeoutsideclicks="false"
+ level="parent"
+ tabspecific="true">
-+ <iframe id="dateTimePopupFrame"/>
+ </panel>
+
+ <!-- for select dropdowns. The menupopup is what shows the list of options,
@@ -297,10 +297,53 @@
+ </hbox>
+ <hbox id="share-container" flex="1"/>
+ </panel>
++ <panel id="sidebarMenu-popup"
++ class="cui-widget-panel"
++ role="group"
++ type="arrow"
++ hidden="true"
++ flip="slide"
++ orient="vertical"
++ position="bottomcenter topleft">
++ <toolbarbutton id="sidebar-switcher-bookmarks"
++ class="subviewbutton subviewbutton-iconic"
++ key="viewBookmarksSidebarKb"
++ observes="viewBookmarksSidebar"
++ oncommand="SidebarUI.show('viewBookmarksSidebar');">
++ <observes element="viewBookmarksSidebar" attribute="checked"/>
++ </toolbarbutton>
++ <toolbarbutton id="sidebar-switcher-history"
++ label="&historyButton.label;"
++ class="subviewbutton subviewbutton-iconic"
++ key="key_gotoHistory"
++ observes="viewHistorySidebar"
++ oncommand="SidebarUI.show('viewHistorySidebar');">
++ <observes element="viewHistorySidebar" attribute="checked"/>
++ </toolbarbutton>
++ <toolbarbutton id="sidebar-switcher-tabs"
++ label="&syncedTabs.sidebar.label;"
++ class="subviewbutton subviewbutton-iconic"
++ observes="viewTabsSidebar"
++ oncommand="SidebarUI.show('viewTabsSidebar');">
++ <observes element="viewTabsSidebar" attribute="checked"/>
++ </toolbarbutton>
++ <toolbarseparator/>
++ <vbox id="sidebar-extensions"></vbox>
++ <toolbarseparator/>
++ <toolbarbutton id="sidebar-reverse-position"
++ class="subviewbutton"
++ oncommand="SidebarUI.reversePosition()"/>
++ <toolbarseparator/>
++ <toolbarbutton label="&sidebarMenuClose.label;"
++ class="subviewbutton"
++ oncommand="SidebarUI.hide()"/>
++ </panel>
+
+ <menupopup id="toolbar-context-menu"
+ onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
+ <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
++ photonaccesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
++ photonlabel="&customizeMenu.pinToOverflowMenu.label;"
+ accesskey="&customizeMenu.moveToPanel.accesskey;"
+ label="&customizeMenu.moveToPanel.label;"
+ contexttype="toolbaritem"
@@ -412,6 +455,58 @@
+ </hbox>
+ </panel>
+
++ <panel id="page-action-panel"
++ class="cui-widget-panel"
++ role="group"
++ type="arrow"
++ hidden="true"
++ flip="slide"
++ position="bottomcenter topright"
++ noautofocus="true">
++ <photonpanelmultiview id="page-action-multiView"
++ mainViewId="page-action-mainView">
++ <panelview id="page-action-mainView"
++ class="PanelUI-subView">
++ <vbox class="panel-subview-body">
++ <toolbarbutton id="page-action-bookmark-button"
++ class="subviewbutton subviewbutton-iconic"
++ observes="bookmarkThisPageBroadcaster"
++ command="Browser:AddBookmarkAs"
++ onclick="gPageActionButton.panel.hidePopup();"/>
++ <toolbarseparator/>
++ <toolbarbutton id="page-action-copy-url-button"
++ class="subviewbutton subviewbutton-iconic"
++ label="©URLCmd.label;"
++ command="PageAction:copyURL"/>
++ <toolbarbutton id="page-action-email-link-button"
++ class="subviewbutton subviewbutton-iconic"
++ label="&emailPageCmd.label;"
++ command="PageAction:emailLink"/>
++ <toolbarbutton id="page-action-send-to-device-button"
++ class="subviewbutton subviewbutton-iconic subviewbutton-nav"
++ label="&sendToDevice.label;"
++ closemenu="none"
++ oncommand="gPageActionButton.showSendToDeviceView(this);"/>
++ </vbox>
++ </panelview>
++ <panelview id="page-action-sendToDeviceView"
++ class="PanelUI-subView"
++ title="&sendToDevice.viewTitle;">
++ <vbox id="page-action-sendToDeviceView-body" class="panel-subview-body">
++ <toolbarbutton id="page-action-sendToDevice-fxa-button"
++ class="subviewbutton subviewbutton-iconic"
++ label="&syncBrand.fxAccount.label;"
++ shortcut="&sendToDevice.fxaRequired.label;"
++ oncommand="gPageActionButton.fxaButtonClicked();"/>
++ <toolbarbutton id="page-action-no-devices-button"
++ class="subviewbutton"
++ label="&sendToDevice.noDevices.label;"
++ disabled="true"/>
++ </vbox>
++ </panelview>
++ </photonpanelmultiview>
++ </panel>
++
+ <!-- Bookmarks and history tooltip -->
+ <tooltip id="bhTooltip"/>
+
@@ -487,6 +582,10 @@
+ <menuitem label="&syncedTabs.context.openAllInTabs.label;"
+ accesskey="&syncedTabs.context.openAllInTabs.accesskey;"
+ id="syncedTabsOpenAllInTabs"/>
++ <menuitem label="&syncedTabs.context.managedevices.label;"
++ accesskey="&syncedTabs.context.managedevices.accesskey;"
++ id="syncedTabsManageDevices"
++ oncommand="gSync.openDevicesManagementPage('syncedtabs-sidebar');"/>
+ <menuitem label="&syncSyncNowItem.label;"
+ accesskey="&syncSyncNowItem.accesskey;"
+ id="syncedTabsRefresh"/>
@@ -519,6 +618,7 @@
+ id="syncedTabsRefreshFilter"/>
+ </menupopup>
+ </popupset>
++ <box id="appMenu-viewCache" hidden="true"/>
+
+#ifdef CAN_DRAW_IN_TITLEBAR
+<vbox id="titlebar">
@@ -622,7 +722,6 @@
+ <menupopup id="alltabs-popup"
+ position="after_end">
+ <menuitem id="alltabs_undoCloseTab"
-+ class="menuitem-iconic"
+ key="key_undoCloseTab"
+ label="&undoCloseTab.label;"
+ observes="History:UndoCloseTab"/>
@@ -670,18 +769,43 @@
+ removable="false"
+ class="chromeclass-location" overflows="false">
+ <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++ removable="false" overflows="false"
+ label="&backCmd.label;"
+ command="Browser:BackOrBackDuplicate"
+ onclick="checkForMiddleClick(this, event);"
+ tooltip="back-button-tooltip"
+ context="backForwardMenu"/>
++#ifdef MOZ_PHOTON_THEME
++ <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++ removable="false" overflows="false"
++ label="&forwardCmd.label;"
++ command="Browser:ForwardOrForwardDuplicate"
++ onclick="checkForMiddleClick(this, event);"
++ tooltip="forward-button-tooltip"
++ context="backForwardMenu"/>
++ <toolbaritem id="stop-reload-button"
++ removable="false" overflows="false"
++ class="chromeclass-toolbar-additional">
++ <toolbarbutton id="reload-button"
++ class="toolbarbutton-1"
++ command="Browser:ReloadOrDuplicate"
++ onclick="checkForMiddleClick(this, event);"
++ tooltip="dynamic-shortcut-tooltip"/>
++ <toolbarbutton id="stop-button"
++ class="toolbarbutton-1"
++ command="Browser:Stop"
++ tooltip="dynamic-shortcut-tooltip"/>
++ </toolbaritem>
++#endif
+ <hbox id="urlbar-wrapper" flex="1">
++#ifndef MOZ_PHOTON_THEME
+ <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&forwardCmd.label;"
+ command="Browser:ForwardOrForwardDuplicate"
+ onclick="checkForMiddleClick(this, event);"
+ tooltip="forward-button-tooltip"
+ context="backForwardMenu"/>
++#endif
+ <textbox id="urlbar" flex="1"
+ placeholder="&urlbar.placeholder2;"
+ type="autocomplete"
@@ -725,6 +849,8 @@
+ tooltiptext="&urlbar.microphoneBlocked.tooltip;"/>
+ <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
+ tooltiptext="&urlbar.screenBlocked.tooltip;"/>
++ <image data-permission-id="persistent-storage" class="blocked-permission-icon persistent-storage-icon" role="button"
++ tooltiptext="&urlbar.persistentStorageBlocked.tooltip;"/>
+ </box>
+ <box id="notification-popup-box"
+ hidden="true"
@@ -741,8 +867,11 @@
+ tooltiptext="&urlbar.indexedDBNotificationAnchor.tooltip;"/>
+ <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
+ tooltiptext="&urlbar.passwordNotificationAnchor.tooltip;"/>
-+ <image id="plugins-notification-icon" class="notification-anchor-icon plugin-icon" role="button"
-+ tooltiptext="&urlbar.pluginsNotificationAnchor.tooltip;"/>
++ <stack id="plugins-notification-icon" class="notification-anchor-icon" role="button" align="center"
++ tooltiptext="&urlbar.pluginsNotificationAnchor.tooltip;">
++ <image class="plugin-icon" />
++ <image id="plugin-icon-badge" />
++ </stack>
+ <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button"
+ tooltiptext="&urlbar.webNotificationAnchor.tooltip;"/>
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button"
@@ -759,8 +888,13 @@
+ tooltiptext="&urlbar.translatedNotificationAnchor.tooltip;"/>
+ <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button"
+ tooltiptext="&urlbar.emeNotificationAnchor.tooltip;"/>
++ <image id="persistent-storage-notification-icon" class="notification-anchor-icon persistent-storage-icon" role="button"
++ tooltiptext="&urlbar.persistentStorageNotificationAnchor.tooltip;"/>
+ </box>
+ <image id="connection-icon"/>
++ <image id="extension-icon"/>
++ <image id="remote-control-icon"
++ tooltiptext="&urlbar.remoteControlNotificationAnchor.tooltip;"/>
+ <hbox id="identity-icon-labels">
+ <label id="identity-icon-label" class="plain" flex="1"/>
+ <label id="identity-icon-country-label" class="plain"/>
@@ -782,26 +916,33 @@
+ onclick="ReaderParent.buttonClick(event);"/>
+ <toolbarbutton id="urlbar-zoom-button"
+ onclick="FullZoom.reset();"
-+ tooltiptext="&urlbar.zoomReset.tooltip;"
++ tooltip="dynamic-shortcut-tooltip"
+ hidden="true"/>
+ </hbox>
+ <hbox id="userContext-icons" hidden="true">
+ <label id="userContext-label"/>
+ <image id="userContext-indicator"/>
+ </hbox>
++#ifndef MOZ_PHOTON_THEME
+ <toolbarbutton id="urlbar-go-button"
+ class="chromeclass-toolbar-additional"
+ onclick="gURLBar.handleCommand(event);"
+ tooltiptext="&goEndCap.tooltip;"/>
-+ <toolbarbutton id="urlbar-reload-button"
++ <toolbarbutton id="reload-button"
+ class="chromeclass-toolbar-additional"
+ command="Browser:ReloadOrDuplicate"
+ onclick="checkForMiddleClick(this, event);"
-+ tooltiptext="&reloadButton.tooltip;"/>
-+ <toolbarbutton id="urlbar-stop-button"
++ tooltip="dynamic-shortcut-tooltip"/>
++ <toolbarbutton id="stop-button"
+ class="chromeclass-toolbar-additional"
+ command="Browser:Stop"
-+ tooltiptext="&stopButton.tooltip;"/>
++ tooltip="dynamic-shortcut-tooltip"/>
++#else
++ <toolbarbutton id="urlbar-page-action-button"
++ class="chromeclass-toolbar-additional"
++ tooltiptext="&pageActionButton.tooltip;"
++ onclick="gPageActionButton.onEvent(event);"/>
++#endif
+ </textbox>
+ </hbox>
+ </toolbaritem>
@@ -1052,7 +1193,7 @@
+
+ <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&newNavigatorCmd.label;"
-+ command="key_newNavigator"
++ command="cmd_newNavigator"
+ tooltip="dynamic-shortcut-tooltip"
+ ondrop="newWindowButtonObserver.onDrop(event)"
+ ondragover="newWindowButtonObserver.onDragOver(event)"
@@ -1064,6 +1205,11 @@
+ type="checkbox"
+ label="&fullScreenCmd.label;"
+ tooltip="dynamic-shortcut-tooltip"/>
++#ifdef MOZ_PHOTON_THEME
++ <toolbarbutton id="library-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++ oncommand="PanelUI.showSubView('appMenu-libraryView', this, null, true);"
++ label="&places.library.title;"/>
++#endif
+ </toolbarpalette>
+ </toolbox>
+
@@ -1074,9 +1220,18 @@
+ <vbox id="browser-border-start" hidden="true" layer="true"/>
+ <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
+ <sidebarheader id="sidebar-header" align="center">
-+ <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
++ <toolbarbutton id="sidebar-switcher-target" flex="1" class="tabbable">
++ <image id="sidebar-icon" consumeanchor="sidebar-switcher-target"/>
++ <label id="sidebar-title" persist="value" crop="end" flex="1" control="sidebar"/>
++ <image id="sidebar-switcher-arrow"/>
++ </toolbarbutton>
+ <image id="sidebar-throbber"/>
-+ <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/>
++# To ensure the button label's intrinsic width doesn't expand the sidebar
++# if the label is long, the button needs flex=1.
++# To ensure the button doesn't expand unnecessarily for short labels, the
++# spacer should significantly out-flex the button.
++ <spacer flex="1000"/>
++ <toolbarbutton id="sidebar-close" class="tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/>
+ </sidebarheader>
+ <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" disablefullscreen="true"
+ style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/>
@@ -1134,6 +1289,7 @@
+
+ <svg:svg height="0">
+#include tab-shape.inc.svg
++#ifndef MOZ_PHOTON_THEME
+ <svg:clipPath id="urlbar-back-button-clip-path">
+#ifndef XP_MACOSX
+ <svg:path d="M -9,-4 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" />
@@ -1146,6 +1302,7 @@
+ <svg:path d="M -6,-2 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" />
+ </svg:clipPath>
+#endif
++#endif
+ </svg:svg>
+
+</vbox>
@@ -1240,8 +1397,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
-@@ -34,16 +34,22 @@ var gMainPane = {
- // In Windows 8 we launch the control panel since it's the only
+@@ -39,16 +39,23 @@ var gMainPane = {
// way to get all file type association prefs. So we don't know
// when the user will select the default. We refresh here periodically
// in case the default changes. On other Windows OS's defaults can also
@@ -1249,21 +1405,23 @@
window.setInterval(this.updateSetDefaultBrowser.bind(this), 1000);
}
}
+
+ var env = Components.classes["@mozilla.org/process/environment;1"]
-+ .getService(Components.interfaces.nsIEnvironment);
++ .getService(Components.interfaces.nsIEnvironment);
+ var kde_session = 0;
+ if (env.get('KDE_FULL_SESSION') == "true") {
-+ kde_session = 1;
++ kde_session = 1;
+ }
++
+ this.buildContentProcessCountMenuList();
+ this.updateDefaultPerformanceSettingsPref();
- // set up the "use current page" label-changing listener
- this._updateUseCurrentButton();
- window.addEventListener("focus", this._updateUseCurrentButton.bind(this));
-
- this.updateBrowserStartupLastSession();
-
- if (AppConstants.platform == "win") {
-@@ -682,16 +688,27 @@ var gMainPane = {
+ let defaultPerformancePref =
+ document.getElementById("browser.preferences.defaultPerformanceSettings.enabled");
+ defaultPerformancePref.addEventListener("change", () => {
+ this.updatePerformanceSettingsBox();
+ });
+@@ -779,16 +786,27 @@ var gMainPane = {
let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
alwaysCheckPref.value = true;
@@ -1294,7 +1452,7 @@
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
-@@ -38,16 +38,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+@@ -37,16 +37,18 @@ if CONFIG['OS_ARCH'] == 'WINNT':
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
SOURCES += [
@@ -1606,17 +1764,17 @@
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
-@@ -645,16 +645,17 @@
- @RESPATH@/defaults/autoconfig/prefcalls.js
- @RESPATH@/browser/defaults/permissions
+@@ -662,16 +662,18 @@
@RESPATH@/browser/defaults/blocklists
+ @RESPATH@/browser/defaults/pinning
; 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
+
+@BINPATH@/defaults/pref/kde.js
-
++
; Remote control protocol prefs
; defined in ../../testing/marionette/prefs/marionette.js
@RESPATH@/defaults/pref/marionette.js
@@ -1624,3 +1782,4 @@
; Services (gre) prefs
@RESPATH@/defaults/pref/services-sync.js
+ ; [Layout Engine Resources]
--- a/mozilla-kde.patch Sat Aug 05 15:05:11 2017 +0200
+++ b/mozilla-kde.patch Sat Aug 05 20:31:55 2017 +0200
@@ -1,5 +1,5 @@
# HG changeset patch
-# Parent a15b45ae85ab486503a1a09252734b80fe782998
+# Parent 172cd661ceed38b3161c6246f6729f4d8370dce3
Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com>
@@ -9,7 +9,7 @@
diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
-@@ -31,16 +31,17 @@
+@@ -32,16 +32,17 @@
#include "nsIZipReader.h"
#include "nsPrefBranch.h"
#include "nsXPIDLString.h"
@@ -27,7 +27,7 @@
#include "prefread.h"
#include "prefapi_private_data.h"
-@@ -1199,16 +1200,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
+@@ -1219,16 +1220,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
static nsresult pref_LoadPrefsInDirList(const char *listId)
{
@@ -62,7 +62,7 @@
return NS_OK;
bool hasMore;
-@@ -1224,17 +1243,17 @@ static nsresult pref_LoadPrefsInDirList(
+@@ -1244,17 +1263,17 @@ static nsresult pref_LoadPrefsInDirList(
nsAutoCString leaf;
path->GetNativeLeafName(leaf);
@@ -81,7 +81,7 @@
{
nsZipItemPtr<char> manifest(jarReader, name, true);
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
-@@ -1328,24 +1347,36 @@ static nsresult pref_InitInitialObjects(
+@@ -1348,24 +1367,36 @@ static nsresult pref_InitInitialObjects(
/* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
static const char* specialFiles[] = {
#if defined(XP_MACOSX)
@@ -121,17 +121,17 @@
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
-@@ -31,16 +31,20 @@ UNIFIED_SOURCES += [
+@@ -33,16 +33,20 @@ EXPORTS.mozilla += [
+ UNIFIED_SOURCES += [
+ 'nsPrefBranch.cpp',
+ 'nsPrefsFactory.cpp',
+ 'prefapi.cpp',
+ 'Preferences.cpp',
'prefread.cpp',
]
- # prefapi.cpp cannot be built in unified mode because it uses plarena.h
- SOURCES += [
- 'prefapi.cpp',
- ]
-
+LOCAL_INCLUDES += [
-+ '/toolkit/xre'
++ '/toolkit/xre'
+]
+
include('/ipc/chromium/chromium-config.mozbuild')
@@ -140,12 +140,12 @@
DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
-
- FINAL_TARGET_PP_FILES += [
+ 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
-@@ -211,16 +211,17 @@ class Flags(OrderedDict):
+@@ -220,16 +220,17 @@ class Flags(OrderedDict):
'contentaccessible': Flag,
'os': StringFlag,
'osversion': VersionFlag,
@@ -187,9 +187,9 @@
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
-@@ -49,16 +49,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
- 'nsDownloadScanner.cpp',
- ]
+@@ -37,16 +37,17 @@ UNIFIED_SOURCES += [
+ 'nsDownloadManager.cpp'
+ ]
FINAL_LIBRARY = 'xul'
@@ -205,78 +205,10 @@
CXXFLAGS += CONFIG['TK_CFLAGS']
-diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
---- a/toolkit/components/downloads/nsDownloadManager.cpp
-+++ b/toolkit/components/downloads/nsDownloadManager.cpp
-@@ -52,16 +52,20 @@
- #ifdef XP_WIN
- #include <shlobj.h>
- #include "nsWindowsHelpers.h"
- #ifdef DOWNLOAD_SCANNER
- #include "nsDownloadScanner.h"
- #endif
- #endif
-
-+#if defined(XP_UNIX) && !defined(XP_MACOSX)
-+#include "nsKDEUtils.h"
-+#endif
-+
- #ifdef XP_MACOSX
- #include <CoreFoundation/CoreFoundation.h>
- #endif
-
- #ifdef MOZ_WIDGET_ANDROID
- #include "FennecJNIWrappers.h"
- #endif
-
-@@ -2724,16 +2728,25 @@ nsDownload::SetState(DownloadState aStat
- nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
-
- // Master pref to control this function.
- bool showTaskbarAlert = true;
- if (pref)
- pref->GetBoolPref(PREF_BDM_SHOWALERTONCOMPLETE, &showTaskbarAlert);
-
- if (showTaskbarAlert) {
-+ if( nsKDEUtils::kdeSupport()) {
-+ nsTArray<nsCString> command;
-+ command.AppendElement( NS_LITERAL_CSTRING( "DOWNLOADFINISHED" ));
-+ nsAutoString displayName;
-+ GetDisplayName( displayName );
-+ command.AppendElement( nsAutoCString( ToNewUTF8String( displayName )));
-+ nsKDEUtils::command( command );
-+ } else {
-+ // begin non-KDE block
- int32_t alertInterval = 2000;
- if (pref)
- pref->GetIntPref(PREF_BDM_SHOWALERTINTERVAL, &alertInterval);
-
- int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
- int64_t goat = PR_Now() - mStartTime;
- showTaskbarAlert = goat > alertIntervalUSec;
-
-@@ -2765,16 +2778,17 @@ nsDownload::SetState(DownloadState aStat
- message, !removeWhenDone,
- mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
- mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"),
- EmptyString(), EmptyString(), nullptr, mPrivate,
- false /* requireInteraction */);
- }
- }
- }
-+ }
-
- #if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
- nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
- nsCOMPtr<nsIFile> file;
- nsAutoString path;
-
- if (fileURL &&
- NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
-@@ -73,29 +73,33 @@ toolkit.jar:
+@@ -75,29 +75,33 @@ toolkit.jar:
content/global/bindings/colorpicker.xml (widgets/colorpicker.xml)
content/global/bindings/datekeeper.js (widgets/datekeeper.js)
content/global/bindings/datepicker.js (widgets/datepicker.js)
@@ -774,7 +706,7 @@
new file mode 100644
--- /dev/null
+++ b/toolkit/content/widgets/preferences-kde.xml
-@@ -0,0 +1,1391 @@
+@@ -0,0 +1,1380 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE bindings [
@@ -904,7 +836,7 @@
+ return;
+
+ this.preferences.rootBranchInternal
-+ .addObserver(this.name, this.preferences, false);
++ .addObserver(this.name, this.preferences);
+ // In non-instant apply mode, we must try and use the last saved state
+ // from any previous opens of a child dialog instead of the value from
+ // preferences, to pick up any edits a user may have made.
@@ -958,7 +890,7 @@
+ .removeObserver(this.name, this.preferences);
+ this.setAttribute("name", val);
+ this.preferences.rootBranchInternal
-+ .addObserver(val, this.preferences, false);
++ .addObserver(val, this.preferences);
+
+ return val;
+ </setter>
@@ -1114,13 +1046,9 @@
+ .data;
+ case "string":
+ case "unichar":
-+ return this._branch
-+ .getComplexValue(this.name, Components.interfaces.nsISupportsString)
-+ .data;
++ return this._branch.getStringPref(this.name);
+ case "fontname":
-+ var family = this._branch
-+ .getComplexValue(this.name, Components.interfaces.nsISupportsString)
-+ .data;
++ var family = this._branch.getStringPref(this.name);
+ var fontEnumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
+ .createInstance(Components.interfaces.nsIFontEnumerator);
+ return fontEnumerator.getStandardFamilyName(family);
@@ -1165,11 +1093,7 @@
+ case "string":
+ case "unichar":
+ case "fontname":
-+ var iss = Components.classes["@mozilla.org/supports-string;1"]
-+ .createInstance(Components.interfaces.nsISupportsString);
-+ iss.data = val;
-+ this.preferences.rootBranch
-+ .setComplexValue(this.name, Components.interfaces.nsISupportsString, iss);
++ this.preferences.rootBranch.setStringPref(this.name, val);
+ break;
+ case "file":
+ var lf;
@@ -1657,11 +1581,8 @@
+ <![CDATA[
+ var psvc = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
-+ var animate = /Mac/.test(navigator.platform);
-+ try {
-+ animate = psvc.getBoolPref("browser.preferences.animateFadeIn");
-+ } catch (e) { }
-+ return animate;
++ return psvc.getBoolPref("browser.preferences.animateFadeIn",
++ /Mac/.test(navigator.platform));
+ ]]>
+ </getter>
+ </property>
@@ -2169,7 +2090,7 @@
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
-@@ -629,17 +629,17 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -625,17 +625,17 @@ nsUnknownContentTypeDialog.prototype = {
else
typeString = mimeInfo.MIMEType;
}
@@ -2188,7 +2109,7 @@
},
// Returns true if opening the default application makes sense.
-@@ -803,17 +803,17 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -799,17 +799,17 @@ nsUnknownContentTypeDialog.prototype = {
switch (this.dialogElement("openHandler").selectedIndex) {
case 0:
// No app need be specified in this case.
@@ -2207,7 +2128,7 @@
this.mDialog.document.documentElement.getButton("accept").disabled = !ok;
},
-@@ -1070,30 +1070,56 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -1066,30 +1066,56 @@ nsUnknownContentTypeDialog.prototype = {
params.handlerApp.executable &&
params.handlerApp.executable.isFile()) {
// Remember the file they chose to run.
@@ -2374,7 +2295,7 @@
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
-@@ -53,17 +53,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
+@@ -61,17 +61,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
'../components/printingui/mac',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
@@ -2819,7 +2740,7 @@
'android/nsExternalSharingAppService.cpp',
'android/nsExternalURLHandlerService.cpp',
'android/nsMIMEInfoAndroid.cpp',
-@@ -123,16 +125,17 @@ include('/ipc/chromium/chromium-config.m
+@@ -125,16 +127,17 @@ include('/ipc/chromium/chromium-config.m
FINAL_LIBRARY = 'xul'
@@ -3178,7 +3099,7 @@
#include "nsXPIDLString.h"
#include "nsIURL.h"
#include "nsIFileStreams.h"
-@@ -1147,26 +1147,26 @@ nsresult nsOSHelperAppService::OSProtoco
+@@ -1143,26 +1143,26 @@ nsresult nsOSHelperAppService::OSProtoco
ContentAction::Action::defaultActionForScheme(QString(aProtocolScheme) + ':');
if (action.isValid())
@@ -3207,7 +3128,7 @@
nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
{
-@@ -1253,17 +1253,17 @@ nsOSHelperAppService::GetFromExtension(c
+@@ -1249,17 +1249,17 @@ nsOSHelperAppService::GetFromExtension(c
mime_types_description,
true);
@@ -3226,7 +3147,7 @@
rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
majorType,
-@@ -1374,17 +1374,17 @@ nsOSHelperAppService::GetFromType(const
+@@ -1370,17 +1370,17 @@ nsOSHelperAppService::GetFromType(const
nsAutoString extensions, mime_types_description;
LookUpExtensionsAndDescription(majorType,
minorType,
@@ -3248,7 +3169,7 @@
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
--- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build
-@@ -101,16 +101,17 @@ else:
+@@ -109,16 +109,17 @@ else:
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
@@ -3259,13 +3180,13 @@
'/other-licenses/atk-1.0',
+ '/toolkit/xre',
'/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
@@ -3726,7 +3647,7 @@
NS_ConvertASCIItoUTF16 wtoken(token);
if (CheckStringFlag(kApplication, wtoken, appID, stApp) ||
- CheckStringFlag(kOs, wtoken, osTarget, stOs) ||
+ CheckOsFlag(kOs, wtoken, osTarget, stOs) ||
CheckStringFlag(kABI, wtoken, abi, stABI) ||
+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) ||
CheckStringFlag(kProcess, wtoken, process, stProcess) ||
@@ -3737,7 +3658,7 @@
}
#if defined(MOZ_WIDGET_ANDROID)
-@@ -734,16 +743,17 @@ ParseManifest(NSLocationType aType, File
+@@ -729,16 +738,17 @@ ParseManifest(NSLocationType aType, File
}
if (!ok ||
@@ -3758,7 +3679,7 @@
diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build
--- a/xpcom/components/moz.build
+++ b/xpcom/components/moz.build
-@@ -50,12 +50,13 @@ FINAL_LIBRARY = 'xul'
+@@ -44,12 +44,13 @@ FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'!..',
'../base',
@@ -3793,7 +3714,7 @@
#include "prmem.h"
#include "plbase64.h"
-@@ -1948,59 +1949,74 @@ nsLocalFile::SetPersistentDescriptor(con
+@@ -1941,59 +1942,74 @@ nsLocalFile::SetPersistentDescriptor(con
return InitWithNativePath(aPersistentDescriptor);
#endif
}