- update to Firefox 13.0 (bnc#765204)

* MFSA 2012-34/CVE-2012-1938/CVE-2012-1937/CVE-2011-3101
    Miscellaneous memory safety hazards
  * MFSA 2012-36/CVE-2012-1944 (bmo#751422)
    Content Security Policy inline-script bypass
  * MFSA 2012-37/CVE-2012-1945 (bmo#670514)
    Information disclosure though Windows file shares and shortcut
    files
  * MFSA 2012-38/CVE-2012-1946 (bmo#750109)
    Use-after-free while replacing/inserting a node in a document
  * MFSA 2012-40/CVE-2012-1947/CVE-2012-1940/CVE-2012-1941
    Buffer overflow and use-after-free issues found using Address
    Sanitizer
- require NSS 3.13.4
  * MFSA 2012-39/CVE-2012-0441 (bmo#715073)
- fix sound notifications when filename/path contains a whitespace
  (bmo#749739)

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=280
This commit is contained in:
Wolfgang Rosenauer 2012-06-05 18:01:53 +00:00 committed by Git OBS Bridge
parent 233fa87cb3
commit a7f369b4c2
20 changed files with 538 additions and 777 deletions

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Sat Jun 2 08:22:51 UTC 2012 - wr@rosenauer.org
- update to Firefox 13.0 (bnc#765204)
* MFSA 2012-34/CVE-2012-1938/CVE-2012-1937/CVE-2011-3101
Miscellaneous memory safety hazards
* MFSA 2012-36/CVE-2012-1944 (bmo#751422)
Content Security Policy inline-script bypass
* MFSA 2012-37/CVE-2012-1945 (bmo#670514)
Information disclosure though Windows file shares and shortcut
files
* MFSA 2012-38/CVE-2012-1946 (bmo#750109)
Use-after-free while replacing/inserting a node in a document
* MFSA 2012-40/CVE-2012-1947/CVE-2012-1940/CVE-2012-1941
Buffer overflow and use-after-free issues found using Address
Sanitizer
- require NSS 3.13.4
* MFSA 2012-39/CVE-2012-0441 (bmo#715073)
- fix sound notifications when filename/path contains a whitespace
(bmo#749739)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed May 23 14:40:16 UTC 2012 - adrian@suse.de Wed May 23 14:40:16 UTC 2012 - adrian@suse.de

View File

@ -17,7 +17,7 @@
# #
%define major 12 %define major 13
%define mainver %major.0 %define mainver %major.0
%define update_channel release %define update_channel release
@ -45,11 +45,11 @@ BuildRequires: libproxy-devel
BuildRequires: wireless-tools BuildRequires: wireless-tools
%endif %endif
BuildRequires: mozilla-nspr-devel >= 4.9.0 BuildRequires: mozilla-nspr-devel >= 4.9.0
BuildRequires: mozilla-nss-devel >= 3.13.3 BuildRequires: mozilla-nss-devel >= 3.13.4
BuildRequires: nss-shared-helper-devel BuildRequires: nss-shared-helper-devel
Version: %{mainver} Version: %{mainver}
Release: 0 Release: 0
%define releasedate 2012042100 %define releasedate 2012060100
Provides: firefox = %{mainver} Provides: firefox = %{mainver}
Provides: firefox = %{version}-%{release} Provides: firefox = %{version}-%{release}
Provides: web_browser Provides: web_browser
@ -91,10 +91,12 @@ Patch11: mozilla-sle11.patch
Patch12: mozilla-linux3.patch Patch12: mozilla-linux3.patch
Patch14: mozilla-disable-neon-option.patch Patch14: mozilla-disable-neon-option.patch
Patch15: mozilla-yarr-pcre.patch Patch15: mozilla-yarr-pcre.patch
Patch16: mozilla-revert_621446.patch Patch16: mozilla-system-nspr.patch
Patch17: mozilla-libnotify.patch Patch17: mozilla-revert_621446.patch
Patch18: mozilla-gcc47.patch Patch18: mozilla-libnotify.patch
Patch19: mozilla-arm-disable-edsp.patch Patch19: mozilla-gcc47.patch
Patch20: mozilla-nsSound.patch
Patch21: mozilla-arm-disable-edsp.patch
# Firefox/browser # Firefox/browser
Patch31: firefox-browser-css.patch Patch31: firefox-browser-css.patch
Patch32: firefox-cross-desktop.patch Patch32: firefox-cross-desktop.patch
@ -131,6 +133,10 @@ Recommends: libcanberra0
%else %else
%define crashreporter 1 %define crashreporter 1
%endif %endif
# temporary gcc 4.7
%if %suse_version > 1210
%define crashreporter 0
%endif
### build options end ### build options end
%description %description
@ -165,7 +171,7 @@ of MozillaFirefox.
%package translations-other %package translations-other
Summary: Extra translations for MozillaFirefox Summary: Extra translations for MozillaFirefox
Group: System/Localization Group: System/Localization
Provides: locale(%{name}:af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;el;en_ZA;eo;es_MX;et;eu;fa;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mn;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;sw;ta;ta_LK;te;th;tr;uk;vi;zu) Provides: locale(%{name}:af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;el;en_ZA;eo;es_MX;et;eu;fa;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;vi;zu)
Requires: %{name} = %{version} Requires: %{name} = %{version}
Obsoletes: %{name}-translations < %{version}-%{release} Obsoletes: %{name}-translations < %{version}-%{release}
@ -228,6 +234,8 @@ cd $RPM_BUILD_DIR/mozilla
%patch17 -p1 %patch17 -p1
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%patch20 -p1
%patch21 -p1
# #
%patch31 -p1 %patch31 -p1
%patch32 -p1 %patch32 -p1
@ -539,6 +547,7 @@ exit 0
%{progdir}/distribution/extensions/ %{progdir}/distribution/extensions/
%{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} %{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
%{progdir}/icons/ %{progdir}/icons/
%{progdir}/jssubloader/
%{progdir}/searchplugins/ %{progdir}/searchplugins/
%attr(755,root,root) %{progdir}/%{progname}.sh %attr(755,root,root) %{progdir}/%{progname}.sh
%{progdir}/firefox-bin %{progdir}/firefox-bin

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:bd133c57e1e6c71dda3d593853125ab27073ab32bafd568fe441baff47c3a32d oid sha256:7793798b58360f3b866a9471267acb99a4ca43578f833088e0bb1843910512f4
size 29339 size 29324

View File

@ -2,8 +2,8 @@
CHANNEL="release" CHANNEL="release"
BRANCH="releases/mozilla-$CHANNEL" BRANCH="releases/mozilla-$CHANNEL"
RELEASE_TAG="FIREFOX_12_0_RELEASE" RELEASE_TAG="FIREFOX_13_0_RELEASE"
VERSION="12.0" VERSION="13.0"
# mozilla # mozilla
echo "cloning $BRANCH..." echo "cloning $BRANCH..."

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9b78faebdac7c27c203f50965280b5b0332f3cc72b37106d201eaa09516b98ef
size 78962014

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:59e7118241c38958f151df4dfc98762840eece06389406e884583ec735da7dfa
size 79540331

View File

@ -1,11 +1,11 @@
# HG changeset patch # HG changeset patch
# Parent d6bb5c163142d233d00e739e21aa9df16077873e # Parent 4a29f791f190ebb5de41590d70d52c7510d9477c
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
--- a/browser/app/Makefile.in --- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in +++ b/browser/app/Makefile.in
@@ -164,16 +164,21 @@ endif # LIBXUL_SDK @@ -160,16 +160,21 @@ endif
DEFINES += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" endif # LIBXUL_SDK
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
libs:: libs::
@ -54,7 +54,7 @@ diff --git a/browser/branding/official/Makefile.in b/browser/branding/official/M
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
@@ -432,18 +432,21 @@ @@ -450,18 +450,21 @@
@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png @BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
#ifdef SHIP_FEEDBACK #ifdef SHIP_FEEDBACK
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi @BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi

View File

@ -1,14 +1,12 @@
From: Wolfgang Rosenauer # HG changeset patch
NonGnome/KDE integration # Parent fd2da289a3c15b8c96c248df2710d879793f22c9
# User Wolfgang Rosenauer <wr@rosenauer.org>
References: Bug 526717 - remove non-working "Set as desktop background" from the UI for unsupported desktops
https://bugzilla.novell.com/show_bug.cgi?id=170055
diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js
--- a/browser/base/content/nsContextMenu.js --- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js
@@ -237,17 +237,19 @@ nsContextMenu.prototype = { @@ -262,17 +262,17 @@ nsContextMenu.prototype = {
this.showItem("context-sep-viewsource", shouldShow);
// Set as Desktop background depends on whether an image was clicked on, // Set as Desktop background depends on whether an image was clicked on,
// and only works if we have a shell service. // and only works if we have a shell service.
@ -16,11 +14,9 @@ diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsCont
#ifdef HAVE_SHELL_SERVICE #ifdef HAVE_SHELL_SERVICE
// Only enable Set as Desktop Background if we can get the shell service. // Only enable Set as Desktop Background if we can get the shell service.
var shell = getShellService(); var shell = getShellService();
- if (shell) if (shell)
+ var env = Components.classes["@mozilla.org/process/environment;1"] - haveSetDesktopBackground = true;
+ .getService(Components.interfaces.nsIEnvironment); + haveSetDesktopBackground = shell.canSetDesktopBackground;
+ if (shell && env.get('DESKTOP_SESSION') == "gnome")
haveSetDesktopBackground = true;
#endif #endif
this.showItem("context-setDesktopBackground", this.showItem("context-setDesktopBackground",
haveSetDesktopBackground && this.onLoadedImage); haveSetDesktopBackground && this.onLoadedImage);
@ -28,3 +24,68 @@ diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsCont
if (haveSetDesktopBackground && this.onLoadedImage) { if (haveSetDesktopBackground && this.onLoadedImage) {
document.getElementById("context-setDesktopBackground") document.getElementById("context-setDesktopBackground")
.disabled = this.disableSetDesktopBackground(); .disabled = this.disableSetDesktopBackground();
}
diff --git a/browser/components/shell/public/nsIShellService.idl b/browser/components/shell/public/nsIShellService.idl
--- a/browser/components/shell/public/nsIShellService.idl
+++ b/browser/components/shell/public/nsIShellService.idl
@@ -69,16 +69,25 @@ interface nsIShellService : nsISupports
/**
* Used to determine whether or not to show a "Set Default Browser"
* query dialog. This attribute is true if the application is starting
* up and "browser.shell.checkDefaultBrowser" is true, otherwise it
* is false.
*/
attribute boolean shouldCheckDefaultBrowser;
+ /**
+ * Used to determine whether or not to offer "Set as desktop background"
+ * context menu item. Even if shell service is available it is not
+ * guaranteed that it is able to set the background for every desktop
+ * which is especially true for Linux with its many different desktop
+ * environments.
+ */
+ readonly attribute boolean canSetDesktopBackground;
+
/**
* Flags for positioning/sizing of the Desktop Background image.
*/
const long BACKGROUND_TILE = 1;
const long BACKGROUND_STRETCH = 2;
const long BACKGROUND_CENTER = 3;
const long BACKGROUND_FILL = 4;
const long BACKGROUND_FIT = 5;
diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp
--- a/browser/components/shell/src/nsGNOMEShellService.cpp
+++ b/browser/components/shell/src/nsGNOMEShellService.cpp
@@ -377,16 +377,31 @@ nsGNOMEShellService::SetShouldCheckDefau
pserve->GetBranch("", getter_AddRefs(prefs));
if (prefs)
prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
return NS_OK;
}
+NS_IMETHODIMP
+nsGNOMEShellService::GetCanSetDesktopBackground(bool* aResult)
+{
+ // setting desktop background is currently only supported
+ // for Gnome or desktops using the same GSettings and GConf keys
+ const char* gnomeSession = getenv("GNOME_DESKTOP_SESSION_ID");
+ if (gnomeSession) {
+ *aResult = true;
+ } else {
+ *aResult = false;
+ }
+
+ return NS_OK;
+}
+
static nsresult
WriteImage(const nsCString& aPath, imgIContainer* aImage)
{
#ifndef MOZ_WIDGET_GTK2
return NS_ERROR_NOT_AVAILABLE;
#else
nsCOMPtr<nsIImageToPixbuf> imgToPixbuf =
do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1");

View File

@ -2,7 +2,7 @@ diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser
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,1118 @@ @@ -0,0 +1,1116 @@
+#filter substitution +#filter substitution
+<?xml version="1.0"?> +<?xml version="1.0"?>
+# -*- Mode: HTML -*- +# -*- Mode: HTML -*-
@ -43,6 +43,7 @@ new file mode 100644
+# David Dahl <ddahl@mozilla.com> +# David Dahl <ddahl@mozilla.com>
+# Frank Yan <fyan@mozilla.com> +# Frank Yan <fyan@mozilla.com>
+# Victor Porof <vporof@mozilla.com> +# Victor Porof <vporof@mozilla.com>
+# Paul Rouget <paul@mozilla.com>
+# +#
+# Alternatively, the contents of this file may be used under the terms of +# 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 +# either the GNU General Public License Version 2 or later (the "GPL"), or
@ -95,6 +96,7 @@ new file mode 100644
+ lightweightthemes="true" + lightweightthemes="true"
+ lightweightthemesfooter="browser-bottombox" + lightweightthemesfooter="browser-bottombox"
+ windowtype="navigator:browser" + windowtype="navigator:browser"
+ macanimationtype="document"
+ screenX="4" screenY="4" + screenX="4" screenY="4"
+ browsingmode="normal" + browsingmode="normal"
+ persist="screenX screenY width height sizemode"> + persist="screenX screenY width height sizemode">
@ -231,20 +233,21 @@ new file mode 100644
+ </hbox> + </hbox>
+ </panel> + </panel>
+ +
+ <panel id="inspector-tree-panel" + <menupopup id="inspector-node-popup">
+ orient="vertical" + <menuitem id="inspectorHTMLCopyInner"
+ hidden="true" + label="&inspectorHTMLCopyInner.label;"
+ ignorekeys="true" + accesskey="&inspectorHTMLCopyInner.accesskey;"
+ noautofocus="true" + command="Inspector:CopyInner"/>
+ noautohide="true" + <menuitem id="inspectorHTMLCopyOuter"
+ titlebar="normal" + label="&inspectorHTMLCopyOuter.label;"
+ close="true" + accesskey="&inspectorHTMLCopyOuter.accesskey;"
+ label="&inspectPanelTitle.label;"> + command="Inspector:CopyOuter"/>
+ <hbox id="tree-panel-resizer-box" align="end"> + <menuseparator/>
+ <spacer flex="1" /> + <menuitem id="inspectorHTMLDelete"
+ <resizer dir="bottomend" /> + label="&inspectorHTMLDelete.label;"
+ </hbox> + accesskey="&inspectorHTMLDelete.accesskey;"
+ </panel> + command="Inspector:DeleteNode"/>
+ </menupopup>
+ +
+ <menupopup id="toolbar-context-menu" + <menupopup id="toolbar-context-menu"
+ onpopupshowing="onViewToolbarsPopupShowing(event);"> + onpopupshowing="onViewToolbarsPopupShowing(event);">
@ -309,7 +312,7 @@ new file mode 100644
+ type="arrow" + type="arrow"
+ hidden="true" + hidden="true"
+ noautofocus="true" + noautofocus="true"
+ onpopupshown="document.getElementById('identity-popup-more-info-button').focus();" + onpopupshown="gIdentityHandler.onPopupShown(event);"
+ level="top"> + level="top">
+ <hbox id="identity-popup-container" align="top"> + <hbox id="identity-popup-container" align="top">
+ <image id="identity-popup-icon"/> + <image id="identity-popup-icon"/>
@ -476,7 +479,7 @@ new file mode 100644
+ toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;" + toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
+ fullscreentoolbar="true" mode="icons" customizable="true" + fullscreentoolbar="true" mode="icons" customizable="true"
+ iconsize="large" + iconsize="large"
+ defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,fullscreenflex,window-controls" + defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,window-controls"
+ context="toolbar-context-menu"> + context="toolbar-context-menu">
+ +
+ <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional" + <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
@ -529,6 +532,7 @@ new file mode 100644
+ <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/> + <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
+ <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/> + <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
+ <image id="password-notification-icon" class="notification-anchor-icon" role="button"/> + <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
+ <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
+ </box> + </box>
+ <!-- Use onclick instead of normal popup= syntax since the popup + <!-- Use onclick instead of normal popup= syntax since the popup
+ code fires onmousedown, and hence eats our favicon drag events. + code fires onmousedown, and hence eats our favicon drag events.
@ -697,8 +701,7 @@ new file mode 100644
+ </toolbarbutton> + </toolbarbutton>
+ </toolbaritem> + </toolbaritem>
+ +
+ <hbox id="fullscreenflex" flex="1" hidden="true" fullscreencontrol="true"/> + <hbox id="window-controls" hidden="true" fullscreencontrol="true" pack="end">
+ <hbox id="window-controls" hidden="true" fullscreencontrol="true">
+ <toolbarbutton id="minimize-button" + <toolbarbutton id="minimize-button"
+ tooltiptext="&fullScreenMinimize.tooltip;" + tooltiptext="&fullScreenMinimize.tooltip;"
+ oncommand="window.minimize();"/> + oncommand="window.minimize();"/>
@ -855,11 +858,6 @@ new file mode 100644
+ label="&printButton.label;" command="cmd_print" + label="&printButton.label;" command="cmd_print"
+ tooltiptext="&printButton.tooltip;"/> + tooltiptext="&printButton.tooltip;"/>
+ +
+ <toolbaritem id="navigator-throbber" title="&throbberItem.title;" align="center" pack="center"
+ mousethrough="always">
+ <image/>
+ </toolbaritem>
+
+ <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional" + <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ observes="Tools:Downloads" + observes="Tools:Downloads"
+ ondrop="DownloadsButtonDNDObserver.onDrop(event)" + ondrop="DownloadsButtonDNDObserver.onDrop(event)"
@ -890,21 +888,6 @@ new file mode 100644
+ ondragenter="newWindowButtonObserver.onDragOver(event)" + ondragenter="newWindowButtonObserver.onDragOver(event)"
+ ondragexit="newWindowButtonObserver.onDragExit(event)"/> + ondragexit="newWindowButtonObserver.onDragExit(event)"/>
+ +
+ <toolbarbutton id="cut-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&cutCmd.label;"
+ command="cmd_cut"
+ tooltiptext="&cutButton.tooltip;"/>
+
+ <toolbarbutton id="copy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&copyCmd.label;"
+ command="cmd_copy"
+ tooltiptext="&copyButton.tooltip;"/>
+
+ <toolbarbutton id="paste-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&pasteCmd.label;"
+ command="cmd_paste"
+ tooltiptext="&pasteButton.tooltip;"/>
+
+ <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional" + <toolbarbutton id="fullscreen-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ observes="View:FullScreen" + observes="View:FullScreen"
+ type="checkbox" + type="checkbox"
@ -922,12 +905,7 @@ new file mode 100644
+ command="cmd_fullZoomEnlarge" + command="cmd_fullZoomEnlarge"
+ tooltiptext="&zoomInButton.tooltip;"/> + tooltiptext="&zoomInButton.tooltip;"/>
+ </toolbaritem> + </toolbaritem>
+#ifdef MOZ_SERVICES_SYNC +
+ <toolbarbutton id="sync-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncToolbarButton.label;"
+ oncommand="gSyncUI.handleToolbarButton()"/>
+#endif
+ <toolbarbutton id="feed-button" + <toolbarbutton id="feed-button"
+ type="menu" + type="menu"
+ class="toolbarbutton-1 chromeclass-toolbar-additional" + class="toolbarbutton-1 chromeclass-toolbar-additional"
@ -942,6 +920,33 @@ new file mode 100644
+ onclick="checkForMiddleClick(this, event);"/> + onclick="checkForMiddleClick(this, event);"/>
+ </toolbarbutton> + </toolbarbutton>
+ +
+ <toolbarbutton id="cut-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&cutCmd.label;"
+ command="cmd_cut"
+ tooltiptext="&cutButton.tooltip;"/>
+
+ <toolbarbutton id="copy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&copyCmd.label;"
+ command="cmd_copy"
+ tooltiptext="&copyButton.tooltip;"/>
+
+ <toolbarbutton id="paste-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&pasteCmd.label;"
+ command="cmd_paste"
+ tooltiptext="&pasteButton.tooltip;"/>
+
+#ifdef MOZ_SERVICES_SYNC
+ <toolbarbutton id="sync-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncToolbarButton.label;"
+ oncommand="gSyncUI.handleToolbarButton()"/>
+#endif
+
+ <toolbaritem id="navigator-throbber" title="&throbberItem.title;" align="center" pack="center"
+ mousethrough="always">
+ <image/>
+ </toolbaritem>
+
+ <toolbarbutton id="tabview-button" class="toolbarbutton-1 chromeclass-toolbar-additional" + <toolbarbutton id="tabview-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&tabGroupsButton.label;" + label="&tabGroupsButton.label;"
+ command="Browser:ToggleTabView" + command="Browser:ToggleTabView"
@ -969,7 +974,7 @@ new file mode 100644
+ tabcontainer="tabbrowser-tabs" + tabcontainer="tabbrowser-tabs"
+ contentcontextmenu="contentAreaContextMenu" + contentcontextmenu="contentAreaContextMenu"
+ autocompletepopup="PopupAutoComplete" + autocompletepopup="PopupAutoComplete"
+ onclick="return contentAreaClick(event, false);"/> + onclick="contentAreaClick(event, false);"/>
+ <statuspanel id="statusbar-display" inactive="true"/> + <statuspanel id="statusbar-display" inactive="true"/>
+ </vbox> + </vbox>
+ <splitter id="devtools-side-splitter" hidden="true"/> + <splitter id="devtools-side-splitter" hidden="true"/>
@ -996,45 +1001,42 @@ new file mode 100644
+ class="devtools-toolbar" + class="devtools-toolbar"
+ nowindowdrag="true" + nowindowdrag="true"
+ hidden="true"> + hidden="true">
+ <vbox flex="1">
+ <resizer id="inspector-top-resizer" flex="1"
+ dir="top" disabled="true"
+ element="inspector-tree-box"/>
+ <hbox>
+#ifdef XP_MACOSX +#ifdef XP_MACOSX
+ <toolbarbutton id="highlighter-closebutton" + <toolbarbutton id="highlighter-closebutton"
+ oncommand="InspectorUI.closeInspectorUI(false);" + oncommand="InspectorUI.closeInspectorUI(false);"
+ tooltiptext="&inspectCloseButton.tooltiptext;"/> + tooltiptext="&inspectCloseButton.tooltiptext;"/>
+#endif +#endif
+ <toolbarbutton id="inspector-inspect-toolbutton" + <toolbarbutton id="inspector-inspect-toolbutton"
+ class="devtools-toolbarbutton" + class="devtools-toolbarbutton"
+ label="&inspectButton.label;" + command="Inspector:Inspect"/>
+ accesskey="&inspectButton.accesskey;" + <toolbarbutton id="inspector-treepanel-toolbutton"
+ command="Inspector:Inspect"/> + class="devtools-toolbarbutton"
+ <arrowscrollbox id="inspector-breadcrumbs" + label="&htmlPanel.label;"
+ flex="1" orient="horizontal" + accesskey="&htmlPanel.accesskey;"
+ clicktoscroll="true"/> + tooltiptext="&htmlPanel.tooltiptext;"
+ <hbox id="inspector-tools"> + command="Inspector:HTMLPanel"/>
+ <toolbarbutton id="inspector-3D-button" + <arrowscrollbox id="inspector-breadcrumbs"
+ class="devtools-toolbarbutton" + flex="1" orient="horizontal"
+ hidden="true" + clicktoscroll="true"/>
+ label="&inspect3DViewButton.label;" + <hbox id="inspector-tools">
+ accesskey="&inspect3DViewButton.accesskey;" + <toolbarbutton id="inspector-3D-button"
+ command="Inspector:Tilt"/> + class="devtools-toolbarbutton"
+ <toolbarbutton id="inspector-style-button" + hidden="true"
+ class="devtools-toolbarbutton" + label="&inspect3DViewButton.label;"
+ label="&inspectStyleButton.label;" + accesskey="&inspect3DViewButton.accesskey;"
+ accesskey="&inspectStyleButton.accesskey;" + command="Inspector:Tilt"/>
+ command="Inspector:Sidebar"/> + <toolbarbutton id="inspector-style-button"
+ <!-- registered tools go here --> + class="devtools-toolbarbutton"
+ </hbox> + label="&inspectStyleButton.label;"
+ accesskey="&inspectStyleButton.accesskey;"
+ command="Inspector:Sidebar"/>
+ <!-- registered tools go here -->
+ </hbox>
+#ifndef XP_MACOSX +#ifndef XP_MACOSX
+ <toolbarbutton id="highlighter-closebutton" + <toolbarbutton id="highlighter-closebutton"
+ oncommand="InspectorUI.closeInspectorUI(false);" + oncommand="InspectorUI.closeInspectorUI(false);"
+ tooltiptext="&inspectCloseButton.tooltiptext;"/> + tooltiptext="&inspectCloseButton.tooltiptext;"/>
+#endif +#endif
+ </hbox>
+ </vbox>
+ </toolbar> + </toolbar>
+ <toolbar id="addon-bar" + <toolbar id="addon-bar"
+ toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;" + toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;"
@ -1057,11 +1059,7 @@ new file mode 100644
+ <svg:svg height="0"> + <svg:svg height="0">
+ <svg:mask id="winstripe-keyhole-forward-mask" maskContentUnits="objectBoundingBox"> + <svg:mask id="winstripe-keyhole-forward-mask" maskContentUnits="objectBoundingBox">
+ <svg:rect x="0" y="0" width="1" height="1" fill="white"/> + <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
+ <svg:circle cx="-0.46" cy="0.5" r="0.63"/> + <svg:circle cx="-0.34" cy="0.5" r="0.61"/>
+ </svg:mask>
+ <svg:mask id="winstripe-keyhole-forward-mask-hover" maskContentUnits="objectBoundingBox">
+ <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
+ <svg:circle cx="-0.35" cy="0.5" r="0.58"/>
+ </svg:mask> + </svg:mask>
+ <svg:mask id="winstripe-urlbar-back-button-mask" maskContentUnits="userSpaceOnUse"> + <svg:mask id="winstripe-urlbar-back-button-mask" maskContentUnits="userSpaceOnUse">
+ <svg:rect x="0" y="0" width="10000" height="50" fill="white"/> + <svg:rect x="0" y="0" width="10000" height="50" fill="white"/>
@ -1124,10 +1122,10 @@ new file mode 100644
diff --git a/browser/base/jar.mn b/browser/base/jar.mn diff --git a/browser/base/jar.mn b/browser/base/jar.mn
--- a/browser/base/jar.mn --- a/browser/base/jar.mn
+++ b/browser/base/jar.mn +++ b/browser/base/jar.mn
@@ -23,16 +23,18 @@ browser.jar: @@ -32,16 +32,18 @@ browser.jar:
content/browser/aboutHome-restore-icon-small.png (content/aboutHome-restore-icon-small.png) content/browser/abouthome/restore-large.png (content/abouthome/restore-large.png)
content/browser/aboutHome-snippet1.png (content/aboutHome-snippet1.png) content/browser/abouthome/mozilla.png (content/abouthome/mozilla.png)
content/browser/aboutHome-snippet2.png (content/aboutHome-snippet2.png) content/browser/abouthome/noise.png (content/abouthome/noise.png)
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png) content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png) content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
* content/browser/browser.css (content/browser.css) * content/browser/browser.css (content/browser.css)
@ -1137,12 +1135,12 @@ diff --git a/browser/base/jar.mn b/browser/base/jar.mn
+% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde +% override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
* content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml) * content/browser/browser-tabPreviews.xml (content/browser-tabPreviews.xml)
* content/browser/content.js (content/content.js) * content/browser/content.js (content/content.js)
* content/browser/fullscreen-video.xhtml (content/fullscreen-video.xhtml)
* content/browser/newtab/newTab.xul (content/newtab/newTab.xul) * content/browser/newtab/newTab.xul (content/newtab/newTab.xul)
* content/browser/newtab/newTab.js (content/newtab/newTab.js) * content/browser/newtab/newTab.js (content/newtab/newTab.js)
content/browser/newtab/newTab.css (content/newtab/newTab.css) content/browser/newtab/newTab.css (content/newtab/newTab.css)
* content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul) * content/browser/pageinfo/pageInfo.xul (content/pageinfo/pageInfo.xul)
* content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js) * content/browser/pageinfo/pageInfo.js (content/pageinfo/pageInfo.js)
* content/browser/pageinfo/pageInfo.css (content/pageinfo/pageInfo.css)
diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
--- a/browser/components/build/nsModule.cpp --- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp +++ b/browser/components/build/nsModule.cpp
@ -1277,7 +1275,7 @@ diff --git a/browser/components/shell/src/nsKDEShellService.cpp b/browser/compon
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/browser/components/shell/src/nsKDEShellService.cpp +++ b/browser/components/shell/src/nsKDEShellService.cpp
@@ -0,0 +1,257 @@ @@ -0,0 +1,264 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK ***** +/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
@ -1419,6 +1417,13 @@ new file mode 100644
+} +}
+ +
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::GetCanSetDesktopBackground(bool* aResult)
+{
+ *aResult = true;
+ return NS_OK;
+}
+
+NS_IMETHODIMP
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement, +nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
+ PRInt32 aPosition) + PRInt32 aPosition)
+ { + {
@ -1709,7 +1714,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
@@ -450,16 +450,17 @@ @@ -467,16 +467,17 @@
#endif #endif
#endif #endif

View File

@ -1,12 +1,12 @@
# HG changeset patch # HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org> # User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent d372da4f99f10c6e76fd483abc145cfbc485c168 # Parent be9f4eae7dc69ed989cc9f9259b3bb73d1f5dbf9
Do not overwrite the locale dynamic pref from xulrunner's all.js with a wrong default value Do not overwrite the locale dynamic pref from xulrunner's all.js with a wrong default value
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js --- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js
@@ -230,17 +230,17 @@ pref("xpinstall.whitelist.add.36", "getp @@ -231,17 +231,17 @@ pref("xpinstall.whitelist.add.36", "getp
pref("lightweightThemes.update.enabled", true); pref("lightweightThemes.update.enabled", true);
@ -19,7 +19,7 @@ diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
+pref("general.useragent.locale", "chrome://global/locale/intl.properties"); +pref("general.useragent.locale", "chrome://global/locale/intl.properties");
pref("general.skins.selectedSkin", "classic/1.0"); pref("general.skins.selectedSkin", "classic/1.0");
pref("general.smoothScroll", false); pref("general.smoothScroll", true);
#ifdef UNIX_BUT_NOT_MAC #ifdef UNIX_BUT_NOT_MAC
pref("general.autoScroll", false); pref("general.autoScroll", false);
#else #else

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0d2f7bce994d733d280deed22abbc7c5531a215ba8c7025611fc13ebf036bda6
size 47298192

3
l10n-13.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4aaf6de4c404550f2f4a9d19556f294210f9e8eb91c502a918cd4a3ec9325c33
size 48694368

View File

@ -1,78 +1,9 @@
# HG changeset patch # HG changeset patch
# Parent 93e5d3b8061741abc83dcd4ed0fe93f1636583ef # Parent 7bc8f0e5bed8cb2212e27228e628861737256459
Patch to make Mozilla build with gcc 4.7, including Patch to make Mozilla build with gcc 4.7, including
- Bug 725655 - gcc 4.7 build failures (missing headers) (TM: Mozilla13)
- Bug 734490 - "no viable overloaded 'PRIxPTR'" when building with Clang or GCC 4.7 (TM: Mozilla14) - Bug 734490 - "no viable overloaded 'PRIxPTR'" when building with Clang or GCC 4.7 (TM: Mozilla14)
- Bug 741348 - Work around crashreporter client build failure with gcc 4.7 (TM: Mozilla15) - Bug 741348 - Work around crashreporter client build failure with gcc 4.7 (TM: Mozilla15)
diff --git a/ipc/chromium/src/base/file_util_linux.cc b/ipc/chromium/src/base/file_util_linux.cc
--- a/ipc/chromium/src/base/file_util_linux.cc
+++ b/ipc/chromium/src/base/file_util_linux.cc
@@ -1,15 +1,18 @@
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_util.h"
#include <fcntl.h>
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include <string>
#include <vector>
#include "base/eintr_wrapper.h"
#include "base/file_path.h"
#include "base/string_util.h"
diff --git a/ipc/chromium/src/base/message_pump_libevent.cc b/ipc/chromium/src/base/message_pump_libevent.cc
--- a/ipc/chromium/src/base/message_pump_libevent.cc
+++ b/ipc/chromium/src/base/message_pump_libevent.cc
@@ -1,16 +1,19 @@
// Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/message_pump_libevent.h"
#include <errno.h>
#include <fcntl.h>
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include "eintr_wrapper.h"
#include "base/logging.h"
#include "base/scoped_nsautorelease_pool.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "third_party/libevent/event.h"
diff --git a/ipc/chromium/src/base/time_posix.cc b/ipc/chromium/src/base/time_posix.cc
--- a/ipc/chromium/src/base/time_posix.cc
+++ b/ipc/chromium/src/base/time_posix.cc
@@ -8,16 +8,19 @@
#include <mach/mach_time.h>
#endif
#include <sys/time.h>
#ifdef ANDROID
#include <time64.h>
#else
#include <time.h>
#endif
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include <limits>
#include "base/basictypes.h"
#include "base/logging.h"
namespace base {
diff --git a/layout/base/tests/TestPoisonArea.cpp b/layout/base/tests/TestPoisonArea.cpp diff --git a/layout/base/tests/TestPoisonArea.cpp b/layout/base/tests/TestPoisonArea.cpp
--- a/layout/base/tests/TestPoisonArea.cpp --- a/layout/base/tests/TestPoisonArea.cpp
+++ b/layout/base/tests/TestPoisonArea.cpp +++ b/layout/base/tests/TestPoisonArea.cpp

View File

@ -27,7 +27,7 @@ diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp
--- a/modules/libpref/src/Preferences.cpp --- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp +++ b/modules/libpref/src/Preferences.cpp
@@ -56,16 +56,17 @@ @@ -57,16 +57,17 @@
#include "nsIStringEnumerator.h" #include "nsIStringEnumerator.h"
#include "nsIZipReader.h" #include "nsIZipReader.h"
#include "nsPrefBranch.h" #include "nsPrefBranch.h"
@ -45,14 +45,14 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
#include "prefapi.h" #include "prefapi.h"
#include "prefread.h" #include "prefread.h"
#include "prefapi_private_data.h" #include "prefapi_private_data.h"
@@ -935,30 +936,48 @@ pref_LoadPrefsInDir(nsIFile* aDir, char @@ -937,16 +938,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
}
static nsresult pref_LoadPrefsInDirList(const char *listId) static nsresult pref_LoadPrefsInDirList(const char *listId)
{ {
nsresult rv; nsresult rv;
nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv)); nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv))
return rv;
+ // make sure we load these special files after all the others + // make sure we load these special files after all the others
+ static const char* specialFiles[] = { + static const char* specialFiles[] = {
@ -72,30 +72,34 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
+ } + }
+ } + }
+ +
nsCOMPtr<nsISimpleEnumerator> dirList; nsCOMPtr<nsISimpleEnumerator> list;
dirSvc->Get(listId, dirSvc->Get(listId,
NS_GET_IID(nsISimpleEnumerator), NS_GET_IID(nsISimpleEnumerator),
getter_AddRefs(dirList)); getter_AddRefs(list));
if (dirList) { if (!list)
bool hasMore; return NS_OK;
while (NS_SUCCEEDED(dirList->HasMoreElements(&hasMore)) && hasMore) {
nsCOMPtr<nsISupports> elem; bool hasMore;
dirList->GetNext(getter_AddRefs(elem)); @@ -962,17 +981,17 @@ static nsresult pref_LoadPrefsInDirList(
if (elem) {
nsCOMPtr<nsIFile> dir = do_QueryInterface(elem); nsCAutoString leaf;
if (dir) { path->GetNativeLeafName(leaf);
// Do we care if a file provided by this process fails to load?
- pref_LoadPrefsInDir(dir, nsnull, 0); // Do we care if a file provided by this process fails to load?
+ pref_LoadPrefsInDir(dir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
} ReadExtensionPrefs(path);
} else
} - pref_LoadPrefsInDir(path, nsnull, 0);
+ pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles));
} }
return NS_OK; return NS_OK;
} }
static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
@@ -1051,28 +1070,40 @@ static nsresult pref_InitInitialObjects( {
nsZipItemPtr<char> manifest(jarReader, name, true);
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
@@ -1062,28 +1081,40 @@ 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)
@ -139,17 +143,18 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
--- a/toolkit/components/downloads/Makefile.in --- a/toolkit/components/downloads/Makefile.in
+++ b/toolkit/components/downloads/Makefile.in +++ b/toolkit/components/downloads/Makefile.in
@@ -75,8 +75,10 @@ EXTRA_COMPONENTS = \ @@ -73,8 +73,11 @@ EXTRA_COMPONENTS = \
nsDownloadManagerUI.js \
nsDownloadManagerUI.manifest \
$(NULL) $(NULL)
endif endif
ifdef ENABLE_TESTS TEST_DIRS += test
DIRS += test
endif
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
+ +
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+
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
@ -174,7 +179,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#include "AndroidBridge.h" #include "AndroidBridge.h"
#endif #endif
@@ -2214,16 +2218,25 @@ nsDownload::SetState(DownloadState aStat @@ -2221,16 +2225,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.
@ -200,7 +205,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
PRInt64 goat = PR_Now() - mStartTime; PRInt64 goat = PR_Now() - mStartTime;
showTaskbarAlert = goat > alertIntervalUSec; showTaskbarAlert = goat > alertIntervalUSec;
@@ -2247,19 +2260,20 @@ nsDownload::SetState(DownloadState aStat @@ -2254,19 +2267,20 @@ nsDownload::SetState(DownloadState aStat
// If downloads are automatically removed per the user's // If downloads are automatically removed per the user's
// retention policy, there's no reason to make the text clickable // retention policy, there's no reason to make the text clickable
// because if it is, they'll click open the download manager and // because if it is, they'll click open the download manager and
@ -225,7 +230,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
--- a/toolkit/content/jar.mn --- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn
@@ -40,29 +40,33 @@ toolkit.jar: @@ -44,29 +44,33 @@ toolkit.jar:
*+ content/global/viewZoomOverlay.js (viewZoomOverlay.js) *+ content/global/viewZoomOverlay.js (viewZoomOverlay.js)
*+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml)
*+ content/global/bindings/browser.xml (widgets/browser.xml) *+ content/global/bindings/browser.xml (widgets/browser.xml)
@ -2092,8 +2097,7 @@ new file mode 100644
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -45,16 +45,18 @@ @@ -46,16 +46,18 @@
#include "nsReadableUtils.h"
#include "nsArrayUtils.h" #include "nsArrayUtils.h"
#include "prnetdb.h" #include "prnetdb.h"
#include "prenv.h" #include "prenv.h"
@ -2101,6 +2105,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsISupportsPrimitives.h" #include "nsISupportsPrimitives.h"
#include "nsIGSettingsService.h" #include "nsIGSettingsService.h"
#include "nsInterfaceHashtable.h"
+#include "nsVoidArray.h" +#include "nsVoidArray.h"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
@ -2111,10 +2116,10 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsUnixSystemProxySettings() {} nsUnixSystemProxySettings() {}
nsresult Init(); nsresult Init();
@@ -64,16 +66,17 @@ private: @@ -67,16 +69,17 @@ private:
nsCOMPtr<nsIGConfService> mGConf;
nsCOMPtr<nsIGSettingsService> mGSettings; nsCOMPtr<nsIGSettingsService> mGSettings;
nsCOMPtr<nsIGSettingsCollection> mProxySettings;
nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
bool IsProxyMode(const char* aMode); bool IsProxyMode(const char* aMode);
nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult); nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult); nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
@ -2129,7 +2134,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsUnixSystemProxySettings::Init() nsUnixSystemProxySettings::Init()
{ {
// If this is a GNOME session, load gconf and try to use its preferences. // If this is a GNOME session, load gconf and try to use its preferences.
@@ -526,16 +529,19 @@ nsUnixSystemProxySettings::GetProxyForUR @@ -529,16 +532,19 @@ nsUnixSystemProxySettings::GetProxyForUR
nsCAutoString host; nsCAutoString host;
rv = aURI->GetHost(host); rv = aURI->GetHost(host);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
@ -2141,7 +2146,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+ if( nsKDEUtils::kdeSupport()) + if( nsKDEUtils::kdeSupport())
+ return GetProxyFromKDE(scheme, host, port, aResult); + return GetProxyFromKDE(scheme, host, port, aResult);
+ +
if (mGSettings) { if (mProxySettings) {
rv = GetProxyFromGSettings(scheme, host, port, aResult); rv = GetProxyFromGSettings(scheme, host, port, aResult);
if (rv == NS_OK) if (rv == NS_OK)
return rv; return rv;
@ -2149,7 +2154,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
if (mGConf) if (mGConf)
return GetProxyFromGConf(scheme, host, port, aResult); return GetProxyFromGConf(scheme, host, port, aResult);
@@ -561,8 +567,34 @@ static const mozilla::Module::ContractID @@ -564,8 +570,34 @@ static const mozilla::Module::ContractID
static const mozilla::Module kUnixProxyModule = { static const mozilla::Module kUnixProxyModule = {
mozilla::Module::kVersion, mozilla::Module::kVersion,
@ -2673,7 +2678,7 @@ new file mode 100644
diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
--- a/uriloader/exthandler/Makefile.in --- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in +++ b/uriloader/exthandler/Makefile.in
@@ -92,18 +92,19 @@ LOCAL_INCLUDES = -I$(srcdir) @@ -90,18 +90,19 @@ LOCAL_INCLUDES = -I$(srcdir)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \ LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \
-I$(topsrcdir)/dom/ipc \ -I$(topsrcdir)/dom/ipc \
-I$(topsrcdir)/content/base/src \ -I$(topsrcdir)/content/base/src \
@ -3250,7 +3255,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in
--- a/widget/gtk2/Makefile.in --- a/widget/gtk2/Makefile.in
+++ b/widget/gtk2/Makefile.in +++ b/widget/gtk2/Makefile.in
@@ -135,11 +135,14 @@ DEFINES += -DCAIRO_GFX @@ -135,11 +135,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME='
INCLUDES += \ INCLUDES += \
-I$(srcdir)/../xpwidgets \ -I$(srcdir)/../xpwidgets \
@ -3604,7 +3609,7 @@ diff --git a/widget/gtk2/nsFilePicker.h b/widget/gtk2/nsFilePicker.h
diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
--- a/xpcom/components/Makefile.in --- a/xpcom/components/Makefile.in
+++ b/xpcom/components/Makefile.in +++ b/xpcom/components/Makefile.in
@@ -92,10 +92,11 @@ LOCAL_INCLUDES = \ @@ -91,10 +91,11 @@ LOCAL_INCLUDES = \
# we don't want the shared lib, but we want to force the creation of a static lib. # we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1 FORCE_STATIC_LIB = 1
@ -3619,134 +3624,134 @@ diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
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
@@ -62,16 +62,17 @@ @@ -63,16 +63,17 @@
#include "nsTextFormatter.h" #include "nsTextFormatter.h"
#include "nsVersionComparator.h" #include "nsVersionComparator.h"
#include "nsXPCOMCIDInternal.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"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
using namespace mozilla; using namespace mozilla;
struct ManifestDirective struct ManifestDirective
{ {
const char* directive; const char* directive;
int argc; int argc;
@@ -429,16 +430,17 @@ ParseManifest(NSLocationType type, FileL @@ -430,16 +431,17 @@ ParseManifest(NSLocationType type, FileL
NS_NAMED_LITERAL_STRING(kPlatform, "platform"); NS_NAMED_LITERAL_STRING(kPlatform, "platform");
NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
NS_NAMED_LITERAL_STRING(kApplication, "application"); NS_NAMED_LITERAL_STRING(kApplication, "application");
NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
NS_NAMED_LITERAL_STRING(kOs, "os"); NS_NAMED_LITERAL_STRING(kOs, "os");
NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
NS_NAMED_LITERAL_STRING(kABI, "abi"); NS_NAMED_LITERAL_STRING(kABI, "abi");
+ NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); + NS_NAMED_LITERAL_STRING(kDesktop, "desktop");
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
NS_NAMED_LITERAL_STRING(kTablet, "tablet"); NS_NAMED_LITERAL_STRING(kTablet, "tablet");
#endif #endif
// Obsolete // Obsolete
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
nsAutoString appID; nsAutoString appID;
@@ -476,41 +478,46 @@ ParseManifest(NSLocationType type, FileL @@ -477,41 +479,46 @@ ParseManifest(NSLocationType type, FileL
CopyUTF8toUTF16(s, abi); CopyUTF8toUTF16(s, abi);
abi.Insert(PRUnichar('_'), 0); abi.Insert(PRUnichar('_'), 0);
abi.Insert(osTarget, 0); abi.Insert(osTarget, 0);
} }
} }
} }
nsAutoString osVersion; nsAutoString osVersion;
+ nsAutoString desktop; + nsAutoString desktop;
#if defined(XP_WIN) #if defined(XP_WIN)
OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
if (GetVersionEx(&info)) { if (GetVersionEx(&info)) {
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
info.dwMajorVersion, info.dwMajorVersion,
info.dwMinorVersion); info.dwMinorVersion);
} }
+ desktop = NS_LITERAL_STRING("win"); + desktop = NS_LITERAL_STRING("win");
#elif defined(MOZ_WIDGET_COCOA) #elif defined(MOZ_WIDGET_COCOA)
SInt32 majorVersion, minorVersion; SInt32 majorVersion, minorVersion;
if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) && if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
(Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) { (Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
majorVersion, majorVersion,
minorVersion); minorVersion);
} }
+ desktop = NS_LITERAL_STRING("macosx"); + desktop = NS_LITERAL_STRING("macosx");
#elif defined(MOZ_WIDGET_GTK2) #elif defined(MOZ_WIDGET_GTK2)
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
gtk_major_version, gtk_major_version,
gtk_minor_version); gtk_minor_version);
+ desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
#elif defined(MOZ_WIDGET_ANDROID) #elif defined(MOZ_WIDGET_ANDROID)
bool isTablet = false; bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) { if (mozilla::AndroidBridge::Bridge()) {
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
isTablet = mozilla::AndroidBridge::Bridge()->IsTablet(); isTablet = mozilla::AndroidBridge::Bridge()->IsTablet();
} }
+ desktop = NS_LITERAL_STRING("android"); + desktop = NS_LITERAL_STRING("android");
#endif #endif
// Because contracts must be registered after CIDs, we save and process them // Because contracts must be registered after CIDs, we save and process them
// at the end. // at the end.
nsTArray<CachedDirective> contracts; nsTArray<CachedDirective> contracts;
char *token; char *token;
char *newline = buf; char *newline = buf;
@@ -592,24 +599,26 @@ ParseManifest(NSLocationType type, FileL @@ -593,24 +600,26 @@ ParseManifest(NSLocationType type, FileL
TriState stOsVersion = eUnspecified; TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified; TriState stOs = eUnspecified;
TriState stABI = eUnspecified; TriState stABI = eUnspecified;
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
TriState stTablet = eUnspecified; TriState stTablet = eUnspecified;
#endif #endif
bool platform = false; bool platform = false;
bool contentAccessible = false; bool contentAccessible = false;
+ TriState stDesktop = eUnspecified; + TriState stDesktop = eUnspecified;
while (NULL != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { while (NULL != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) {
ToLowerCase(token); ToLowerCase(token);
NS_ConvertASCIItoUTF16 wtoken(token); NS_ConvertASCIItoUTF16 wtoken(token);
if (CheckStringFlag(kApplication, wtoken, appID, stApp) || if (CheckStringFlag(kApplication, wtoken, appID, stApp) ||
CheckStringFlag(kOs, wtoken, osTarget, stOs) || CheckStringFlag(kOs, wtoken, osTarget, stOs) ||
CheckStringFlag(kABI, wtoken, abi, stABI) || CheckStringFlag(kABI, wtoken, abi, stABI) ||
+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || + CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) ||
CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) ||
CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) ||
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion))
continue; continue;
#if defined(MOZ_WIDGET_ANDROID) #if defined(MOZ_WIDGET_ANDROID)
bool tablet = false; bool tablet = false;
if (CheckFlag(kTablet, wtoken, tablet)) { if (CheckFlag(kTablet, wtoken, tablet)) {
@@ -638,16 +647,17 @@ ParseManifest(NSLocationType type, FileL @@ -639,16 +648,17 @@ ParseManifest(NSLocationType type, FileL
} }
if (!ok || if (!ok ||
stApp == eBad || stApp == eBad ||
stAppVersion == eBad || stAppVersion == eBad ||
stGeckoVersion == eBad || stGeckoVersion == eBad ||
stOs == eBad || stOs == eBad ||
stOsVersion == eBad || stOsVersion == eBad ||
+ stDesktop == eBad || + stDesktop == eBad ||
#ifdef MOZ_WIDGET_ANDROID #ifdef MOZ_WIDGET_ANDROID
stTablet == eBad || stTablet == eBad ||
#endif #endif
stABI == eBad) stABI == eBad)
continue; continue;
if (directive->regfunc) { if (directive->regfunc) {
if (GeckoProcessType_Default != XRE_GetProcessType()) if (GeckoProcessType_Default != XRE_GetProcessType())
diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
--- a/xpcom/io/Makefile.in --- a/xpcom/io/Makefile.in
+++ b/xpcom/io/Makefile.in +++ b/xpcom/io/Makefile.in
@ -3790,7 +3795,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
#include "prmem.h" #include "prmem.h"
#include "plbase64.h" #include "plbase64.h"
@@ -1795,44 +1796,51 @@ nsLocalFile::SetPersistentDescriptor(con @@ -1796,44 +1797,51 @@ nsLocalFile::SetPersistentDescriptor(con
return InitWithNativePath(aPersistentDescriptor); return InitWithNativePath(aPersistentDescriptor);
#endif #endif
} }
@ -3856,7 +3861,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
return rv; return rv;
} }
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@@ -1858,16 +1866,23 @@ nsLocalFile::Launch() @@ -1859,16 +1867,23 @@ nsLocalFile::Launch()
if (nsnull == connection) if (nsnull == connection)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;

View File

@ -9,7 +9,7 @@ retrieving revision 1.1
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -71,18 +71,24 @@ private: @@ -74,22 +74,28 @@ private:
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
}; };
@ -18,21 +18,29 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsresult nsresult
nsUnixSystemProxySettings::Init() nsUnixSystemProxySettings::Init()
{ {
- mSchemeProxySettings.Init(5);
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); - mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
- if (mGSettings) {
- mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
- getter_AddRefs(mProxySettings));
+ // If this is a GNOME session, load gconf and try to use its preferences. + // If this is a GNOME session, load gconf and try to use its preferences.
+ // If gconf is not available (which would be stupid) we'll proceed as if + // If gconf is not available (which would be stupid) we'll proceed as if
+ // this was not a GNOME session, using *_PROXY environment variables. + // this was not a GNOME session, using *_PROXY environment variables.
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); + const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) { + if (sessionType && !strcmp(sessionType, "gnome")) {
+ mSchemeProxySettings.Init(5);
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); + mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
+ } + if (mGSettings) {
+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
+ getter_AddRefs(mProxySettings));
+ }
}
return NS_OK; return NS_OK;
} }
bool bool
nsUnixSystemProxySettings::IsProxyMode(const char* aMode) nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
{ {
nsCAutoString mode;
return NS_SUCCEEDED(mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) &&

43
mozilla-nsSound.patch Normal file
View File

@ -0,0 +1,43 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Date 1336632642 -7200
# Node ID 56cc5a3c431612fa98f0550f02a9f34b566e1d9b
# Parent 307671d73258761245d165e43591d885c7f68b73
Bug 749739 - New email sound notification file cannot contain spaces (Linux - Thunderbird 12). r=karlt, a=lsblakk (upstream in FF14)
diff --git a/widget/gtk2/nsSound.cpp b/widget/gtk2/nsSound.cpp
--- a/widget/gtk2/nsSound.cpp
+++ b/widget/gtk2/nsSound.cpp
@@ -353,23 +353,28 @@ NS_METHOD nsSound::Play(nsIURL *aURL)
bool isFile;
nsresult rv = aURL->SchemeIs("file", &isFile);
if (NS_SUCCEEDED(rv) && isFile) {
ca_context* ctx = ca_context_get_default();
if (!ctx) {
return NS_ERROR_OUT_OF_MEMORY;
}
- nsCAutoString path;
- rv = aURL->GetPath(path);
+ nsCAutoString spec;
+ rv = aURL->GetSpec(spec);
if (NS_FAILED(rv)) {
return rv;
}
+ gchar *path = g_filename_from_uri(spec.get(), NULL, NULL);
+ if (!path) {
+ return NS_ERROR_FILE_UNRECOGNIZED_PATH;
+ }
- ca_context_play(ctx, 0, "media.filename", path.get(), NULL);
+ ca_context_play(ctx, 0, "media.filename", path, NULL);
+ g_free(path);
} else {
nsCOMPtr<nsIStreamLoader> loader;
rv = NS_NewStreamLoader(getter_AddRefs(loader), aURL, this);
}
return rv;
}

View File

@ -1,20 +1,20 @@
# HG changeset patch # HG changeset patch
# Parent 8ea0f829916d7d9dc54567813367bcdfe6cee179 # Parent 271b5143e89573cbbde51d0b830a6116756a52e6
diff --git a/build/Makefile.in b/build/Makefile.in diff --git a/build/Makefile.in b/build/Makefile.in
--- a/build/Makefile.in --- a/build/Makefile.in
+++ b/build/Makefile.in +++ b/build/Makefile.in
@@ -91,17 +91,17 @@ DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_ @@ -89,17 +89,17 @@ DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_
APP_INI_DEPS += $(DEPTH)/config/autoconf.mk APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)) MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template="{node|short}\n" 2>/dev/null))
ifdef MOZ_SOURCE_STAMP ifdef MOZ_SOURCE_STAMP
DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)" DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
endif endif
_dollar=$$ _dollar=$$
-SOURCE_REPO := $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" ) -SOURCE_REPO := $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
+SOURCE_REPO ?= $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" ) +SOURCE_REPO ?= $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
ifdef SOURCE_REPO ifdef SOURCE_REPO
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)" DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
endif endif
@ -26,7 +26,7 @@ diff --git a/build/Makefile.in b/build/Makefile.in
diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in
--- a/toolkit/content/Makefile.in --- a/toolkit/content/Makefile.in
+++ b/toolkit/content/Makefile.in +++ b/toolkit/content/Makefile.in
@@ -65,17 +65,17 @@ endif @@ -67,17 +67,17 @@ endif
ifeq (Android,$(OS_TARGET)) ifeq (Android,$(OS_TARGET))
DEFINES += -DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME) DEFINES += -DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME)
endif endif
@ -43,8 +43,8 @@ diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in
DEFINES += -DSOURCE_REPO="$(SOURCE_REPO)" DEFINES += -DSOURCE_REPO="$(SOURCE_REPO)"
endif endif
ifdef MOZ_TOOLKIT_SEARCH BUILD_HOSTNAME = $(shell hostname -s || hostname)
DEFINES += -DMOZ_TOOLKIT_SEARCH DEFINES += -DBUILD_HOSTNAME="$(BUILD_HOSTNAME)"
diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk
--- a/toolkit/mozapps/installer/package-name.mk --- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk +++ b/toolkit/mozapps/installer/package-name.mk
@ -74,7 +74,7 @@ diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/install
diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
--- a/toolkit/xre/Makefile.in --- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in
@@ -236,17 +236,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR @@ -229,17 +229,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR
endif endif
endif endif

