Updated to 51.0

This commit is contained in:
Алзим 2017-01-25 15:25:15 +03:00
parent d4f7e13c37
commit 8f01c869b5
4 changed files with 262 additions and 355 deletions

View file

@ -1,2 +1,2 @@
sources: sources:
firefox-50.1.0.source.tar.xz: 6024dc49a566ed6296ad6cd707a199d41f090176 firefox-51.0.source.tar.xz: e7219a81b16d34d92872b4604051ce5ddb818126

View file

@ -1,11 +1,11 @@
# HG changeset patch # HG changeset patch
# Parent 2cb2f829aabd7e3efaa973a0a8cf99aca9605bdc # Parent 2cae514c05c8836ca5b69884d3a07998a5d53e8b
diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/browser/base/content/browser-kde.xul +++ b/browser/base/content/browser-kde.xul
@@ -0,0 +1,1200 @@ @@ -0,0 +1,1119 @@
+#filter substitution +#filter substitution
+<?xml version="1.0"?> +<?xml version="1.0"?>
+# -*- Mode: HTML -*- +# -*- Mode: HTML -*-
@ -160,14 +160,7 @@ new file mode 100644
+ noautofocus="true" + noautofocus="true"
+ hidden="true" + hidden="true"
+ flip="none" + flip="none"
+ level="parent"> + level="parent"/>
+#ifdef NIGHTLY_BUILD
+ <hbox id="urlbar-search-footer" flex="1" align="stretch" pack="end">
+ <button id="urlbar-search-settings" label="&changeSearchSettings.button;"
+ oncommand="BrowserUITelemetry.countSearchSettingsEvent('urlbar'); openPreferences('paneSearch')"/>
+ </hbox>
+#endif
+ </panel>
+ +
+ <!-- for select dropdowns. The menupopup is what shows the list of options, + <!-- for select dropdowns. The menupopup is what shows the list of options,
+ and the popuponly menulist makes things like the menuactive attributes + and the popuponly menulist makes things like the menuactive attributes
@ -175,7 +168,7 @@ new file mode 100644
+ popuponly menulist to be its immediate parent. --> + popuponly menulist to be its immediate parent. -->
+ <menulist popuponly="true" id="ContentSelectDropdown" hidden="true"> + <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
+ <menupopup rolluponmousewheel="true" + <menupopup rolluponmousewheel="true"
+ activateontab="true" + activateontab="true" position="after_start"
+#ifdef XP_WIN +#ifdef XP_WIN
+ consumeoutsideclicks="false" ignorekeys="handled" + consumeoutsideclicks="false" ignorekeys="handled"
+#endif +#endif
@ -192,6 +185,7 @@ new file mode 100644
+ orient="vertical" + orient="vertical"
+ ignorekeys="true" + ignorekeys="true"
+ hidden="true" + hidden="true"
+ tabspecific="true"
+ onpopupshown="StarUI.panelShown(event);" + onpopupshown="StarUI.panelShown(event);"
+ aria-labelledby="editBookmarkPanelTitle"> + aria-labelledby="editBookmarkPanelTitle">
+ <row id="editBookmarkPanelHeader" align="center" hidden="true"> + <row id="editBookmarkPanelHeader" align="center" hidden="true">
@ -286,23 +280,6 @@ new file mode 100644
+ <hbox id="share-container" flex="1"/> + <hbox id="share-container" flex="1"/>
+ </panel> + </panel>
+ +
+ <panel id="social-notification-panel"
+ class="social-panel"
+ type="arrow"
+ hidden="true"
+ noautofocus="true"/>
+ <panel id="social-flyout-panel"
+ class="social-panel"
+ onpopupshown="SocialFlyout.onShown()"
+ onpopuphidden="SocialFlyout.onHidden()"
+ side="right"
+ type="arrow"
+ hidden="true"
+ flip="slide"
+ rolluponmousewheel="true"
+ noautofocus="true"
+ position="topcenter topright"/>
+
+ <menupopup id="toolbar-context-menu" + <menupopup id="toolbar-context-menu"
+ onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));"> + onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
+ <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)" + <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
@ -718,66 +695,54 @@ new file mode 100644
+ <image id="identity-icon" + <image id="identity-icon"
+ consumeanchor="identity-box" + consumeanchor="identity-box"
+ onclick="PageProxyClickHandler(event);"/> + onclick="PageProxyClickHandler(event);"/>
+ <box id="blocked-permissions-container" align="center" tooltiptext=""> + <image id="sharing-icon" mousethrough="always"/>
+ <image data-permission-id="geo" class="notification-anchor-icon geo-icon blocked" role="button" + <box id="blocked-permissions-container" align="center">
+ aria-label="&urlbar.geolocationNotificationAnchor.label;"/> + <image data-permission-id="geo" class="blocked-permission-icon geo-icon" role="button"
+ <image data-permission-id="desktop-notification" class="notification-anchor-icon desktop-notification-icon blocked" role="button" + tooltiptext="&urlbar.geolocationBlocked.tooltip;"/>
+ aria-label="&urlbar.webNotsNotificationAnchor3.label;"/> + <image data-permission-id="desktop-notification" class="blocked-permission-icon desktop-notification-icon" role="button"
+ <image data-permission-id="camera" class="notification-anchor-icon camera-icon blocked" role="button" + tooltiptext="&urlbar.webNotificationsBlocked.tooltip;"/>
+ aria-label="&urlbar.webRTCShareDevicesNotificationAnchor.label;"/> + <image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button"
+ <image data-permission-id="indexedDB" class="notification-anchor-icon indexedDB-icon blocked" role="button" + tooltiptext="&urlbar.cameraBlocked.tooltip;"/>
+ aria-label="&urlbar.indexedDBNotificationAnchor.label;"/> + <image data-permission-id="indexedDB" class="blocked-permission-icon indexedDB-icon" role="button"
+ <image data-permission-id="microphone" class="notification-anchor-icon microphone-icon blocked" role="button" + tooltiptext="&urlbar.indexedDBBlocked.tooltip;"/>
+ aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/> + <image data-permission-id="microphone" class="blocked-permission-icon microphone-icon" role="button"
+ <image data-permission-id="screen" class="notification-anchor-icon screen-icon blocked" role="button" + tooltiptext="&urlbar.microphoneBlocked.tooltip;"/>
+ aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/> + <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
+ <image data-permission-id="pointerLock" class="notification-anchor-icon pointerLock-icon blocked" role="button" + tooltiptext="&urlbar.screenBlocked.tooltip;"/>
+ aria-label="&urlbar.pointerLockNotificationAnchor.label;"/>
+ </box> + </box>
+ <box id="notification-popup-box" + <box id="notification-popup-box"
+ hidden="true" + hidden="true"
+ tooltiptext=""
+ onmouseover="document.getElementById('identity-icon').classList.add('no-hover');" + onmouseover="document.getElementById('identity-icon').classList.add('no-hover');"
+ onmouseout="document.getElementById('identity-icon').classList.remove('no-hover');" + onmouseout="document.getElementById('identity-icon').classList.remove('no-hover');"
+ align="center"> + align="center">
+ <image id="default-notification-icon" class="notification-anchor-icon" role="button" + <image id="default-notification-icon" class="notification-anchor-icon" role="button"
+ aria-label="&urlbar.defaultNotificationAnchor.label;"/> + tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>
+ <image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button" + <image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button"
+ aria-label="&urlbar.geolocationNotificationAnchor.label;"/> + tooltiptext="&urlbar.geolocationNotificationAnchor.tooltip;"/>
+ <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button" + <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button"
+ aria-label="&urlbar.addonsNotificationAnchor.label;"/> + tooltiptext="&urlbar.addonsNotificationAnchor.tooltip;"/>
+ <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button" + <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button"
+ aria-label="&urlbar.indexedDBNotificationAnchor.label;"/> + tooltiptext="&urlbar.indexedDBNotificationAnchor.tooltip;"/>
+ <image id="login-fill-notification-icon" class="notification-anchor-icon login-icon" role="button"
+ aria-label="&urlbar.loginFillNotificationAnchor.label;"/>
+ <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button" + <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
+ aria-label="&urlbar.passwordNotificationAnchor.label;"/> + tooltiptext="&urlbar.passwordNotificationAnchor.tooltip;"/>
+ <image id="plugins-notification-icon" class="notification-anchor-icon plugin-icon" role="button" + <image id="plugins-notification-icon" class="notification-anchor-icon plugin-icon" role="button"
+ aria-label="&urlbar.pluginsNotificationAnchor.label;"/> + tooltiptext="&urlbar.pluginsNotificationAnchor.tooltip;"/>
+ <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button" + <image id="web-notifications-notification-icon" class="notification-anchor-icon desktop-notification-icon" role="button"
+ aria-label="&urlbar.webNotsNotificationAnchor3.label;"/> + tooltiptext="&urlbar.webNotificationAnchor.tooltip;"/>
+ <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button" + <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon camera-icon" role="button"
+ aria-label="&urlbar.webRTCShareDevicesNotificationAnchor.label;"/> + tooltiptext="&urlbar.webRTCShareDevicesNotificationAnchor.tooltip;"/>
+ <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon camera-icon in-use" role="button"
+ aria-label="&urlbar.webRTCSharingDevicesNotificationAnchor.label;"/>
+ <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon microphone-icon" role="button" + <image id="webRTC-shareMicrophone-notification-icon" class="notification-anchor-icon microphone-icon" role="button"
+ aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/> + tooltiptext="&urlbar.webRTCShareMicrophoneNotificationAnchor.tooltip;"/>
+ <image id="webRTC-sharingMicrophone-notification-icon" class="notification-anchor-icon microphone-icon in-use" role="button"
+ aria-label="&urlbar.webRTCSharingMicrophoneNotificationAnchor.label;"/>
+ <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button" + <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button"
+ aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/> + tooltiptext="&urlbar.webRTCShareScreenNotificationAnchor.tooltip;"/>
+ <image id="webRTC-sharingScreen-notification-icon" class="notification-anchor-icon screen-icon in-use" role="button"
+ aria-label="&urlbar.webRTCSharingScreenNotificationAnchor.label;"/>
+ <image id="pointerLock-notification-icon" class="notification-anchor-icon pointerLock-icon" role="button"
+ aria-label="&urlbar.pointerLockNotificationAnchor.label;"/>
+ <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button" + <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button"
+ aria-label="&urlbar.servicesNotificationAnchor.label;"/> + tooltiptext="&urlbar.servicesNotificationAnchor.tooltip;"/>
+ <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button" + <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button"
+ aria-label="&urlbar.translateNotificationAnchor.label;"/> + tooltiptext="&urlbar.translateNotificationAnchor.tooltip;"/>
+ <image id="translated-notification-icon" class="notification-anchor-icon translation-icon in-use" role="button" + <image id="translated-notification-icon" class="notification-anchor-icon translation-icon in-use" role="button"
+ aria-label="&urlbar.translatedNotificationAnchor.label;"/> + tooltiptext="&urlbar.translatedNotificationAnchor.tooltip;"/>
+ <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button" + <image id="eme-notification-icon" class="notification-anchor-icon drm-icon" role="button"
+ aria-label="&urlbar.emeNotificationAnchor.label;"/> + tooltiptext="&urlbar.emeNotificationAnchor.tooltip;"/>
+ </box> + </box>
+ <image id="tracking-protection-icon"/> + <image id="tracking-protection-icon"/>
+ <image id="connection-icon"/> + <image id="connection-icon"/>
@ -799,6 +764,10 @@ new file mode 100644
+ class="urlbar-icon" + class="urlbar-icon"
+ hidden="true" + hidden="true"
+ onclick="ReaderParent.buttonClick(event);"/> + onclick="ReaderParent.buttonClick(event);"/>
+ <toolbarbutton id="urlbar-zoom-button"
+ onclick="FullZoom.reset();"
+ tooltiptext="&urlbar.zoomReset.tooltip;"
+ hidden="true"/>
+ </hbox> + </hbox>
+ <hbox id="userContext-icons" hidden="true"> + <hbox id="userContext-icons" hidden="true">
+ <label id="userContext-label"/> + <label id="userContext-label"/>
@ -1080,7 +1049,7 @@ new file mode 100644
+ <image id="sidebar-throbber"/> + <image id="sidebar-throbber"/>
+ <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/> + <toolbarbutton class="close-icon tabbable" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="SidebarUI.hide();"/>
+ </sidebarheader> + </sidebarheader>
+ <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" + <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true" disablefullscreen="true"
+ style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/> + style="min-width: 14em; width: 18em; max-width: 36em;" tooltip="aHTMLTooltip"/>
+ </vbox> + </vbox>
+ +
@ -1093,56 +1062,6 @@ new file mode 100644
+ contentcontextmenu="contentAreaContextMenu" + contentcontextmenu="contentAreaContextMenu"
+ autocompletepopup="PopupAutoComplete" + autocompletepopup="PopupAutoComplete"
+ selectmenulist="ContentSelectDropdown"/> + selectmenulist="ContentSelectDropdown"/>
+ <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
+ </vbox>
+ <splitter id="social-sidebar-splitter"
+ class="chromeclass-extrachrome sidebar-splitter"
+ observes="socialSidebarBroadcaster"/>
+ <vbox id="social-sidebar-box"
+ class="chromeclass-extrachrome"
+ observes="socialSidebarBroadcaster"
+ persist="width">
+
+ <sidebarheader id="social-sidebar-header" class="sidebar-header" align="center">
+ <image id="social-sidebar-favico"/>
+ <label id="social-sidebar-title" class="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
+ <toolbarbutton id="social-sidebar-button"
+ class="toolbarbutton-1"
+ type="menu">
+ <menupopup id="social-statusarea-popup" position="after_end">
+ <menuitem class="social-toggle-sidebar-menuitem"
+ type="checkbox"
+ autocheck="false"
+ command="Social:ToggleSidebar"
+ label="&social.toggleSidebar.label;"
+ accesskey="&social.toggleSidebar.accesskey;"/>
+ <menuitem class="social-toggle-notifications-menuitem"
+ type="checkbox"
+ autocheck="false"
+ command="Social:ToggleNotifications"
+ label="&social.toggleNotifications.label;"
+ accesskey="&social.toggleNotifications.accesskey;"/>
+ <menuseparator/>
+ <menuseparator class="social-provider-menu" hidden="true"/>
+ <menuitem class="social-addons-menuitem" command="Social:Addons"
+ label="&social.addons.label;"/>
+ <menuitem label="&social.learnMore.label;"
+ accesskey="&social.learnMore.accesskey;"
+ oncommand="SocialUI.showLearnMore();"/>
+ </menupopup>
+ </toolbarbutton>
+ </sidebarheader>
+
+ <browser id="social-sidebar-browser"
+ type="content"
+ context="contentAreaContextMenu"
+ message="true"
+ messagemanagergroup="social"
+ disableglobalhistory="true"
+ tooltip="aHTMLTooltip"
+ popupnotificationanchor="social-sidebar-favico"
+ flex="1"
+ style="min-width: 14em; width: 18em; max-width: 36em;"/>
+ </vbox> + </vbox>
+ <vbox id="browser-border-end" hidden="true" layer="true"/> + <vbox id="browser-border-end" hidden="true" layer="true"/>
+ </hbox> + </hbox>
@ -1291,57 +1210,57 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js 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 --- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js +++ b/browser/components/preferences/in-content/main.js
@@ -23,16 +23,22 @@ var gMainPane = { @@ -33,16 +33,22 @@ var gMainPane = {
init: function () if (AppConstants.platform == "win") {
{ // In Windows 8 we launch the control panel since it's the only
function setEventListener(aId, aEventType, aCallback) // way to get all file type association prefs. So we don't know
{ // when the user will select the default. We refresh here periodically
document.getElementById(aId) // in case the default changes. On other Windows OS's defaults can also
.addEventListener(aEventType, aCallback.bind(gMainPane)); // be set while the prefs are open.
} window.setInterval(this.updateSetDefaultBrowser.bind(this), 1000);
}
+
+ var env = Components.classes["@mozilla.org/process/environment;1"] + var env = Components.classes["@mozilla.org/process/environment;1"]
+ .getService(Components.interfaces.nsIEnvironment); + .getService(Components.interfaces.nsIEnvironment);
+ var kde_session = 0; + var kde_session = 0;
+ if (env.get('KDE_FULL_SESSION') == "true") + if (env.get('KDE_FULL_SESSION') == "true")
+ kde_session = 1; + kde_session = 1;
+
#ifdef HAVE_SHELL_SERVICE
this.updateSetDefaultBrowser();
#ifdef XP_WIN
// In Windows 8 we launch the control panel since it's the only
// 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
// be set while the prefs are open.
@@ -703,16 +709,27 @@ var gMainPane = {
let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
alwaysCheckPref.value = true;
let shellSvc = getShellService();
if (!shellSvc)
return;
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) {
Cu.reportError(ex);
return;
} }
let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0; // set up the "use current page" label-changing listener
document.getElementById("setDefaultPane").selectedIndex = selectedIndex; this._updateUseCurrentButton();
} window.addEventListener("focus", this._updateUseCurrentButton.bind(this), false);
this.updateBrowserStartupLastSession();
@@ -704,16 +710,27 @@ var gMainPane = {
let alwaysCheckPref = document.getElementById("browser.shell.checkDefaultBrowser");
alwaysCheckPref.value = true;
let shellSvc = getShellService();
if (!shellSvc)
return;
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) {
Cu.reportError(ex);
return;
}
let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0;
document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
}
diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build
--- a/browser/components/shell/moz.build --- a/browser/components/shell/moz.build
+++ b/browser/components/shell/moz.build +++ b/browser/components/shell/moz.build
@ -1657,7 +1576,7 @@ new file mode 100644
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in --- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in
@@ -674,16 +674,17 @@ @@ -675,16 +675,17 @@
@RESPATH@/greprefs.js @RESPATH@/greprefs.js
@RESPATH@/defaults/autoconfig/prefcalls.js @RESPATH@/defaults/autoconfig/prefcalls.js
@RESPATH@/browser/defaults/permissions @RESPATH@/browser/defaults/permissions
@ -1675,3 +1594,4 @@ diff --git a/browser/installer/package-manifest.in b/browser/installer/package-m
; Style Sheets, Graphics and other Resources used by the layout engine. ; Style Sheets, Graphics and other Resources used by the layout engine.
@RESPATH@/res/EditorOverride.css @RESPATH@/res/EditorOverride.css
@RESPATH@/res/contenteditable.css @RESPATH@/res/contenteditable.css

