1
0

Accepting request 108974 from mozilla:Factory

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/108974
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaFirefox?expand=0&rev=145
This commit is contained in:
Stephan Kulow 2012-03-13 08:36:55 +00:00 committed by Git OBS Bridge
commit 2c4f5a31ac
23 changed files with 786 additions and 822 deletions

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Mar 5 13:31:48 UTC 2012 - vdziewiecki@suse.com
- add Provides: browser(npapi) FATE#313084
-------------------------------------------------------------------
Tue Feb 28 07:25:08 UTC 2012 - wr@rosenauer.org
- update to version 11.0b5
- ported and reenabled KDE integration (bnc#746591)
- explicitely build-require X libs
-------------------------------------------------------------------
Fri Feb 17 17:41:11 UTC 2012 - pcerny@suse.com
- better plugin directory resolution (bnc#747320)
-------------------------------------------------------------------
Thu Feb 16 08:47:31 UTC 2012 - wr@rosenauer.org

View File

@ -18,7 +18,7 @@
%define major 10
%define mainver %major.0.2
%define mainver %major.99
Name: MozillaFirefox
BuildRequires: Mesa-devel
@ -34,6 +34,7 @@ BuildRequires: python
BuildRequires: startup-notification-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-libXt-devel
BuildRequires: yasm
BuildRequires: zip
%if %suse_version > 1110
@ -42,19 +43,20 @@ BuildRequires: libproxy-devel
%else
BuildRequires: wireless-tools
%endif
BuildRequires: mozilla-nspr-devel >= 4.8.9
BuildRequires: mozilla-nss-devel >= 3.13.1
BuildRequires: mozilla-nspr-devel >= 4.9.0
BuildRequires: mozilla-nss-devel >= 3.13.3
BuildRequires: nss-shared-helper-devel
Version: %{mainver}
Release: 0
%define releasedate 2012021500
Provides: web_browser
Provides: firefox = %{version}-%{release}
%define releasedate 2012022900
Provides: firefox = %{mainver}
Provides: firefox = %{version}-%{release}
Provides: web_browser
# this is needed to match this package with the kde4 helper package without the main package
# having a hard requirement on the kde4 package
%define kde_helper_version 6
Provides: mozilla-kde4-version = %{kde_helper_version}
Provides: browser(npapi)
Summary: Mozilla Firefox Web Browser
License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Group: Productivity/Networking/Web/Browsers
@ -86,10 +88,8 @@ Patch9: mozilla-repo.patch
Patch10: mozilla-dump_syms-static.patch
Patch11: mozilla-sle11.patch
Patch12: mozilla-linux3.patch
Patch13: mozilla-a11y.patch
Patch14: mozilla-disable-neon-option.patch
Patch15: mozilla-bmo703534.patch
Patch16: mozilla-yarr-pcre.patch
Patch15: mozilla-yarr-pcre.patch
# Firefox/browser
Patch31: firefox-browser-css.patch
Patch32: firefox-cross-desktop.patch
@ -101,9 +101,9 @@ Patch41: firefox-branded-icons.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): coreutils shared-mime-info desktop-file-utils
Requires(postun): shared-mime-info desktop-file-utils
Requires: %{name}-branding > 4.0
Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
Requires: %{name}-branding > 4.0
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%define _use_internal_dependency_generator 0
%define __find_requires sh %{SOURCE4}
@ -137,8 +137,8 @@ Summary: Devel package for Firefox
Group: Development/Tools/Other
Provides: firefox-devel = %{version}-%{release}
Requires: %{name} = %{version}
Requires: perl(XML::Simple)
Requires: perl(Archive::Zip)
Requires: perl(XML::Simple)
%description devel
Development files for Firefox to make packaging of addons easier.
@ -206,7 +206,7 @@ cd $RPM_BUILD_DIR/mozilla
%patch2 -p1
%patch3 -p1
%patch4 -p1
#%patch5 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
@ -216,18 +216,16 @@ cd $RPM_BUILD_DIR/mozilla
%patch11 -p1
%endif
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
#%patch15 -p1
#
%patch31 -p1
%patch32 -p1
%if %suse_version >= 1110
#%patch33 -p1
%patch33 -p1
%endif
%if %suse_version >= 1140
#%patch34 -p1
%patch34 -p1
%endif
%patch38 -p1
%patch39 -p1
@ -240,11 +238,11 @@ DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
#
#kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
#if test "$kdehelperversion" != %{kde_helper_version}; then
# echo fix kde helper version in the .spec file
# exit 1
#fi
kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
if test "$kdehelperversion" != %{kde_helper_version}; then
echo fix kde helper version in the .spec file
exit 1
fi
source %{SOURCE5}
export MOZ_SOURCE_STAMP=$REV
export SOURCE_REPO=$REPO
@ -282,7 +280,7 @@ ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-startup-notification
#ac_add_options --enable-chrome-format=jar
ac_add_options --enable-update-channel=release
ac_add_options --enable-update-channel=beta
EOF
%if %suse_version > 1130
cat << EOF >> $MOZCONFIG

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9ef03e912b119f21ce100c4423cac0303339b344fe2d6d0a2f1aa1f4a9bf5e24
size 25686
oid sha256:ed6f2335b5fb457f70d9d30566b2546f2f513514f620e35cfa86523762da6208
size 29353

View File

@ -1,9 +1,9 @@
#!/bin/bash
CHANNEL="release"
CHANNEL="beta"
BRANCH="releases/mozilla-$CHANNEL"
RELEASE_TAG="FIREFOX_10_0_2_RELEASE"
VERSION="10.0.2"
RELEASE_TAG="FIREFOX_11_0b5_RELEASE"
VERSION="10.99"
# mozilla
hg clone http://hg.mozilla.org/$BRANCH mozilla

View File

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

View File

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

View File

@ -1,11 +1,11 @@
# HG changeset patch
# Parent 87462739809ad0f41fd335f9a68203fd70f9883c
# Parent efffa19fa0b2530d2aca1ebd5b885a6fc68e51de
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -194,16 +194,21 @@ DEFINES += -DMOZILLA_OFFICIAL
endif
@@ -169,16 +169,21 @@ endif # LIBXUL_SDK
DEFINES += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
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
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -415,18 +415,21 @@
@@ -424,18 +424,21 @@
#ifdef SHIP_FEEDBACK
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi
#endif

View File

@ -6,10 +6,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=478632
wr: changed because of
https://bugzilla.novell.com/show_bug.cgi?id=561027
diff --git a/browser/themes/gnomestripe/browser/browser.css b/browser/themes/gnomestripe/browser/browser.css
--- a/browser/themes/gnomestripe/browser/browser.css
+++ b/browser/themes/gnomestripe/browser/browser.css
@@ -954,16 +954,30 @@ toolbar[iconsize="small"] #feed-button {
diff --git a/browser/themes/gnomestripe/browser.css b/browser/themes/gnomestripe/browser.css
--- a/browser/themes/gnomestripe/browser.css
+++ b/browser/themes/gnomestripe/browser.css
@@ -1018,16 +1018,30 @@ toolbar[iconsize="small"] #feed-button {
}
#urlbar-display {
@ -33,10 +33,10 @@ diff --git a/browser/themes/gnomestripe/browser/browser.css b/browser/themes/gno
+}
+
/* Favicon */
#page-proxy-favicon,
#urlbar-throbber {
#page-proxy-favicon {
width: 16px;
height: 16px;
}
#page-proxy-stack {
width: 24px;

View File