27
mozilla-system-nspr.patch Normal file
View File

@ -0,0 +1,27 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent e94edfdb1f5bd5c29dc54cfb83768f9c84f3f4de
Bug 736854 - PHal.ipdl includes NSPR incorrectly - breaking system NSPR usage
diff --git a/hal/sandbox/PHal.ipdl b/hal/sandbox/PHal.ipdl
--- a/hal/sandbox/PHal.ipdl
+++ b/hal/sandbox/PHal.ipdl
@@ -34,17 +34,17 @@
* 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 ***** */
include protocol PContent;
include protocol PBrowser;
-include "nspr/prtime.h";
+include "prtime.h";
include "mozilla/HalSensor.h";
include "mozilla/HalTypes.h";
using PRTime;
using mozilla::hal::FlashMode;
using mozilla::hal::LightType;
using mozilla::hal::LightMode;
using mozilla::hal::SensorType;

View File

@ -1,40 +1,42 @@
# HG changeset patch
# Parent 58dd942011a81f3149d9bc34e808806bda099056
# User Landry Breuil <landry@openbsd.org>
Use YARR interpreter instead of PCRE on platforms where YARR JIT is not
supported
diff --git a/js/src/Makefile.in b/js/src/Makefile.in diff --git a/js/src/Makefile.in b/js/src/Makefile.in
--- a/js/src/Makefile.in --- a/js/src/Makefile.in
+++ b/js/src/Makefile.in +++ b/js/src/Makefile.in
@@ -335,25 +335,29 @@ CPPSRCS += checks.cc \ @@ -332,30 +332,33 @@ CPPSRCS += checks.cc \
platform.cc \
utils.cc \
$(NONE)
#
# END enclude sources for V8 dtoa # END enclude sources for V8 dtoa
############################################# #############################################
# For architectures without YARR JIT, PCRE is faster than the YARR -# For architectures without YARR JIT, PCRE is faster than the YARR
# interpreter (bug 684559). -# interpreter (bug 684559).
-
ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU)))
-VPATH += $(srcdir)/yarr/pcre \ -VPATH += $(srcdir)/yarr/pcre \
+VPATH += $(srcdir)/assembler \ +VPATH += $(srcdir)/assembler \
+ $(srcdir)/assembler/wtf \ + $(srcdir)/assembler/wtf \
+ $(srcdir)/yarr \ + $(srcdir)/assembler/jit \
+ $(srcdir)/yarr \
$(NULL) $(NULL)
CPPSRCS += \ -CPPSRCS += \
- pcre_compile.cpp \ - pcre_compile.cpp \
- pcre_exec.cpp \ - pcre_exec.cpp \
- pcre_tables.cpp \ - pcre_tables.cpp \
- pcre_xclass.cpp \ - pcre_xclass.cpp \
- pcre_ucp_searchfuncs.cpp \ - pcre_ucp_searchfuncs.cpp \
+ OSAllocatorOS2.cpp \ +CPPSRCS += ExecutableAllocator.cpp \
+ OSAllocatorPosix.cpp \ + ExecutableAllocatorPosix.cpp \
+ OSAllocatorWin.cpp \ + OSAllocatorOS2.cpp \
+ PageBlock.cpp \ + OSAllocatorPosix.cpp \
+ YarrInterpreter.cpp \ + OSAllocatorWin.cpp \
+ YarrPattern.cpp \ + PageBlock.cpp \
+ YarrSyntaxChecker.cpp \ + YarrInterpreter.cpp \
+ YarrPattern.cpp \
+ YarrSyntaxChecker.cpp \
$(NULL) $(NULL)
else else
@ -43,203 +45,32 @@ diff --git a/js/src/Makefile.in b/js/src/Makefile.in
# #
ENABLE_YARR_JIT = 1 ENABLE_YARR_JIT = 1
@@ -878,20 +882,20 @@ endif diff --git a/js/src/assembler/jit/ExecutableAllocator.h b/js/src/assembler/jit/ExecutableAllocator.h
--- a/js/src/assembler/jit/ExecutableAllocator.h
############################################### +++ b/js/src/assembler/jit/ExecutableAllocator.h
# BEGIN kludges for the Nitro assembler @@ -462,18 +462,16 @@ public:
# : "r" (code), "r" (reinterpret_cast<char*>(code) + size)
: "r0", "r1", "r2");
# Needed to "configure" it correctly. Unfortunately these }
# flags wind up being applied to all code in js/src, not just #elif WTF_CPU_SPARC
# the code in js/src/assembler. static void cacheFlush(void* code, size_t size)
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 {
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 sync_instruction_memory((caddr_t)code, size);
}
ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_METHODJIT)) -#else
-CXXFLAGS += -DENABLE_JIT=1 - #error "The cacheFlush support is missing on this platform."
+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
endif
INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
ifdef ENABLE_METHODJIT
# Build a standalone test program that exercises the assembler
# sources a bit.
TESTMAIN_OBJS = \
diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -696,17 +696,19 @@ JS_IsBuiltinFunctionConstructor(JSFuncti
static JSBool js_NewRuntimeWasCalled = JS_FALSE;
JSRuntime::JSRuntime()
: atomsCompartment(NULL),
#ifdef JS_THREADSAFE
ownerThread_(NULL),
#endif #endif
tempLifoAlloc(TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE),
+#if ENABLE_ASSEMBLER
execAlloc_(NULL),
+#endif
bumpAlloc_(NULL),
nativeStackBase(0),
nativeStackQuota(0),
interpreterFrames(NULL),
cxCallback(NULL),
compartmentCallback(NULL),
activityCallback(NULL),
activityCallbackArg(NULL),
@@ -851,17 +853,19 @@ JSRuntime::init(uint32_t maxbytes)
nativeStackBase = GetNativeStackBase();
return true;
}
JSRuntime::~JSRuntime() private:
{
JS_ASSERT(onOwnerThread());
+#if ENABLE_ASSEMBLER #if ENABLE_ASSEMBLER_WX_EXCLUSIVE
delete_<JSC::ExecutableAllocator>(execAlloc_); static void reprotectRegion(void*, size_t, ProtectionSetting);
+#endif #endif
delete_<WTF::BumpPointerAllocator>(bumpAlloc_);
#ifdef DEBUG
/* Don't hurt everyone in leaky ol' Mozilla with a fatal JS_ASSERT! */
if (!JS_CLIST_IS_EMPTY(&contextList)) {
JSContext *cx, *iter = NULL;
uintN cxcount = 0;
while ((cx = js_ContextIterator(this, JS_TRUE, &iter)) != NULL) {
diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -100,19 +100,21 @@ JSRuntime::sizeOfExcludingThis(JSMallocS
if (normal)
*normal = mallocSizeOf(dtoaState);
if (temporary)
*temporary = tempLifoAlloc.sizeOfExcludingThis(mallocSizeOf);
if (regexpCode) {
size_t method = 0, regexp = 0, unused = 0;
+#if ENABLE_ASSEMBLER
if (execAlloc_)
execAlloc_->sizeOfCode(&method, &regexp, &unused);
JS_ASSERT(method == 0); /* this execAlloc is only used for regexp code */
+#endif
*regexpCode = regexp + unused;
}
if (stackCommitted)
*stackCommitted = stackSpace.sizeOfCommitted();
}
JS_FRIEND_API(void)
@@ -124,33 +126,37 @@ JSRuntime::triggerOperationCallback()
*/
JS_ATOMIC_SET(&interrupt, 1);
}
void
JSRuntime::setJitHardening(bool enabled)
{
jitHardening = enabled;
+#if ENABLE_ASSEMBLER
if (execAlloc_)
execAlloc_->setRandomize(enabled);
+#endif
}
+#if ENABLE_ASSEMBLER
JSC::ExecutableAllocator *
JSRuntime::createExecutableAllocator(JSContext *cx)
{
JS_ASSERT(!execAlloc_);
JS_ASSERT(cx->runtime == this);
JSC::AllocationBehavior randomize =
jitHardening ? JSC::AllocationCanRandomize : JSC::AllocationDeterministic;
execAlloc_ = new_<JSC::ExecutableAllocator>(randomize);
if (!execAlloc_)
js_ReportOutOfMemory(cx);
return execAlloc_;
}
+#endif
WTF::BumpPointerAllocator *
JSRuntime::createBumpPointerAllocator(JSContext *cx)
{
JS_ASSERT(!bumpAlloc_);
JS_ASSERT(cx->runtime == this);
bumpAlloc_ = new_<WTF::BumpPointerAllocator>();
diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -219,26 +219,32 @@ struct JSRuntime : js::RuntimeFriendFiel
static const size_t TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 1 << 12;
js::LifoAlloc tempLifoAlloc;
private:
/*
* Both of these allocators are used for regular expression code which is shared at the
* thread-data level.
*/
+#if ENABLE_ASSEMBLER
JSC::ExecutableAllocator *execAlloc_;
+#endif
WTF::BumpPointerAllocator *bumpAlloc_;
+#if ENABLE_ASSEMBLER
JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx);
+#endif
WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx);
public:
+#if ENABLE_ASSEMBLER
JSC::ExecutableAllocator *getExecutableAllocator(JSContext *cx) {
return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx);
}
+#endif
WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) {
return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx);
}
/* Base address of the native stack for the current thread. */
uintptr_t nativeStackBase;
/* The native stack size limit that runtime should not exceed. */
diff --git a/js/src/jsprvtd.h b/js/src/jsprvtd.h
--- a/js/src/jsprvtd.h
+++ b/js/src/jsprvtd.h
@@ -313,22 +313,23 @@ typedef Handle<BaseShape*> Handl
typedef Handle<types::TypeObject*> HandleTypeObject;
typedef Handle<JSString*> HandleString;
typedef Handle<JSAtom*> HandleAtom;
typedef Handle<jsid> HandleId;
typedef Handle<Value> HandleValue;
} /* namespace js */
+#if ENABLE_ASSEMBLER
namespace JSC {
class ExecutableAllocator;
} /* namespace JSC */
-
+#endif
namespace WTF {
class BumpPointerAllocator;
} /* namespace WTF */
} /* export "C++" */
diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
--- a/js/src/vm/RegExpObject-inl.h --- a/js/src/vm/RegExpObject-inl.h
+++ b/js/src/vm/RegExpObject-inl.h +++ b/js/src/vm/RegExpObject-inl.h
@@ -132,26 +132,28 @@ RegExpObject::setMultiline(bool enabled) @@ -132,16 +132,17 @@ RegExpObject::setMultiline(bool enabled)
} }
inline void inline void
@ -257,17 +88,6 @@ diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
return cx->methodJitEnabled; return cx->methodJitEnabled;
#else #else
return true; return true;
#endif
}
+#endif
inline bool
RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g)
{
JS_ASSERT(ObjectClassIs(obj, ESClass_RegExp, cx));
if (obj.isRegExp())
return obj.asRegExp().getShared(cx, g);
return Proxy::regexp_toShared(cx, &obj, g);
diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
--- a/js/src/vm/RegExpObject.cpp --- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp +++ b/js/src/vm/RegExpObject.cpp
@ -289,7 +109,7 @@ diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
JS_NOT_REACHED("Called reportYarrError with value for no error"); JS_NOT_REACHED("Called reportYarrError with value for no error");
return; return;
#define COMPILE_EMSG(__code, __msg) \ #define COMPILE_EMSG(__code, __msg) \
@@ -194,73 +193,36 @@ RegExpCode::reportYarrError(JSContext *c @@ -194,52 +193,16 @@ RegExpCode::reportYarrError(JSContext *c
COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER); COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER);
COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH); COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH);
#undef COMPILE_EMSG #undef COMPILE_EMSG
@ -335,97 +155,13 @@ diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
-#endif /* ENABLE_YARR_JIT */ -#endif /* ENABLE_YARR_JIT */
- -
bool bool
RegExpCode::compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags) RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags)
{ {
-#if ENABLE_YARR_JIT #if ENABLE_YARR_JIT
/* Parse the pattern. */ /* Parse the pattern. */
ErrorCode yarrError; ErrorCode yarrError;
YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
&yarrError); &yarrError);
if (yarrError) {
reportYarrError(cx, NULL, yarrError);
return false;
}
*parenCount = yarrPattern.m_numSubpatterns;
/*
* The YARR JIT compiler attempts to compile the parsed pattern. If
* it cannot, it informs us via |codeBlock.isFallBack()|, in which
* case we have to bytecode compile it.
*/
-#ifdef JS_METHODJIT
+#if ENABLE_YARR_JIT && defined(JS_METHODJIT)
if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx);
if (!execAlloc) {
js_ReportOutOfMemory(cx);
return false;
}
JSGlobalData globalData(execAlloc);
@@ -271,58 +233,41 @@ RegExpCode::compile(JSContext *cx, JSLin
#endif
WTF::BumpPointerAllocator *bumpAlloc = cx->runtime->getBumpPointerAllocator(cx);
if (!bumpAlloc) {
js_ReportOutOfMemory(cx);
return false;
}
+#if ENABLE_YARR_JIT
codeBlock.setFallBack(true);
+#endif
byteCode = byteCompile(yarrPattern, bumpAlloc).get();
return true;
-#else /* !defined(ENABLE_YARR_JIT) */
- int error = 0;
- compiled = jsRegExpCompile(pattern.chars(), pattern.length(),
- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase,
- multiline() ? JSRegExpMultiline : JSRegExpSingleLine,
- parenCount, &error);
- if (error) {
- reportPCREError(cx, error);
- return false;
- }
- return true;
-#endif
}
RegExpRunStatus
RegExpCode::execute(JSContext *cx, const jschar *chars, size_t length, size_t start,
int *output, size_t outputCount)
{
int result;
#if ENABLE_YARR_JIT
(void) cx; /* Unused. */
if (codeBlock.isFallBack())
result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
else
result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
#else
- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount);
+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
#endif
if (result == -1)
return RegExpRunStatus_Success_NotFound;
-#if !ENABLE_YARR_JIT
- if (result < 0) {
- reportPCREError(cx, result);
- return RegExpRunStatus_Error;
- }
-#endif
-
JS_ASSERT(result >= 0);
return RegExpRunStatus_Success;
}
/* RegExpObject */
static void
regexp_trace(JSTracer *trc, JSObject *obj)
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
--- a/js/src/vm/RegExpObject.h --- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h +++ b/js/src/vm/RegExpObject.h
@ -451,91 +187,6 @@ diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
* *
* RegExpObject - The JS-visible object whose .[[Class]] equals "RegExp" * RegExpObject - The JS-visible object whose .[[Class]] equals "RegExp"
* *
@@ -107,78 +105,61 @@ class RegExpObjectBuilder
JSObject *
CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto);
namespace detail {
class RegExpCode
{
-#if ENABLE_YARR_JIT
typedef JSC::Yarr::BytecodePattern BytecodePattern;
typedef JSC::Yarr::ErrorCode ErrorCode;
+ typedef JSC::Yarr::YarrPattern YarrPattern;
+#if ENABLE_YARR_JIT
typedef JSC::Yarr::JSGlobalData JSGlobalData;
typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock;
- typedef JSC::Yarr::YarrPattern YarrPattern;
/* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
YarrCodeBlock codeBlock;
+#endif
BytecodePattern *byteCode;
-#else
- JSRegExp *compiled;
-#endif
public:
RegExpCode()
:
#if ENABLE_YARR_JIT
codeBlock(),
+#endif
byteCode(NULL)
-#else
- compiled(NULL)
-#endif
{ }
~RegExpCode() {
#if ENABLE_YARR_JIT
codeBlock.release();
+#endif
if (byteCode)
Foreground::delete_<BytecodePattern>(byteCode);
-#else
- if (compiled)
- jsRegExpFree(compiled);
-#endif
}
static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) {
-#if ENABLE_YARR_JIT
ErrorCode error = JSC::Yarr::checkSyntax(*source);
if (error == JSC::Yarr::NoError)
return true;
reportYarrError(cx, tokenStream, error);
return false;
-#else
-# error "Syntax checking not implemented for !ENABLE_YARR_JIT"
-#endif
}
#if ENABLE_YARR_JIT
static inline bool isJITRuntimeEnabled(JSContext *cx);
+#endif
static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
-#else
- static void reportPCREError(JSContext *cx, int error);
-#endif
static size_t getOutputSize(size_t pairCount) {
-#if ENABLE_YARR_JIT
return pairCount * 2;
-#else
- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
-#endif
}
bool compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags);
RegExpRunStatus
execute(JSContext *cx, const jschar *chars, size_t length, size_t start,
int *output, size_t outputCount);
diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
--- a/js/src/yarr/wtfbridge.h --- a/js/src/yarr/wtfbridge.h
+++ b/js/src/yarr/wtfbridge.h +++ b/js/src/yarr/wtfbridge.h

View File

@ -1,2 +1,2 @@
REV=a294a5b4f12d REV=2b643ea8edf9
REPO=http://hg.mozilla.org/releases/mozilla-release REPO=http://hg.mozilla.org/releases/mozilla-release