View file

@ -7,7 +7,7 @@
# This also means only STABLE upstream releases, NO betas. # This also means only STABLE upstream releases, NO betas.
# This is a discussed topic. Please, do not flame it again. # This is a discussed topic. Please, do not flame it again.
%define major 50.1.0 %define major 51.0
%define ff_epoch 0 %define ff_epoch 0
# (tpg) set version HERE !!! # (tpg) set version HERE !!!
%define realver %{major} %define realver %{major}
@ -44,7 +44,6 @@ Source0: https://archive.mozilla.org/pub/firefox/releases/%{realver}/source/%{na
%endif %endif
Source4: %{name}.desktop Source4: %{name}.desktop
Source9: kde.js Source9: kde.js
Patch1: firefox-50.1.0-fix-configure-script.patch
# Patches for kde integration of FF # Patches for kde integration of FF
# http://www.rosenauer.org/hg/mozilla/summary # http://www.rosenauer.org/hg/mozilla/summary
Patch11: firefox-kde.patch Patch11: firefox-kde.patch
@ -187,8 +186,6 @@ Files and macros mainly for building Firefox extensions.
%prep %prep
%setup -q %setup -q
%patch1 -p1
## KDE INTEGRATION ## KDE INTEGRATION
%patch11 -p1 -b .kdepatch %patch11 -p1 -b .kdepatch
%patch12 -p1 -b .kdemoz %patch12 -p1 -b .kdemoz
@ -214,7 +211,7 @@ autoconf-2.13
# needed to regenerate certdata.c # needed to regenerate certdata.c
pushd security/nss/lib/ckfw/builtins pushd security/nss/lib/ckfw/builtins
perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt perl ./certdata.perl /etc/pki/tls/mozilla/certdata.txt
popd popd
%build %build