@ -2,7 +2,7 @@ diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser
new file mode 100644
--- /dev/null
+++ b/browser/base/content/browser-kde.xul
@@ -0,0 +1,1111 @@
@@ -0,0 +1,1125 @@
+#filter substitution
+<?xml version="1.0"?>
+# -*- Mode: HTML -*-
@ -42,6 +42,7 @@ new file mode 100644
+# Patrick Walton <pcwalton@mozilla.com>
+# David Dahl <ddahl@mozilla.com>
+# Frank Yan <fyan@mozilla.com>
+# Victor Porof <vporof@mozilla.com>
+#
+# 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
@ -59,7 +60,8 @@ new file mode 100644
+
+<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
+<?xml-stylesheet href="chrome://global/skin/webConsole.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/devtools/webconsole.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
+
+<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
@ -284,7 +286,11 @@ new file mode 100644
+ if (gContextMenu.shouldDisplay)
+ updateEditUIVisibility();
+ return gContextMenu.shouldDisplay;"
+ onpopuphiding="if (event.target == this) { gContextMenu = null; updateEditUIVisibility(); }">
+ onpopuphiding="if (event.target != this)
+ return;
+ gContextMenu.hiding();
+ gContextMenu = null;
+ updateEditUIVisibility();">
+#include browser-context.inc
+ </menupopup>
+
@ -517,8 +523,6 @@ new file mode 100644
+ ontextentered="this.handleCommand(param);"
+ ontextreverted="return this.handleRevert();"
+ pageproxystate="invalid"
+ onsearchbegin="LocationBarHelpers._searchBegin();"
+ onsearchcomplete="LocationBarHelpers._searchComplete();"
+ onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
+ onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
+ <box id="notification-popup-box" hidden="true" align="center">
@ -539,7 +543,6 @@ new file mode 100644
+ <hbox id="identity-box-inner" align="center">
+ <stack id="page-proxy-stack"
+ onclick="PageProxyClickHandler(event);">
+ <image id="urlbar-throbber" busy="false"/>
+ <image id="page-proxy-favicon" validate="never"
+ pageproxystate="invalid"
+ onerror="this.removeAttribute('src');"/>
@ -974,14 +977,16 @@ new file mode 100644
+ <splitter id="devtools-side-splitter" hidden="true"/>
+ <vbox id="devtools-sidebar-box" hidden="true"
+ style="min-width: 18em; width: 22em; max-width: 42em;" persist="width">
+ <toolbar id="devtools-sidebar-toolbar" nowindowdrag="true"/>
+ <toolbar id="devtools-sidebar-toolbar"
+ class="devtools-toolbar"
+ nowindowdrag="true"/>
+ <deck id="devtools-sidebar-deck" flex="1"/>
+ </vbox>
+ <vbox id="browser-border-end" hidden="true" layer="true"/>
+ </hbox>
+
+ <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
+ <hbox style="min-width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
+ <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
+ <hbox id="full-screen-warning-message">
+ <description id="full-screen-warning-text" value="&domFullScreenWarning.label;"></description>
+ </hbox>
@ -990,6 +995,7 @@ new file mode 100644
+
+ <vbox id="browser-bottombox" layer="true">
+ <toolbar id="inspector-toolbar"
+ class="devtools-toolbar"
+ nowindowdrag="true"
+ hidden="true">
+ <vbox flex="1">
@ -1004,6 +1010,7 @@ new file mode 100644
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
+#endif
+ <toolbarbutton id="inspector-inspect-toolbutton"
+ class="devtools-toolbarbutton"
+ label="&inspectButton.label;"
+ accesskey="&inspectButton.accesskey;"
+ command="Inspector:Inspect"/>
@ -1011,7 +1018,14 @@ new file mode 100644
+ flex="1" orient="horizontal"
+ clicktoscroll="true"/>
+ <hbox id="inspector-tools">
+ <toolbarbutton id="inspector-3D-button"
+ class="devtools-toolbarbutton"
+ hidden="true"
+ label="&inspect3DButton.label;"
+ accesskey="&inspect3DButton.accesskey;"
+ command="Inspector:Tilt"/>
+ <toolbarbutton id="inspector-style-button"
+ class="devtools-toolbarbutton"
+ label="&inspectStyleButton.label;"
+ accesskey="&inspectStyleButton.accesskey;"
+ command="Inspector:Sidebar"/>
@ -1153,12 +1167,12 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
#endif
#include "nsProfileMigrator.h"
#if !defined(XP_OS2)
#include "nsOperaProfileMigrator.h"
#endif
#if defined(XP_WIN) && !defined(__MINGW32__)
#include "nsIEProfileMigrator.h"
@@ -71,18 +71,16 @@ using namespace mozilla::browser;
#elif defined(XP_MACOSX)
#include "nsSafariProfileMigrator.h"
#endif
@@ -68,18 +68,16 @@ using namespace mozilla::browser;
/////////////////////////////////////////////////////////////////////////////
@ -1171,13 +1185,13 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
#endif
#if !defined(XP_OS2)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
#if defined(XP_WIN) && !defined(__MINGW32__)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
@@ -114,17 +112,17 @@ NS_DEFINE_NAMED_CID(NS_OPERAPROFILEMIGRA
#elif defined(XP_MACOSX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafariProfileMigrator)
#endif
@@ -105,17 +103,17 @@ NS_DEFINE_NAMED_CID(NS_SAFARIPROFILEMIGR
#endif
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
@ -1199,7 +1213,7 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
--- a/browser/components/preferences/advanced.js
+++ b/browser/components/preferences/advanced.js
@@ -690,24 +690,42 @@ var gAdvancedPane = {
@@ -697,24 +697,42 @@ var gAdvancedPane = {
var brandBundle = document.getElementById("bundleBrand");
var shellBundle = document.getElementById("bundleShell");
var brandShortName = brandBundle.getString("brandShortName");
@ -1246,7 +1260,7 @@ diff --git a/browser/components/preferences/advanced.js b/browser/components/pre
diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
--- a/browser/components/shell/src/Makefile.in
+++ b/browser/components/shell/src/Makefile.in
@@ -52,17 +52,18 @@ endif
@@ -51,17 +51,18 @@ endif
ifeq ($(OS_ARCH),WINNT)
CPPSRCS = nsWindowsShellService.cpp
@ -1270,7 +1284,7 @@ diff --git a/browser/components/shell/src/nsKDEShellService.cpp b/browser/compon
new file mode 100644
--- /dev/null
+++ b/browser/components/shell/src/nsKDEShellService.cpp
@@ -0,0 +1,193 @@
@@ -0,0 +1,257 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
@ -1316,6 +1330,9 @@ new file mode 100644
+#include "nsILocalFile.h"
+#include "nsServiceManagerUtils.h"
+#include "nsComponentManagerUtils.h"
+#include "nsIMutableArray.h"
+#include "nsISupportsPrimitives.h"
+#include "nsArrayUtils.h"
+
+nsresult
+nsKDEShellService::Init()
@ -1331,13 +1348,23 @@ new file mode 100644
+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
+ bool* aIsDefaultBrowser)
+ {
+ *aIsDefaultBrowser = PR_FALSE;
+ *aIsDefaultBrowser = false;
+ if (aStartupCheck)
+ mCheckedThisSession = PR_TRUE;
+ nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
+ mCheckedThisSession = true;
+
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!str)
+ return NS_ERROR_FAILURE;
+
+ str->SetData( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
+ command->AppendElement( str, false );
+
+ if( nsKDEUtils::command( command ))
+ *aIsDefaultBrowser = PR_TRUE;
+ *aIsDefaultBrowser = true;
+ return NS_OK;
+ }
+
@ -1345,9 +1372,21 @@ new file mode 100644
+nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
+ bool aForAllUsers)
+ {
+ nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
+ command.AppendElement( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!cmdstr || !paramstr)
+ return NS_ERROR_FAILURE;
+
+ cmdstr->SetData( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
+ command->AppendElement( cmdstr, false );
+
+ paramstr->SetData( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
+ command->AppendElement( paramstr, false );
+
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
+
@ -1357,7 +1396,7 @@ new file mode 100644
+ // If we've already checked, the browser has been started and this is a
+ // new window open, and we don't want to check again.
+ if (mCheckedThisSession) {
+ *aResult = PR_FALSE;
+ *aResult = false;
+ return NS_OK;
+ }
+
@ -1387,7 +1426,7 @@ new file mode 100644
+}
+
+NS_IMETHODIMP
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
+ PRInt32 aPosition)
+ {
+ return NS_ERROR_NOT_IMPLEMENTED;
@ -1408,26 +1447,47 @@ new file mode 100644
+NS_IMETHODIMP
+nsKDEShellService::OpenApplication(PRInt32 aApplication)
+ {
+ nsTArray<nsCString> command;
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!str)
+ return NS_ERROR_FAILURE;
+
+ if( aApplication == APPLICATION_MAIL )
+ command.AppendElement( NS_LITERAL_CSTRING( "OPENMAIL" ));
+ str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
+ else if( aApplication == APPLICATION_NEWS )
+ command.AppendElement( NS_LITERAL_CSTRING( "OPENNEWS" ));
+ str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
+ else
+ return NS_ERROR_NOT_IMPLEMENTED;
+
+ command->AppendElement( str, false );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
+
+NS_IMETHODIMP
+nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
+ {
+ nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "RUN" ));
+ nsCString app;
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if (!command)
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ nsCOMPtr<nsISupportsCString> appstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ nsCOMPtr<nsISupportsCString> uristr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if (!cmdstr || !appstr || !uristr)
+ return NS_ERROR_FAILURE;
+
+ cmdstr->SetData( NS_LITERAL_CSTRING( "RUN" ));
+ command->AppendElement( cmdstr, false );
+ nsCAutoString app;
+ nsresult rv = aApplication->GetNativePath( app );
+ NS_ENSURE_SUCCESS( rv, rv );
+ command.AppendElement( app );
+ command.AppendElement( aURI );
+ appstr->SetData( app );
+ command->AppendElement( appstr, false );
+ uristr->SetData( aURI );
+ command->AppendElement( uristr, false );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
+
@ -1436,14 +1496,32 @@ new file mode 100644
+ {
+ *_retval = nsnull;
+
+ nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
+ nsTArray<nsCString> output;
+ if( !nsKDEUtils::command( command, &output ) || output.Length() != 1 )
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if( !command )
+ return NS_ERROR_FAILURE;
+
+ nsCString path;
+ path = output[ 0 ];
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if( !str )
+ return NS_ERROR_FAILURE;
+
+ str->SetData( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
+ command->AppendElement( str, false );
+
+ nsCOMPtr<nsIArray> output;
+ if( !nsKDEUtils::command( command, getter_AddRefs( output ) ) )
+ return NS_ERROR_FAILURE;
+
+ PRUint32 length;
+ output->GetLength( &length );
+ if( length != 1 )
+ return NS_ERROR_FAILURE;
+
+ nsCOMPtr<nsISupportsCString> resstr = do_QueryElementAt( output, 0 );
+ if( !resstr )
+ return NS_ERROR_FAILURE;
+
+ nsCAutoString path;
+ resstr->GetData( path );
+ if (path.IsEmpty())
+ return NS_ERROR_FAILURE;
+
@ -1638,7 +1716,7 @@ new file mode 100644
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -426,16 +426,17 @@
@@ -440,16 +440,17 @@
#endif
#endif

View File

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

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

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

View File

@ -1,415 +0,0 @@
# HG changeset patch
# User Michael Gorse <mgorse@suse.com>
# Parent 2c115988d04c0a0a8cb75b3a597ecdb2c4c001c9
a11y only enabled from Gnome 2's GConf setting
https://bugzilla.novell.com/show_bug.cgi?id=732898
https://bugzilla.mozilla.org/show_bug.cgi?id=693343
diff --git a/accessible/src/atk/Makefile.in b/accessible/src/atk/Makefile.in
--- a/accessible/src/atk/Makefile.in
+++ b/accessible/src/atk/Makefile.in
@@ -87,15 +87,19 @@ EXPORTS = \
# we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk
CFLAGS += $(MOZ_GTK2_CFLAGS)
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
+ifdef MOZ_ENABLE_DBUS
+CXXFLAGS += $(MOZ_DBUS_CFLAGS)
+endif
+
LOCAL_INCLUDES += \
-I$(srcdir) \
-I$(srcdir)/../base \
-I$(srcdir)/../html \
-I$(srcdir)/../xul \
-I$(topsrcdir)/other-licenses/atk-1.0 \
$(NULL)
diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src/atk/nsApplicationAccessibleWrap.cpp
--- a/accessible/src/atk/nsApplicationAccessibleWrap.cpp
+++ b/accessible/src/atk/nsApplicationAccessibleWrap.cpp
@@ -47,29 +47,29 @@
#include "nsIPrefBranch.h"
#include "nsIServiceManager.h"
#include "nsAutoPtr.h"
#include "nsAccessibilityService.h"
#include "AtkSocketAccessible.h"
#include <gtk/gtk.h>
#include <atk/atk.h>
+#ifdef MOZ_ENABLE_DBUS
+#include <dbus/dbus.h>
+#endif
+
+using namespace mozilla::a11y;
typedef GType (* AtkGetTypeType) (void);
GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
static bool sATKChecked = false;
static PRLibrary *sATKLib = nsnull;
static const char sATKLibName[] = "libatk-1.0.so.0";
static const char sATKHyperlinkImplGetTypeSymbol[] =
"atk_hyperlink_impl_get_type";
-static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
-static const char sSysPrefService [] =
- "@mozilla.org/system-preference-service;1";
-static const char sAccessibilityKey [] =
- "config.use_system_prefs.accessibility";
/* gail function pointer */
static guint (* gail_add_global_event_listener) (GSignalEmissionHook listener,
const gchar *event_type);
static void (* gail_remove_global_event_listener) (guint remove_listener);
static void (* gail_remove_key_event_listener) (guint remove_listener);
static AtkObject * (*gail_get_root) (void);
@@ -609,36 +609,17 @@ toplevel_event_watcher(GSignalInvocation
}
return TRUE;
}
bool
nsApplicationAccessibleWrap::Init()
{
- // XXX following code is copied from widget/src/gtk2/nsWindow.cpp
- // we should put it to somewhere that can be used from both modules
- // see bug 390761
-
- // check if accessibility enabled/disabled by environment variable
- bool isGnomeATEnabled = false;
- const char *envValue = PR_GetEnv(sAccEnv);
- if (envValue) {
- isGnomeATEnabled = !!atoi(envValue);
- } else {
- //check gconf-2 setting
- nsresult rv;
- nsCOMPtr<nsIPrefBranch> sysPrefService =
- do_GetService(sSysPrefService, &rv);
- if (NS_SUCCEEDED(rv) && sysPrefService) {
- sysPrefService->GetBoolPref(sAccessibilityKey, &isGnomeATEnabled);
- }
- }
-
- if (isGnomeATEnabled) {
+ if (ShouldA11yBeEnabled()) {
// load and initialize gail library
nsresult rv = LoadGtkModule(sGail);
if (NS_SUCCEEDED(rv)) {
(*sGail.init)();
}
else {
MAI_LOG_DEBUG(("Fail to load lib: %s\n", sGail.libName));
}
@@ -877,8 +858,129 @@ LoadGtkModule(GnomeAccessibilityModule&
aModule.init ? aModule.shutdownName : aModule.initName,
aModule.libName));
PR_UnloadLibrary(aModule.lib);
aModule.lib = NULL;
return NS_ERROR_FAILURE;
}
return NS_OK;
}
+
+namespace mozilla {
+namespace a11y {
+
+#ifdef MOZ_ENABLE_DBUS
+ static DBusPendingCall *a11yPendingCall = NULL;
+#endif
+
+void
+PreInit()
+{
+ static bool sChecked = false;
+ if (sChecked)
+ return;
+ sChecked = true;
+ DBusError error;
+ dbus_error_init(&error);
+ DBusConnection* bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
+ if (!bus)
+ return;
+ dbus_connection_set_exit_on_disconnect(bus, false);
+
+ DBusMessage *message;
+ message = dbus_message_new_method_call("org.a11y.Bus", "/org/a11y/bus",
+ "org.freedesktop.DBus.Properties",
+ "Get");
+ if (!message)
+ goto dbus_done;
+
+ static const char* iface = "org.a11y.Status";
+ static const char* member = "IsEnabled";
+ dbus_message_append_args(message, DBUS_TYPE_STRING, &iface,
+ DBUS_TYPE_STRING, &member, DBUS_TYPE_INVALID);
+ dbus_connection_send_with_reply(bus, message, &a11yPendingCall, 1000);
+
+dbus_done:
+ if (message)
+ dbus_message_unref(message);
+ if (bus)
+ dbus_connection_unref(bus);
+ dbus_error_free(&error);
+}
+
+bool
+ShouldA11yBeEnabled()
+{
+ static bool sChecked = false, sShouldEnable = false;
+ if (sChecked)
+ return sShouldEnable;
+
+ sChecked = true;
+
+ // check if accessibility enabled/disabled by environment variable
+ static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
+ const char* envValue = PR_GetEnv(sAccEnv);
+ if (envValue)
+ return sShouldEnable = !!atoi(envValue);
+
+#ifdef MOZ_ENABLE_DBUS
+ PreInit();
+ bool dbusSuccess = false;
+ DBusMessage *reply = nsnull;
+ if (a11yPendingCall) {
+ dbus_pending_call_block(a11yPendingCall);
+ reply = dbus_pending_call_steal_reply(a11yPendingCall);
+ dbus_pending_call_unref(a11yPendingCall);
+ a11yPendingCall = nsnull;
+ }
+ if (!reply ||
+ dbus_message_get_type(reply) != DBUS_MESSAGE_TYPE_METHOD_RETURN ||
+ strcmp(dbus_message_get_signature (reply), "v"))
+ goto dbus_done;
+
+ DBusMessageIter iter, iter_variant, iter_struct;
+ dbus_bool_t dResult;
+ dbus_message_iter_init(reply, &iter);
+ dbus_message_iter_recurse (&iter, &iter_variant);
+ switch (dbus_message_iter_get_arg_type(&iter_variant)) {
+ case DBUS_TYPE_STRUCT:
+ // at-spi2-core 2.2.0-2.2.1 had a bug where it returned a struct
+ dbus_message_iter_recurse(&iter_variant, &iter_struct);
+ if (dbus_message_iter_get_arg_type(&iter_struct) == DBUS_TYPE_BOOLEAN) {
+ dbus_message_iter_get_basic(&iter_struct, &dResult);
+ sShouldEnable = dResult;
+ dbusSuccess = true;
+ }
+
+ break;
+ case DBUS_TYPE_BOOLEAN:
+ dbus_message_iter_get_basic(&iter_variant, &dResult);
+ sShouldEnable = dResult;
+ dbusSuccess = true;
+ break;
+ default:
+ break;
+ }
+
+ dbus_done:
+ if (reply)
+ dbus_message_unref(reply);
+
+ if (dbusSuccess)
+ return sShouldEnable;
+#endif
+
+ //check gconf-2 setting
+ nsresult rv = NS_OK;
+ static const char sSysPrefService [] =
+ "@mozilla.org/system-preference-service;1";
+ static const char sAccessibilityKey [] =
+ "config.use_system_prefs.accessibility";
+ nsCOMPtr<nsIPrefBranch> sysPrefService =
+ do_GetService(sSysPrefService, &rv);
+ if (NS_SUCCEEDED(rv) && sysPrefService)
+ sysPrefService->GetBoolPref(sAccessibilityKey, &sShouldEnable);
+
+ return sShouldEnable;
+}
+} // namespace a11y
+} // namespace mozilla
+
diff --git a/accessible/src/base/nsAccessibilityService.h b/accessible/src/base/nsAccessibilityService.h
--- a/accessible/src/base/nsAccessibilityService.h
+++ b/accessible/src/base/nsAccessibilityService.h
@@ -46,16 +46,33 @@
#include "mozilla/a11y/FocusManager.h"
#include "nsIObserver.h"
namespace mozilla {
namespace a11y {
+#ifdef MOZ_ACCESSIBILITY_ATK
+/**
+ * + * Perform initialization that should be done as soon as possible, in
+ * order
+ * + * to minimize startup time.
+ * + * XXX: this function and the next defined in
+ * nsApplicationAccessibleWrap.cpp
+ * + */
+void PreInit();
+
+/**
+ * + * Is platform accessibility enabled.
+ * + * Only used on linux with atk for now.
+ * + */
+bool ShouldA11yBeEnabled();
+#endif
+
/**
* Return focus manager.
*/
FocusManager* FocusMgr();
} // namespace a11y
} // namespace mozilla
diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
--- a/widget/src/gtk2/nsWindow.cpp
+++ b/widget/src/gtk2/nsWindow.cpp
@@ -105,29 +105,21 @@
#include "nsIStringBundle.h"
#include "nsGfxCIID.h"
#include "nsIObserverService.h"
#include "nsIdleService.h"
#include "nsIPropertyBag2.h"
#ifdef ACCESSIBILITY
-#include "nsIAccessibilityService.h"
+#include "nsAccessibilityService.h"
#include "nsIAccessibleDocument.h"
-#include "prenv.h"
-#include "stdlib.h"
using namespace mozilla;
-static bool sAccessibilityChecked = false;
-/* static */
-bool nsWindow::sAccessibilityEnabled = false;
-static const char sSysPrefService [] = "@mozilla.org/system-preference-service;1";
-static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
-static const char sAccessibilityKey [] = "config.use_system_prefs.accessibility";
#endif
/* For SetIcon */
#include "nsAppDirectoryServiceDefs.h"
#include "nsXPIDLString.h"
#include "nsIFile.h"
#include "nsILocalFile.h"
@@ -1111,19 +1103,18 @@ nsWindow::Show(bool aState)
NativeResize(mBounds.x, mBounds.y, mBounds.width, mBounds.height,
false);
} else if (mNeedsResize) {
NativeResize(mBounds.width, mBounds.height, false);
}
}
#ifdef ACCESSIBILITY
- if (aState && sAccessibilityEnabled) {
+ if (aState && a11y::ShouldA11yBeEnabled())
CreateRootAccessible();
- }
#endif
NativeShow(aState);
return NS_OK;
}
NS_IMETHODIMP
@@ -3885,16 +3876,21 @@ nsWindow::Create(nsIWidget *aPare
nsIWidget *baseParent = aInitData &&
(aInitData->mWindowType == eWindowType_dialog ||
aInitData->mWindowType == eWindowType_toplevel ||
aInitData->mWindowType == eWindowType_invisible) ?
nsnull : aParent;
NS_ASSERTION(!mWindowGroup, "already have window group (leaking it)");
+#ifdef ACCESSIBILITY
+ // Send a DBus message to check whether a11y is enabled
+ a11y::PreInit();
+#endif
+
// Ensure that the toolkit is created.
nsGTKToolkit::GetToolkit();
// initialize all the common bits of this class
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext, aInitData);
// Do we need to listen for resizes?
bool listenForResizes = false;;
@@ -4278,43 +4274,16 @@ nsWindow::Create(nsIWidget *aPare
LOG(("\tmGdkWindow %p %lx\n", (void *)mGdkWindow,
gdk_x11_window_get_xid(mGdkWindow)));
}
// resize so that everything is set to the right dimensions
if (!mIsTopLevel)
Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false);
-#ifdef ACCESSIBILITY
- nsresult rv;
- if (!sAccessibilityChecked) {
- sAccessibilityChecked = true;
-
- //check if accessibility enabled/disabled by environment variable
- const char *envValue = PR_GetEnv(sAccEnv);
- if (envValue) {
- sAccessibilityEnabled = atoi(envValue) != 0;
- LOG(("Accessibility Env %s=%s\n", sAccEnv, envValue));
- }
- //check gconf-2 setting
- else {
- nsCOMPtr<nsIPrefBranch> sysPrefService =
- do_GetService(sSysPrefService, &rv);
- if (NS_SUCCEEDED(rv) && sysPrefService) {
-
- // do the work to get gconf setting.
- // will be done soon later.
- sysPrefService->GetBoolPref(sAccessibilityKey,
- &sAccessibilityEnabled);
- }
-
- }
- }
-#endif
-
#ifdef MOZ_DFB
if (!mDFB) {
DirectFBCreate( &mDFB );
D_ASSUME( mDFB != NULL );
if (mDFB)
mDFB->GetDisplayLayer( mDFB, DLID_PRIMARY, &mDFBLayer );
@@ -6504,19 +6473,18 @@ nsWindow::DispatchAccessibleEvent()
DispatchEvent(&event, status);
return event.mAccessible;
}
void
nsWindow::DispatchEventToRootAccessible(PRUint32 aEventType)
{
- if (!sAccessibilityEnabled) {
+ if (!a11y::ShouldA11yBeEnabled())
return;
- }
nsCOMPtr<nsIAccessibilityService> accService =
do_GetService("@mozilla.org/accessibilityService;1");
if (!accService) {
return;
}
// Get the root document accessible and fire event to it.

View File

@ -1,29 +0,0 @@
# HG changeset patch
# User Mike Hommey <mh+mozilla@glandium.org>
# Date 1321613368 -3600
# Node ID 15cf58eb7923d34de7e61df80fa5f8a18a995abf
# Parent aeb035da53283c56370992f254e4f79d7dd180f8
Bug 703534 - Fix build failure on platforms without YARR JIT. r=luke
target: M11
diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -45,17 +45,16 @@
#include "jsiter.h"
#include "jsmath.h"
#include "jsproxy.h"
#include "jsscope.h"
#include "jstracer.h"
#include "jswatchpoint.h"
#include "jswrapper.h"
#include "assembler/wtf/Platform.h"
-#include "assembler/jit/ExecutableAllocator.h"
#include "yarr/BumpPointerAllocator.h"
#include "methodjit/MethodJIT.h"
#include "methodjit/PolyIC.h"
#include "methodjit/MonoIC.h"
#include "vm/Debugger.h"
#include "jsgcinlines.h"
#include "jsscopeinlines.h"

View File

@ -1,12 +1,12 @@
# HG changeset patch
# User Joop Boonen <joop.boonen@opensuse.org>
# Parent be20a0ae420eb2b3584ce2c5d241e2817bac8593
# Parent 5f38d3aa0414fe0ac7ff1f0b47da44069e7ccdda
Add configure option to allow disabling of neon.
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1674,41 +1674,47 @@ if test -n "$all_flags"; then
@@ -1726,41 +1726,47 @@ if test -n "$all_flags"; then
ASFLAGS="$ASFLAGS $all_flags"
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
@ -20,26 +20,6 @@ diff --git a/configure.in b/configure.in
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm("uqadd8 r1, r1, r2");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_SIMD)
- HAVE_ARM_SIMD=1
- fi
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_NEON)
- HAVE_ARM_NEON=1
- fi
-fi # CPU_ARCH = arm
+MOZ_ARG_DISABLE_BOOL(neon,
+[ --disable-neon Disable neon extensions],
+ NS_DISABLE_NEON=1,
@ -50,24 +30,36 @@ diff --git a/configure.in b/configure.in
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm("uqadd8 r1, r1, r2");],
+ result="yes", result="no")
[asm("uqadd8 r1, r1, r2");],
result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_SIMD)
+ HAVE_ARM_SIMD=1
AC_DEFINE(HAVE_ARM_SIMD)
HAVE_ARM_SIMD=1
- fi
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
+ fi
+
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
+ result="yes", result="no")
[asm(".fpu neon\n vadd.i8 d0, d0, d0");],
result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_NEON)
+ HAVE_ARM_NEON=1
AC_DEFINE(HAVE_ARM_NEON)
HAVE_ARM_NEON=1
- fi
-fi # CPU_ARCH = arm
+ fi
+ fi # CPU_ARCH = arm
+fi
@ -75,14 +67,14 @@ diff --git a/configure.in b/configure.in
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
dnl ========================================================
dnl Android libstdc++, placed here so it can use MOZ_ARCH
dnl computed above.
dnl ========================================================
dnl =================================================================
dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
dnl which is bad when cross compiling.
dnl =================================================================
diff --git a/js/src/configure.in b/js/src/configure.in
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1604,41 +1604,47 @@ if test -n "$all_flags"; then
@@ -1664,41 +1664,47 @@ if test -n "$all_flags"; then
ASFLAGS="$ASFLAGS $all_flags"
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
@ -96,26 +88,6 @@ diff --git a/js/src/configure.in b/js/src/configure.in
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm("uqadd8 r1, r1, r2");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_SIMD)
- HAVE_ARM_SIMD=1
- fi
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_NEON)
- HAVE_ARM_NEON=1
- fi
-fi # CPU_ARCH = arm
+MOZ_ARG_DISABLE_BOOL(neon,
+[ --disable-neon Disable neon extensions],
+ NS_DISABLE_NEON=1,
@ -126,24 +98,36 @@ diff --git a/js/src/configure.in b/js/src/configure.in
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm("uqadd8 r1, r1, r2");],
+ result="yes", result="no")
[asm("uqadd8 r1, r1, r2");],
result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_SIMD)
+ HAVE_ARM_SIMD=1
AC_DEFINE(HAVE_ARM_SIMD)
HAVE_ARM_SIMD=1
- fi
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
+ fi
+
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
+ result="yes", result="no")
[asm(".fpu neon\n vadd.i8 d0, d0, d0");],
result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_NEON)
+ HAVE_ARM_NEON=1
AC_DEFINE(HAVE_ARM_NEON)
HAVE_ARM_NEON=1
- fi
-fi # CPU_ARCH = arm
+ fi
+ fi # CPU_ARCH = arm
+fi
@ -151,7 +135,7 @@ diff --git a/js/src/configure.in b/js/src/configure.in
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
dnl ========================================================
dnl Android libstdc++, placed here so it can use MOZ_ARCH
dnl computed above.
dnl ========================================================
dnl =================================================================
dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
dnl which is bad when cross compiling.
dnl =================================================================

View File

@ -1,16 +1,16 @@
# HG changeset patch
# Parent e589abb2c4d6aaa6083d254416211ac90360dbdd
# Parent 364802dc5df3b480143a54d318ceef74f32453fb
NO-BUG: Ignore a hack which is not needed in distribution build environments.
diff --git a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in b/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
--- a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
+++ b/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
@@ -59,11 +59,11 @@ HOST_LIBS += \
@@ -58,11 +58,11 @@ HOST_LIBS += \
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/dwarf/$(LIB_PREFIX)host_breakpad_dwarf_s.$(LIB_SUFFIX) \
$(NULL)
# force C++ linking
CPP_PROG_LINK = 1
FORCE_USE_PIC = 1
#XXX: bug 554854 causes us to be unable to run binaries on the build slaves
# due to them having an older libstdc++

View File

@ -1,3 +1,9 @@
Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com>
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
https://bugzilla.novell.com/show_bug.cgi?id=170055
diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
--- a/modules/libpref/src/Makefile.in
+++ b/modules/libpref/src/Makefile.in
@ -127,7 +133,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
NS_WARNING("Error parsing application default preferences.");
// Load jar:$app/omni.jar!/defaults/preferences/*.js
nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
if (appJarReader) {
rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr);
diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
@ -164,7 +170,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#include <CoreFoundation/CoreFoundation.h>
#endif
#ifdef ANDROID
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
@ -209,7 +215,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
}
+ }
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(ANDROID)
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID)
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
nsCOMPtr<nsIFile> file;
nsAutoString path;
@ -660,7 +666,7 @@ new file mode 100644
+ <parameter name="evt"/>
+ <body>
+ <![CDATA[
+ if (evt.getPreventDefault())
+ if (evt.defaultPrevented)
+ return;
+
+ var btn = this.getButton(this.defaultButton);
@ -678,7 +684,7 @@ new file mode 100644
+ <handler event="keypress" keycode="VK_RETURN"
+ group="system" action="this._hitEnter(event);"/>
+ <handler event="keypress" keycode="VK_ESCAPE" group="system">
+ if (!event.getPreventDefault())
+ if (!event.defaultPrevented)
+ this.cancelDialog();
+ </handler>
+#ifdef XP_MACOSX
@ -2086,8 +2092,7 @@ new file mode 100644
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -44,32 +44,35 @@
#include "nsIURI.h"
@@ -45,16 +45,18 @@
#include "nsReadableUtils.h"
#include "nsArrayUtils.h"
#include "prnetdb.h"
@ -2095,6 +2100,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
#include "nsPrintfCString.h"
#include "nsNetUtil.h"
#include "nsISupportsPrimitives.h"
#include "nsIGSettingsService.h"
+#include "nsVoidArray.h"
+#include "nsKDEUtils.h"
@ -2105,14 +2111,15 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsUnixSystemProxySettings() {}
nsresult Init();
private:
~nsUnixSystemProxySettings() {}
@@ -64,16 +66,17 @@ private:
nsCOMPtr<nsIGConfService> mGConf;
nsCOMPtr<nsIGSettingsService> mGSettings;
bool IsProxyMode(const char* aMode);
nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
+ nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
};
@ -2121,8 +2128,8 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsresult
nsUnixSystemProxySettings::Init()
{
mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
@@ -408,16 +411,19 @@ nsUnixSystemProxySettings::GetProxyForUR
// If this is a GNOME session, load gconf and try to use its preferences.
@@ -526,16 +529,19 @@ nsUnixSystemProxySettings::GetProxyForUR
nsCAutoString host;
rv = aURI->GetHost(host);
NS_ENSURE_SUCCESS(rv, rv);
@ -2132,17 +2139,17 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
NS_ENSURE_SUCCESS(rv, rv);
+ if( nsKDEUtils::kdeSupport())
+ return GetProxyFromKDE( scheme, host, port, aResult );
+ return GetProxyFromKDE(scheme, host, port, aResult);
+
if (!mGConf)
return GetProxyFromEnvironment(scheme, host, port, aResult);
if (mGSettings) {
rv = GetProxyFromGSettings(scheme, host, port, aResult);
if (rv == NS_OK)
return rv;
}
if (mGConf)
return GetProxyFromGConf(scheme, host, port, aResult);
return GetProxyFromGConf(scheme, host, port, aResult);
}
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
{ 0x0fa3158c, 0xd5a7, 0x43de, \
@@ -438,8 +444,34 @@ static const mozilla::Module::ContractID
@@ -561,8 +567,34 @@ static const mozilla::Module::ContractID
static const mozilla::Module kUnixProxyModule = {
mozilla::Module::kVersion,
@ -2171,19 +2178,19 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+ command.AppendElement( NS_LITERAL_CSTRING( "GETPROXY" ));
+ command.AppendElement( url );
+ nsTArray<nsCString> result;
+ if( !nsKDEUtils::command( command, &result ) || result.Count() != 1 )
+ if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 )
+ return NS_ERROR_FAILURE;
+ aResult = *result[ 0 ];
+ aResult = result[0];
+ return NS_OK;
+}
+
diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -95,17 +95,18 @@ else
@@ -96,17 +96,18 @@ else
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CMMSRCS = nsNativeAppSupportCocoa.mm
EXPORTS = MacQuirks.h
EXPORTS += MacQuirks.h
else
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
CPPSRCS += nsNativeAppSupportOS2.cpp
@ -2204,7 +2211,7 @@ diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
new file mode 100644
--- /dev/null
+++ b/toolkit/xre/nsKDEUtils.cpp
@@ -0,0 +1,330 @@
@@ -0,0 +1,372 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
@ -2244,6 +2251,10 @@ new file mode 100644
+
+#include "nsKDEUtils.h"
+#include "nsIWidget.h"
+#include "nsISupportsPrimitives.h"
+#include "nsIMutableArray.h"
+#include "nsComponentManagerUtils.h"
+#include "nsArrayUtils.h"
+
+#include <gtk/gtk.h>
+
@ -2302,7 +2313,7 @@ new file mode 100644
+ nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "CHECK" ));
+ command.AppendElement( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION )));
+ bool kde = nsKDEUtils::command( command.get() );
+ bool kde = nsKDEUtils::command( command );
+#ifdef DEBUG_KDE
+ fprintf( stderr, "KDE RUNNING %d\n", kde );
+#endif
@ -2395,6 +2406,46 @@ new file mode 100644
+ return self()->internalCommand( command, NULL, false, output );
+ }
+
+bool nsKDEUtils::command( nsIArray* command, nsIArray** output)
+ {
+ NS_ENSURE_ARG( command );
+
+ nsTArray<nsCString> in;
+ PRUint32 length;
+ command->GetLength( &length );
+ for ( PRUint32 i = 0; i < length; i++ )
+ {
+ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt( command, i );
+ if( str )
+ {
+ nsCAutoString s;
+ str->GetData( s );
+ in.AppendElement( s );
+ }
+ }
+
+ nsTArray<nsCString> out;
+ bool ret = self()->internalCommand( in, NULL, false, &out );
+
+ if ( !output ) return ret;
+
+ nsCOMPtr<nsIMutableArray> result = do_CreateInstance( NS_ARRAY_CONTRACTID );
+ if ( !result ) return false;
+
+ for ( PRUint32 i = 0; i < out.Length(); i++ )
+ {
+ nsCOMPtr<nsISupportsCString> rstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
+ if ( !rstr ) return false;
+
+ rstr->SetData( out[i] );
+ result->AppendElement( rstr, false );
+ }
+
+ NS_ADDREF( *output = result);
+ return ret;
+ }
+
+
+bool nsKDEUtils::commandBlockUi( const nsTArray<nsCString>& command, const GtkWindow* parent, nsTArray<nsCString>* output )
+ {
+ return self()->internalCommand( command, parent, true, output );
@ -2403,11 +2454,9 @@ new file mode 100644
+bool nsKDEUtils::internalCommand( const nsTArray<nsCString>& command, const GtkWindow* parent, bool blockUi,
+ nsTArray<nsCString>* output )
+ {
+ nsCString internal_command;
+ internal_command.AssignLiteral(command);
+ if( !startHelper())
+ return false;
+ feedCommand(internal_command);
+ feedCommand( command );
+ // do not store the data in 'this' but in extra structure, just in case there
+ // is reentrancy (can there be? the event loop is re-entered)
+ nsKDECommandData data;
@ -2539,7 +2588,7 @@ diff --git a/toolkit/xre/nsKDEUtils.h b/toolkit/xre/nsKDEUtils.h
new file mode 100644
--- /dev/null
+++ b/toolkit/xre/nsKDEUtils.h
@@ -0,0 +1,78 @@
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
@ -2587,6 +2636,8 @@ new file mode 100644
+
+typedef struct _GtkWindow GtkWindow;
+
+class nsIArray;
+
+class NS_EXPORT nsKDEUtils
+ {
+ public:
@ -2599,6 +2650,7 @@ new file mode 100644
+ static bool kdeSupport();
+ /* Executes the given helper command, returns true if helper returned success. */
+ static bool command( const nsTArray<nsCString>& command, nsTArray<nsCString>* output = NULL );
+ static bool command( nsIArray* command, nsIArray** output = NULL );
+ /* Like command(), but additionally blocks the parent widget like if there was
+ a modal dialog shown and enters the event loop (i.e. there are still paint updates,
+ this is for commands that take long). */
@ -2621,7 +2673,7 @@ new file mode 100644
diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -88,18 +88,19 @@ LOCAL_INCLUDES = -I$(srcdir)
@@ -92,18 +92,19 @@ LOCAL_INCLUDES = -I$(srcdir)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \
-I$(topsrcdir)/dom/ipc \
-I$(topsrcdir)/content/base/src \
@ -3273,27 +3325,27 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
mFilters.AppendElement(filter);
mFilterNames.AppendElement(name);
@@ -433,16 +437,19 @@ confirm_overwrite_file(GtkWidget *parent
gtk_widget_destroy(dialog);
return result;
@@ -390,16 +394,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsFilePicker::Show(PRInt16 *aReturn)
{
+ if( nsKDEUtils::kdeSupport())
+ return kdeFileDialog( aReturn );
+
NS_ENSURE_ARG_POINTER(aReturn);
+ if( nsKDEUtils::kdeSupport())
+ return kdeFileDialog(aReturn);
+
nsXPIDLCString title;
title.Adopt(ToNewUTF8String(mTitle));
GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
@@ -583,8 +590,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
? GTK_STOCK_SAVE : GTK_STOCK_OPEN;
@@ -538,8 +545,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
*aReturn = nsIFilePicker::returnCancel;
break;
}
@ -3552,10 +3604,10 @@ diff --git a/widget/src/gtk2/nsFilePicker.h b/widget/src/gtk2/nsFilePicker.h
diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
--- a/xpcom/components/Makefile.in
+++ b/xpcom/components/Makefile.in
@@ -94,10 +94,11 @@ FORCE_STATIC_LIB = 1
@@ -92,10 +92,11 @@ LOCAL_INCLUDES = \
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
# Force use of PIC
FORCE_USE_PIC = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_COM
@ -3585,7 +3637,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
const char* directive;
int argc;
@@ -434,16 +435,17 @@ ParseManifestCommon(NSLocationType aType
@@ -429,16 +430,17 @@ ParseManifest(NSLocationType type, FileL
NS_NAMED_LITERAL_STRING(kPlatform, "platform");
NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
NS_NAMED_LITERAL_STRING(kApplication, "application");
@ -3595,7 +3647,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
NS_NAMED_LITERAL_STRING(kABI, "abi");
+ NS_NAMED_LITERAL_STRING(kDesktop, "desktop");
#if defined(ANDROID)
#if defined(MOZ_WIDGET_ANDROID)
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
#endif
@ -3603,7 +3655,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
nsAutoString appID;
@@ -481,41 +483,46 @@ ParseManifestCommon(NSLocationType aType
@@ -476,41 +478,46 @@ ParseManifest(NSLocationType type, FileL
CopyUTF8toUTF16(s, abi);
abi.Insert(PRUnichar('_'), 0);
abi.Insert(osTarget, 0);
@ -3635,7 +3687,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
gtk_major_version,
gtk_minor_version);
+ desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
#elif defined(ANDROID)
#elif defined(MOZ_WIDGET_ANDROID)
bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) {
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
@ -3650,11 +3702,11 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
char *token;
char *newline = buf;
@@ -597,24 +604,26 @@ ParseManifestCommon(NSLocationType aType
@@ -592,24 +599,26 @@ ParseManifest(NSLocationType type, FileL
TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified;
TriState stABI = eUnspecified;
#if defined(ANDROID)
#if defined(MOZ_WIDGET_ANDROID)
TriState stTablet = eUnspecified;
#endif
bool platform = false;
@ -3674,10 +3726,10 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion))
continue;
#if defined(ANDROID)
#if defined(MOZ_WIDGET_ANDROID)
bool tablet = false;
if (CheckFlag(kTablet, wtoken, tablet)) {
@@ -643,16 +652,17 @@ ParseManifestCommon(NSLocationType aType
@@ -638,16 +647,17 @@ ParseManifest(NSLocationType type, FileL
}
if (!ok ||
@ -3687,7 +3739,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
stOs == eBad ||
stOsVersion == eBad ||
+ stDesktop == eBad ||
#ifdef ANDROID
#ifdef MOZ_WIDGET_ANDROID
stTablet == eBad ||
#endif
stABI == eBad)
@ -3698,7 +3750,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
--- a/xpcom/io/Makefile.in
+++ b/xpcom/io/Makefile.in
@@ -190,17 +190,17 @@ include $(topsrcdir)/ipc/chromium/chromi
@@ -188,17 +188,17 @@ include $(topsrcdir)/ipc/chromium/chromi
DEFINES += -D_IMPL_NS_COM
ifeq ($(OS_ARCH),Linux)

View File

@ -9,7 +9,8 @@ retrieving revision 1.1
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -68,16 +68,23 @@ private:
@@ -71,18 +71,24 @@ private:
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
};
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
@ -17,13 +18,15 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsresult
nsUnixSystemProxySettings::Init()
{
mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
+ // 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
+ // this was not a GNOME session, using *_PROXY environment variables.
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) {
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
+ }
return NS_OK;
}

View File

@ -1,28 +1,28 @@
# HG changeset patch
# Parent 07dc7ea11c92368cb7c137a403feaaa6861abb3c
# Parent e315e5900fa90c2183edccd211fbe1e81cdb4c5f
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -68,17 +68,17 @@ GRE_BUILDID = $(shell $(PYTHON) $(topsrc
diff --git a/build/Makefile.in b/build/Makefile.in
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -86,17 +86,17 @@ DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_
APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null)
MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
ifdef MOZ_SOURCE_STAMP
DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
endif
-SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
+SOURCE_REPO ?= $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
_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) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
ifdef SOURCE_REPO
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
endif
DEFINES += -DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
-DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)"
ifdef MOZ_APP_PROFILE
DEFINES += \
-DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
-DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)" \
-DMOZ_APP_ID="$(MOZ_APP_ID)" \
diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in
--- a/toolkit/content/Makefile.in
+++ b/toolkit/content/Makefile.in
@ -48,7 +48,7 @@ diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in
diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -154,20 +154,20 @@ SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME
@@ -156,20 +156,20 @@ SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME
TEST_PACKAGE = $(PKG_BASENAME).tests.zip
ifneq (,$(wildcard $(DIST)/bin/application.ini))
@ -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
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -227,17 +227,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR
@@ -235,17 +235,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR
endif
endif

View File

@ -7,7 +7,7 @@ References:
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -567,16 +567,20 @@ MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS
@@ -581,16 +581,20 @@ MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS
MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
@ -31,7 +31,7 @@ diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -8093,16 +8093,31 @@ AC_SUBST(QCMS_LIBS)
@@ -8213,16 +8213,31 @@ AC_SUBST(QCMS_LIBS)
dnl ========================================================
dnl HarfBuzz
@ -55,23 +55,23 @@ diff --git a/configure.in b/configure.in
+AC_SUBST(NSSHELPER_LIBS)
+
+dnl ========================================================
dnl OTS
dnl ========================================================
MOZ_OTS_LIBS='$(DEPTH)/gfx/ots/src/$(LIB_PREFIX)mozots.$(LIB_SUFFIX)'
AC_SUBST(MOZ_OTS_LIBS)
dnl ========================================================
dnl Skia
dnl SIL Graphite
dnl ========================================================
if test "$MOZ_GRAPHITE"; then
MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)'
AC_DEFINE(MOZ_GRAPHITE)
else
MOZ_GRAPHITE_LIBS=
fi
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
--- a/security/manager/ssl/src/Makefile.in
+++ b/security/manager/ssl/src/Makefile.in
@@ -114,12 +114,14 @@ CSRCS += md4.c
EXTRA_DEPS = $(NSS_DEP_LIBS)
DEFINES += -DNSS_ENABLE_ECC
@@ -118,12 +118,14 @@ EXTRA_DEPS = $(NSS_DEP_LIBS)
DEFINES += \
-DNSS_ENABLE_ECC \
-DDLL_PREFIX=\"$(DLL_PREFIX)\" \
-DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
$(NULL)
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
@ -104,12 +104,12 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
#include "nsNSSComponent.h"
#include "nsNSSCallbacks.h"
#include "nsNSSIOLayer.h"
#include "nsSSLThread.h"
#include "nsCertVerificationThread.h"
#include "nsNetUtil.h"
#include "nsAppDirectoryServiceDefs.h"
@@ -1725,18 +1732,34 @@ nsNSSComponent::InitializeNSS(bool showW
#include "nsDirectoryService.h"
@@ -1733,18 +1740,34 @@ nsNSSComponent::InitializeNSS(bool showW
ConfigureInternalPKCS11Token();
// The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
@ -149,7 +149,7 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -126,17 +126,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
@@ -471,17 +471,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
endif
endif
endif
@ -162,9 +162,9 @@ diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS)
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CXXFLAGS += $(TK_CFLAGS)
CXXFLAGS += $(TK_CFLAGS)
OS_LIBS += \
-framework SystemConfiguration \
-framework QuickTime \
-framework IOKit \
-F/System/Library/PrivateFrameworks -framework CoreUI \
-framework SystemConfiguration \
-framework QuickTime \
-framework IOKit \
-F/System/Library/PrivateFrameworks -framework CoreUI \

View File

@ -11,7 +11,7 @@ diff --git a/xpcom/glue/SSE.cpp b/xpcom/glue/SSE.cpp
// <intrin.h> conflicts with <windows.h> on MSVC 2005, and some files want to
// include both SSE.h and <windows.h>.
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && (defined(__i386__) || defined(__x86_64__))
#ifdef HAVE_CPUID_H
// cpuid.h is available on gcc 4.3 and higher on i386 and x86_64
-#include <cpuid.h>

View File

@ -1,23 +1,20 @@
From: Mike Hommey <mh@glandium.org>
Date: Sat, 24 Dec 2011 09:56:58 +0100
Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
YARR JIT is not supported
---
js/src/Makefile.in | 21 +++++++++++++--------
js/src/vm/RegExpObject-inl.h | 28 ++++++----------------------
js/src/vm/RegExpObject.cpp | 36 ------------------------------------
js/src/vm/RegExpObject.h | 27 ++++++---------------------
js/src/yarr/wtfbridge.h | 2 --
5 files changed, 25 insertions(+), 89 deletions(-)
# 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
index fc48cbd..49f0bdc 100644
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \
@@ -335,25 +335,29 @@ CPPSRCS += checks.cc \
# END enclude sources for V8 dtoa
#############################################
ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
# For architectures without YARR JIT, PCRE is faster than the YARR
# interpreter (bug 684559).
ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU)))
-VPATH += $(srcdir)/yarr/pcre \
+VPATH += $(srcdir)/assembler \
@ -31,7 +28,6 @@ index fc48cbd..49f0bdc 100644
- pcre_tables.cpp \
- pcre_xclass.cpp \
- pcre_ucp_searchfuncs.cpp \
+ Assertions.cpp \
+ OSAllocatorOS2.cpp \
+ OSAllocatorPosix.cpp \
+ OSAllocatorWin.cpp \
@ -42,128 +38,279 @@ index fc48cbd..49f0bdc 100644
$(NULL)
else
@@ -1015,10 +1020,10 @@ endif
###############################################
# BEGIN include sources for the Nitro assembler
#
ENABLE_YARR_JIT = 1
@@ -878,20 +882,20 @@ endif
###############################################
# BEGIN kludges for the Nitro assembler
#
# Needed to "configure" it correctly. Unfortunately these
# flags wind up being applied to all code in js/src, not just
# the code in js/src/assembler.
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_METHODJIT))
-CXXFLAGS += -DENABLE_JIT=1
+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
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()
{
JS_ASSERT(onOwnerThread());
+#if ENABLE_ASSEMBLER
delete_<JSC::ExecutableAllocator>(execAlloc_);
+#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
index 5f7817d..91108a7 100644
--- a/js/src/vm/RegExpObject-inl.h
+++ b/js/src/vm/RegExpObject-inl.h
@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt
return RetType(self);
@@ -132,26 +132,28 @@ RegExpObject::setMultiline(bool enabled)
}
inline void
RegExpObject::setSticky(bool enabled)
{
setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled));
}
+#if ENABLE_YARR_JIT
/* This function should be deleted once bad Android platforms phase out. See bug 604774. */
inline bool
RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
return true;
#endif
}
+#endif
inline bool
RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts,
uintN *parenCount, RegExpFlag flags)
detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx)
{
-#if ENABLE_YARR_JIT
/* Parse the pattern. */
ErrorCode yarrError;
YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
* case we have to bytecode compile it.
*/
-#ifdef JS_METHODJIT
+#if ENABLE_YARR_JIT && defined(JS_METHODJIT)
if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
if (!cx->compartment->ensureJaegerCompartmentExists(cx))
return false;
@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
}
#endif
+#if ENABLE_YARR_JIT
codeBlock.setFallBack(true);
+#endif
byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
#if defined(ANDROID) && defined(JS_METHODJIT)
return cx->methodJitEnabled;
#else
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
#endif
}
+#endif
inline bool
@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz
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 Success_NotFound;
-#if !ENABLE_YARR_JIT
- if (result < 0) {
- reportPCREError(cx, result);
- return Error;
- }
-#endif
-
JS_ASSERT(result >= 0);
return Success;
}
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
index f75c6a5..7631dd5 100644
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -251,7 +251,6 @@ Class js::RegExpClass = {
NULL /* trace */
};
@@ -162,17 +162,16 @@ MatchPairs::checkAgainst(size_t inputLen
continue;
JS_ASSERT(size_t(p.limit) <= inputLength);
}
#endif
}
/* detail::RegExpCode */
-#if ENABLE_YARR_JIT
void
RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
{
@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err
switch (error) {
case JSC::Yarr::NoError:
JS_NOT_REACHED("Called reportYarrError with value for no error");
return;
#define COMPILE_EMSG(__code, __msg) \
@@ -194,73 +193,36 @@ RegExpCode::reportYarrError(JSContext *c
COMPILE_EMSG(QuantifierTooLarge, JSMSG_BAD_QUANTIFIER);
COMPILE_EMSG(EscapeUnterminated, JSMSG_TRAILING_SLASH);
#undef COMPILE_EMSG
default:
JS_NOT_REACHED("Unknown Yarr error code");
}
}
-#else /* !ENABLE_YARR_JIT */
-
-void
-RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
-RegExpCode::reportPCREError(JSContext *cx, int error)
-{
-#define REPORT(msg_) \
- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
- return
- switch (error) {
- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
- case 1: REPORT(JSMSG_TRAILING_SLASH);
- case 2: REPORT(JSMSG_TRAILING_SLASH);
- case 2: REPORT(JSMSG_TRAILING_SLASH);
- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
@ -184,27 +331,134 @@ index f75c6a5..7631dd5 100644
- }
-#undef REPORT
-}
-
-#endif /* ENABLE_YARR_JIT */
-
bool
js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut)
RegExpCode::compile(JSContext *cx, JSLinearString &pattern, uintN *parenCount, RegExpFlag flags)
{
-#if ENABLE_YARR_JIT
/* Parse the pattern. */
ErrorCode yarrError;
YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
&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
index 1449d56..279f3c0 100644
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -49,8 +49,6 @@
@@ -46,20 +46,18 @@
#include <stddef.h>
#include "jsobj.h"
#include "js/TemplateLib.h"
#include "yarr/Yarr.h"
#if ENABLE_YARR_JIT
#include "yarr/YarrJIT.h"
+#endif
#include "yarr/YarrSyntaxChecker.h"
-#else
-#include "yarr/pcre/pcre.h"
#endif
-#endif
namespace js {
@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
/* Abstracts away the gross |RegExpPrivate| backend details. */
class RegExpPrivateCode
/*
* JavaScript Regular Expressions
*
* There are several engine concepts associated with a single logical 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;
@ -217,25 +471,25 @@ index 1449d56..279f3c0 100644
/* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
YarrCodeBlock codeBlock;
- BytecodePattern *byteCode;
+#endif
BytecodePattern *byteCode;
-#else
- JSRegExp *compiled;
#endif
+ BytecodePattern *byteCode;
-#endif
public:
RegExpPrivateCode()
RegExpCode()
:
#if ENABLE_YARR_JIT
codeBlock(),
- byteCode(NULL)
+#endif
byteCode(NULL)
-#else
- compiled(NULL)
#endif
+ byteCode(NULL)
-#endif
{ }
~RegExpPrivateCode() {
~RegExpCode() {
#if ENABLE_YARR_JIT
codeBlock.release();
+#endif
@ -244,21 +498,29 @@ index 1449d56..279f3c0 100644
-#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);
- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
+#endif
static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
-#else
- void reportPCREError(JSContext *cx, int error);
#endif
+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount,
RegExpFlag flags);
@@ -205,11 +194,7 @@ class RegExpPrivateCode
int *output, size_t outputCount);
- static void reportPCREError(JSContext *cx, int error);
-#endif
static size_t getOutputSize(size_t pairCount) {
-#if ENABLE_YARR_JIT
@ -267,13 +529,22 @@ index 1449d56..279f3c0 100644
- 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
index ac41d08..fb8eb86 100644
--- a/js/src/yarr/wtfbridge.h
+++ b/js/src/yarr/wtfbridge.h
@@ -49,9 +49,7 @@
@@ -44,19 +44,17 @@
* WTF compatibility layer. This file provides various type and data
* definitions for use by Yarr.
*/
#include "jsstr.h"
#include "jsprvtd.h"
#include "vm/String.h"
#include "assembler/wtf/Platform.h"
@ -283,3 +554,8 @@ index ac41d08..fb8eb86 100644
namespace JSC { namespace Yarr {
/*
* Basic type definitions.
*/
typedef jschar UChar;

View File

@ -72,7 +72,7 @@ fi
mozilla_lib=`file $MOZ_PROGRAM`
LIB=lib
echo $mozilla_lib | grep -q -E 'x86-64|s390x|64-bit.PowerPC' && LIB=lib64
echo $mozilla_lib | grep -q -E 'ELF.64-bit.*(x86-64|S/390|PowerPC)' && LIB=lib64
BROWSER_PLUGIN_DIR=/usr/$LIB/browser-plugins
if [ ! -d $BROWSER_PLUGIN_DIR ]; then

View File

@ -1,2 +1,2 @@
REV=72ad46d416ce
REPO=http://hg.mozilla.org/releases/mozilla-release
REV=8c9e4873d419
REPO=http://hg.mozilla.org/releases/mozilla-beta