View file

@ -1,5 +1,5 @@
# HG changeset patch # HG changeset patch
# Parent 6ff55468281e12a84adefb46b17acb60d9cea608 # Parent f3e80d26a430dfa1c58421fb66144a3c23ffc166
Description: Add KDE integration to Firefox (toolkit parts) Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com> Author: Lubos Lunak <lunak@suse.com>
@ -27,7 +27,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
#include "prefread.h" #include "prefread.h"
#include "prefapi_private_data.h" #include "prefapi_private_data.h"
@@ -1180,16 +1181,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char @@ -1174,16 +1175,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
static nsresult pref_LoadPrefsInDirList(const char *listId) static nsresult pref_LoadPrefsInDirList(const char *listId)
{ {
@ -62,7 +62,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
return NS_OK; return NS_OK;
bool hasMore; bool hasMore;
@@ -1205,17 +1224,17 @@ static nsresult pref_LoadPrefsInDirList( @@ -1199,17 +1218,17 @@ static nsresult pref_LoadPrefsInDirList(
nsAutoCString leaf; nsAutoCString leaf;
path->GetNativeLeafName(leaf); path->GetNativeLeafName(leaf);
@ -81,7 +81,7 @@ diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
{ {
nsZipItemPtr<char> manifest(jarReader, name, true); nsZipItemPtr<char> manifest(jarReader, name, true);
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
@@ -1309,24 +1328,36 @@ static nsresult pref_InitInitialObjects( @@ -1303,24 +1322,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 */ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
static const char* specialFiles[] = { static const char* specialFiles[] = {
#if defined(XP_MACOSX) #if defined(XP_MACOSX)
@ -187,8 +187,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpac
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
--- a/toolkit/components/downloads/moz.build --- a/toolkit/components/downloads/moz.build
+++ b/toolkit/components/downloads/moz.build +++ b/toolkit/components/downloads/moz.build
@@ -60,17 +60,18 @@ if not CONFIG['MOZ_SUITE']: @@ -57,16 +57,17 @@ if not CONFIG['MOZ_SUITE']:
'nsDownloadManagerUI.js',
'nsDownloadManagerUI.manifest', 'nsDownloadManagerUI.manifest',
] ]
@ -196,9 +195,9 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'../protobuf', '../protobuf',
- '/ipc/chromium/src' '/ipc/chromium/src',
+ '/ipc/chromium/src', + '/toolkit/xre',
+ '/toolkit/xre' 'chromium'
] ]
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
@ -206,11 +205,10 @@ diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloa
CXXFLAGS += CONFIG['TK_CFLAGS'] CXXFLAGS += CONFIG['TK_CFLAGS']
if CONFIG['GNU_CXX']:
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
--- a/toolkit/components/downloads/nsDownloadManager.cpp --- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -51,16 +51,20 @@ @@ -52,16 +52,20 @@
#ifdef XP_WIN #ifdef XP_WIN
#include <shlobj.h> #include <shlobj.h>
#include "nsWindowsHelpers.h" #include "nsWindowsHelpers.h"
@ -228,10 +226,10 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#endif #endif
#ifdef MOZ_WIDGET_ANDROID #ifdef MOZ_WIDGET_ANDROID
#include "GeneratedJNIWrappers.h" #include "FennecJNIWrappers.h"
#endif #endif
@@ -2719,16 +2723,25 @@ nsDownload::SetState(DownloadState aStat @@ -2723,16 +2727,25 @@ nsDownload::SetState(DownloadState aStat
nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
// Master pref to control this function. // Master pref to control this function.
@ -257,7 +255,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
int64_t goat = PR_Now() - mStartTime; int64_t goat = PR_Now() - mStartTime;
showTaskbarAlert = goat > alertIntervalUSec; showTaskbarAlert = goat > alertIntervalUSec;
@@ -2759,16 +2772,17 @@ nsDownload::SetState(DownloadState aStat @@ -2763,16 +2776,17 @@ nsDownload::SetState(DownloadState aStat
NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
message, !removeWhenDone, message, !removeWhenDone,
mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"), mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
@ -316,7 +314,7 @@ diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/di
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/toolkit/content/widgets/dialog-kde.xml +++ b/toolkit/content/widgets/dialog-kde.xml
@@ -0,0 +1,463 @@ @@ -0,0 +1,457 @@
+<?xml version="1.0"?> +<?xml version="1.0"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public +<!-- 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 + - License, v. 2.0. If a copy of the MPL was not distributed with this
@ -386,8 +384,7 @@ new file mode 100644
+ <![CDATA[ + <![CDATA[
+ if (this.hasAttribute("defaultButton")) + if (this.hasAttribute("defaultButton"))
+ return this.getAttribute("defaultButton"); + return this.getAttribute("defaultButton");
+ else // default to the accept button + return "accept"; // default to the accept button
+ return "accept";
+ ]]> + ]]>
+ </getter> + </getter>
+ <setter> + <setter>
@ -491,9 +488,6 @@ new file mode 100644
+ <parameter name="aEvent"/> + <parameter name="aEvent"/>
+ <body> + <body>
+ <![CDATA[ + <![CDATA[
+ let { AppConstants } =
+ Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
+
+ function focusInit() { + function focusInit() {
+ const dialog = document.documentElement; + const dialog = document.documentElement;
+ const defaultButton = dialog.getButton(dialog.defaultButton); + const defaultButton = dialog.getButton(dialog.defaultButton);
@ -519,7 +513,7 @@ new file mode 100644
+ initialFocusedElt.focus(); + initialFocusedElt.focus();
+ } + }
+ } + }
+ else if (AppConstants.platform != "macosx" && + else if (!/Mac/.test(navigator.platform) &&
+ focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) { + focusedElt.hasAttribute("dlgtype") && focusedElt != defaultButton) {
+ defaultButton.focus(); + defaultButton.focus();
+ } + }
@ -604,16 +598,16 @@ new file mode 100644
+ else + else
+ switch (dlgtype) { + switch (dlgtype) {
+ case "accept": + case "accept":
+ button.setAttribute("icon","accept"); + button.setAttribute("icon", "accept");
+ break; + break;
+ case "cancel": + case "cancel":
+ button.setAttribute("icon","cancel"); + button.setAttribute("icon", "cancel");
+ break; + break;
+ case "disclosure": + case "disclosure":
+ button.setAttribute("icon","properties"); + button.setAttribute("icon", "properties");
+ break; + break;
+ case "help": + case "help":
+ button.setAttribute("icon","help"); + button.setAttribute("icon", "help");
+ break; + break;
+ default: + default:
+ break; + break;
@ -639,10 +633,8 @@ new file mode 100644
+ for (dlgtype in buttons) + for (dlgtype in buttons)
+ buttons[dlgtype].hidden = !shown[dlgtype]; + buttons[dlgtype].hidden = !shown[dlgtype];
+ +
+ let { AppConstants } =
+ Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
+ // show the spacer on Windows only when the extra2 button is present + // show the spacer on Windows only when the extra2 button is present
+ if (AppConstants.platform == "win") { + if (/Win/.test(navigator.platform)) {
+ var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer"); + var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
+ spacer.removeAttribute("hidden"); + spacer.removeAttribute("hidden");
+ spacer.setAttribute("flex", shown["extra2"]?"1":"0"); + spacer.setAttribute("flex", shown["extra2"]?"1":"0");
@ -784,7 +776,7 @@ diff --git a/toolkit/content/widgets/preferences-kde.xml b/toolkit/content/widge
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/toolkit/content/widgets/preferences-kde.xml +++ b/toolkit/content/widgets/preferences-kde.xml
@@ -0,0 +1,1410 @@ @@ -0,0 +1,1403 @@
+<?xml version="1.0"?> +<?xml version="1.0"?>
+ +
+<!DOCTYPE bindings [ +<!DOCTYPE bindings [
@ -1422,10 +1414,7 @@ new file mode 100644
+ var acceptButton = docElt.getButton("accept"); + var acceptButton = docElt.getButton("accept");
+ acceptButton.hidden = true; + acceptButton.hidden = true;
+ var cancelButton = docElt.getButton("cancel"); + var cancelButton = docElt.getButton("cancel");
+ + if (/Mac/.test(navigator.platform)) {
+ let { AppConstants } =
+ Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
+ if (AppConstants.platform == "macosx") {
+ // no buttons on Mac except Help + // no buttons on Mac except Help
+ cancelButton.hidden = true; + cancelButton.hidden = true;
+ // Move Help button to the end + // Move Help button to the end
@ -1607,9 +1596,7 @@ new file mode 100644
+ <parameter name="aPaneElement"/> + <parameter name="aPaneElement"/>
+ <body> + <body>
+ <![CDATA[ + <![CDATA[
+ let { AppConstants } = + if (/Mac/.test(navigator.platform)) {
+ Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
+ if (AppConstants.platform == "macosx") {
+ var paneTitle = aPaneElement.label; + var paneTitle = aPaneElement.label;
+ if (paneTitle != "") + if (paneTitle != "")
+ document.title = paneTitle; + document.title = paneTitle;
@ -1683,11 +1670,9 @@ new file mode 100644
+ <property name="_shouldAnimate"> + <property name="_shouldAnimate">
+ <getter> + <getter>
+ <![CDATA[ + <![CDATA[
+ let { AppConstants } =
+ Components.utils.import("resource://gre/modules/AppConstants.jsm", {});
+ var psvc = Components.classes["@mozilla.org/preferences-service;1"] + var psvc = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch); + .getService(Components.interfaces.nsIPrefBranch);
+ var animate = AppConstants.platform == "macosx"; + var animate = /Mac/.test(navigator.platform);
+ try { + try {
+ animate = psvc.getBoolPref("browser.preferences.animateFadeIn"); + animate = psvc.getBoolPref("browser.preferences.animateFadeIn");
+ } + }
@ -1854,7 +1839,7 @@ new file mode 100644
+ <handlers> + <handlers>
+ <handler event="dialogaccept"> + <handler event="dialogaccept">
+ <![CDATA[ + <![CDATA[
+ if (!this._fireEvent("beforeaccept", this)){ + if (!this._fireEvent("beforeaccept", this)) {
+ return false; + return false;
+ } + }
+ +
@ -2292,7 +2277,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
--- a/toolkit/xre/moz.build --- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build
@@ -39,17 +39,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co @@ -40,17 +40,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
'updaterfileutils_osx.mm', 'updaterfileutils_osx.mm',
] ]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit': elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
@ -2316,7 +2301,7 @@ diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/toolkit/xre/nsKDEUtils.cpp +++ b/toolkit/xre/nsKDEUtils.cpp
@@ -0,0 +1,339 @@ @@ -0,0 +1,344 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public +/* 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 + * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -2337,6 +2322,11 @@ new file mode 100644
+#include <sys/resource.h> +#include <sys/resource.h>
+#include <unistd.h> +#include <unistd.h>
+#include <X11/Xlib.h> +#include <X11/Xlib.h>
+// copied from X11/X.h as a hack since for an unknown
+// reason it's not picked up from X11/X.h
+#ifndef None
+#define None 0L /* universal null resource or null atom */
+#endif
+ +
+//#define DEBUG_KDE +//#define DEBUG_KDE
+#ifdef DEBUG_KDE +#ifdef DEBUG_KDE
@ -3161,7 +3151,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
--- a/widget/gtk/moz.build --- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build +++ b/widget/gtk/moz.build
@@ -90,16 +90,17 @@ else: @@ -101,16 +101,17 @@ else:
include('/ipc/chromium/chromium-config.mozbuild') include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = 'xul'
@ -3534,25 +3524,25 @@ diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h
diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp --- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp
@@ -35,16 +35,17 @@ @@ -32,16 +32,17 @@
#include "nsTextFormatter.h"
#include "nsVersionComparator.h"
#include "nsXPCOMCIDInternal.h"
#include "nsIConsoleService.h" #include "nsIConsoleService.h"
#include "nsIScriptError.h" #include "nsIScriptError.h"
#include "nsIXULAppInfo.h" #include "nsIXULAppInfo.h"
#include "nsIXULRuntime.h" #include "nsIXULRuntime.h"
#ifdef MOZ_B2G_LOADER
#include "mozilla/XPTInterfaceInfoManager.h"
#endif
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
#ifdef MOZ_B2G_LOADER using namespace mozilla;
#define XPTONLY_MANIFEST &nsComponentManagerImpl::XPTOnlyManifestManifest
#define XPTONLY_XPT &nsComponentManagerImpl::XPTOnlyManifestXPT struct ManifestDirective
#else {
#define XPTONLY_MANIFEST nullptr const char* directive;
#define XPTONLY_XPT nullptr int argc;
#endif
@@ -494,16 +495,17 @@ ParseManifest(NSLocationType aType, File @@ -472,16 +473,17 @@ ParseManifest(NSLocationType aType, File
NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled"); NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
NS_NAMED_LITERAL_STRING(kApplication, "application"); NS_NAMED_LITERAL_STRING(kApplication, "application");
@ -3570,7 +3560,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
NS_NAMED_LITERAL_STRING(kMain, "main"); NS_NAMED_LITERAL_STRING(kMain, "main");
NS_NAMED_LITERAL_STRING(kContent, "content"); NS_NAMED_LITERAL_STRING(kContent, "content");
@@ -554,44 +556,49 @@ ParseManifest(NSLocationType aType, File @@ -532,44 +534,49 @@ ParseManifest(NSLocationType aType, File
CopyUTF8toUTF16(s, abi); CopyUTF8toUTF16(s, abi);
abi.Insert(char16_t('_'), 0); abi.Insert(char16_t('_'), 0);
abi.Insert(osTarget, 0); abi.Insert(osTarget, 0);
@ -3620,7 +3610,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
process = kMain; process = kMain;
} }
@@ -694,25 +701,27 @@ ParseManifest(NSLocationType aType, File @@ -672,25 +679,27 @@ ParseManifest(NSLocationType aType, File
TriState stOsVersion = eUnspecified; TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified; TriState stOs = eUnspecified;
TriState stABI = eUnspecified; TriState stABI = eUnspecified;
@ -3648,7 +3638,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
} }
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
@@ -762,16 +771,17 @@ ParseManifest(NSLocationType aType, File @@ -740,16 +749,17 @@ ParseManifest(NSLocationType aType, File
} }
if (!ok || if (!ok ||