forked from pool/MozillaFirefox
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:
commit
2c4f5a31ac
@ -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
|
Thu Feb 16 08:47:31 UTC 2012 - wr@rosenauer.org
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%define major 10
|
%define major 10
|
||||||
%define mainver %major.0.2
|
%define mainver %major.99
|
||||||
|
|
||||||
Name: MozillaFirefox
|
Name: MozillaFirefox
|
||||||
BuildRequires: Mesa-devel
|
BuildRequires: Mesa-devel
|
||||||
@ -34,6 +34,7 @@ BuildRequires: python
|
|||||||
BuildRequires: startup-notification-devel
|
BuildRequires: startup-notification-devel
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
|
BuildRequires: xorg-x11-libXt-devel
|
||||||
BuildRequires: yasm
|
BuildRequires: yasm
|
||||||
BuildRequires: zip
|
BuildRequires: zip
|
||||||
%if %suse_version > 1110
|
%if %suse_version > 1110
|
||||||
@ -42,19 +43,20 @@ BuildRequires: libproxy-devel
|
|||||||
%else
|
%else
|
||||||
BuildRequires: wireless-tools
|
BuildRequires: wireless-tools
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: mozilla-nspr-devel >= 4.8.9
|
BuildRequires: mozilla-nspr-devel >= 4.9.0
|
||||||
BuildRequires: mozilla-nss-devel >= 3.13.1
|
BuildRequires: mozilla-nss-devel >= 3.13.3
|
||||||
BuildRequires: nss-shared-helper-devel
|
BuildRequires: nss-shared-helper-devel
|
||||||
Version: %{mainver}
|
Version: %{mainver}
|
||||||
Release: 0
|
Release: 0
|
||||||
%define releasedate 2012021500
|
%define releasedate 2012022900
|
||||||
Provides: web_browser
|
|
||||||
Provides: firefox = %{version}-%{release}
|
|
||||||
Provides: firefox = %{mainver}
|
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
|
# this is needed to match this package with the kde4 helper package without the main package
|
||||||
# having a hard requirement on the kde4 package
|
# having a hard requirement on the kde4 package
|
||||||
%define kde_helper_version 6
|
%define kde_helper_version 6
|
||||||
Provides: mozilla-kde4-version = %{kde_helper_version}
|
Provides: mozilla-kde4-version = %{kde_helper_version}
|
||||||
|
Provides: browser(npapi)
|
||||||
Summary: Mozilla Firefox Web Browser
|
Summary: Mozilla Firefox Web Browser
|
||||||
License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
|
License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
|
||||||
Group: Productivity/Networking/Web/Browsers
|
Group: Productivity/Networking/Web/Browsers
|
||||||
@ -86,10 +88,8 @@ Patch9: mozilla-repo.patch
|
|||||||
Patch10: mozilla-dump_syms-static.patch
|
Patch10: mozilla-dump_syms-static.patch
|
||||||
Patch11: mozilla-sle11.patch
|
Patch11: mozilla-sle11.patch
|
||||||
Patch12: mozilla-linux3.patch
|
Patch12: mozilla-linux3.patch
|
||||||
Patch13: mozilla-a11y.patch
|
|
||||||
Patch14: mozilla-disable-neon-option.patch
|
Patch14: mozilla-disable-neon-option.patch
|
||||||
Patch15: mozilla-bmo703534.patch
|
Patch15: mozilla-yarr-pcre.patch
|
||||||
Patch16: mozilla-yarr-pcre.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
|
||||||
@ -101,9 +101,9 @@ Patch41: firefox-branded-icons.patch
|
|||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires(post): coreutils shared-mime-info desktop-file-utils
|
Requires(post): coreutils shared-mime-info desktop-file-utils
|
||||||
Requires(postun): 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-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
|
||||||
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
|
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
|
||||||
Requires: %{name}-branding > 4.0
|
|
||||||
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
|
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
|
||||||
%define _use_internal_dependency_generator 0
|
%define _use_internal_dependency_generator 0
|
||||||
%define __find_requires sh %{SOURCE4}
|
%define __find_requires sh %{SOURCE4}
|
||||||
@ -137,8 +137,8 @@ Summary: Devel package for Firefox
|
|||||||
Group: Development/Tools/Other
|
Group: Development/Tools/Other
|
||||||
Provides: firefox-devel = %{version}-%{release}
|
Provides: firefox-devel = %{version}-%{release}
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: perl(XML::Simple)
|
|
||||||
Requires: perl(Archive::Zip)
|
Requires: perl(Archive::Zip)
|
||||||
|
Requires: perl(XML::Simple)
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Development files for Firefox to make packaging of addons easier.
|
Development files for Firefox to make packaging of addons easier.
|
||||||
@ -206,7 +206,7 @@ cd $RPM_BUILD_DIR/mozilla
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
#%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
@ -216,18 +216,16 @@ cd $RPM_BUILD_DIR/mozilla
|
|||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
%patch15 -p1
|
#%patch15 -p1
|
||||||
%patch16 -p1
|
|
||||||
#
|
#
|
||||||
%patch31 -p1
|
%patch31 -p1
|
||||||
%patch32 -p1
|
%patch32 -p1
|
||||||
%if %suse_version >= 1110
|
%if %suse_version >= 1110
|
||||||
#%patch33 -p1
|
%patch33 -p1
|
||||||
%endif
|
%endif
|
||||||
%if %suse_version >= 1140
|
%if %suse_version >= 1140
|
||||||
#%patch34 -p1
|
%patch34 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch38 -p1
|
%patch38 -p1
|
||||||
%patch39 -p1
|
%patch39 -p1
|
||||||
@ -240,11 +238,11 @@ DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
|||||||
TIME="\"$(date -d "${modified}" "+%%R")\""
|
TIME="\"$(date -d "${modified}" "+%%R")\""
|
||||||
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
|
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)
|
kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
|
||||||
#if test "$kdehelperversion" != %{kde_helper_version}; then
|
if test "$kdehelperversion" != %{kde_helper_version}; then
|
||||||
# echo fix kde helper version in the .spec file
|
echo fix kde helper version in the .spec file
|
||||||
# exit 1
|
exit 1
|
||||||
#fi
|
fi
|
||||||
source %{SOURCE5}
|
source %{SOURCE5}
|
||||||
export MOZ_SOURCE_STAMP=$REV
|
export MOZ_SOURCE_STAMP=$REV
|
||||||
export SOURCE_REPO=$REPO
|
export SOURCE_REPO=$REPO
|
||||||
@ -282,7 +280,7 @@ ac_add_options --disable-tests
|
|||||||
ac_add_options --disable-debug
|
ac_add_options --disable-debug
|
||||||
ac_add_options --enable-startup-notification
|
ac_add_options --enable-startup-notification
|
||||||
#ac_add_options --enable-chrome-format=jar
|
#ac_add_options --enable-chrome-format=jar
|
||||||
ac_add_options --enable-update-channel=release
|
ac_add_options --enable-update-channel=beta
|
||||||
EOF
|
EOF
|
||||||
%if %suse_version > 1130
|
%if %suse_version > 1130
|
||||||
cat << EOF >> $MOZCONFIG
|
cat << EOF >> $MOZCONFIG
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:9ef03e912b119f21ce100c4423cac0303339b344fe2d6d0a2f1aa1f4a9bf5e24
|
oid sha256:ed6f2335b5fb457f70d9d30566b2546f2f513514f620e35cfa86523762da6208
|
||||||
size 25686
|
size 29353
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CHANNEL="release"
|
CHANNEL="beta"
|
||||||
BRANCH="releases/mozilla-$CHANNEL"
|
BRANCH="releases/mozilla-$CHANNEL"
|
||||||
RELEASE_TAG="FIREFOX_10_0_2_RELEASE"
|
RELEASE_TAG="FIREFOX_11_0b5_RELEASE"
|
||||||
VERSION="10.0.2"
|
VERSION="10.99"
|
||||||
|
|
||||||
# mozilla
|
# mozilla
|
||||||
hg clone http://hg.mozilla.org/$BRANCH mozilla
|
hg clone http://hg.mozilla.org/$BRANCH mozilla
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:e3f32a41ec22fa4dce633d512ec68f52fcabcfacbef90c58cdfb7557b7bc6b49
|
|
||||||
size 75330039
|
|
3
firefox-10.99-source.tar.bz2
Normal file
3
firefox-10.99-source.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:50e0b4c51464c73710095176a6c01902c9321b4b12736173d14ced822461ce2d
|
||||||
|
size 78218358
|
@ -1,11 +1,11 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# Parent 87462739809ad0f41fd335f9a68203fd70f9883c
|
# Parent efffa19fa0b2530d2aca1ebd5b885a6fc68e51de
|
||||||
|
|
||||||
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
|
||||||
@@ -194,16 +194,21 @@ DEFINES += -DMOZILLA_OFFICIAL
|
@@ -169,16 +169,21 @@ endif # LIBXUL_SDK
|
||||||
endif
|
DEFINES += -DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
||||||
|
|
||||||
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
|
||||||
@@ -415,18 +415,21 @@
|
@@ -424,18 +424,21 @@
|
||||||
#ifdef SHIP_FEEDBACK
|
#ifdef SHIP_FEEDBACK
|
||||||
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi
|
@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi
|
||||||
#endif
|
#endif
|
||||||
|
@ -6,10 +6,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=478632
|
|||||||
wr: changed because of
|
wr: changed because of
|
||||||
https://bugzilla.novell.com/show_bug.cgi?id=561027
|
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
|
diff --git a/browser/themes/gnomestripe/browser.css b/browser/themes/gnomestripe/browser.css
|
||||||
--- a/browser/themes/gnomestripe/browser/browser.css
|
--- a/browser/themes/gnomestripe/browser.css
|
||||||
+++ b/browser/themes/gnomestripe/browser/browser.css
|
+++ b/browser/themes/gnomestripe/browser.css
|
||||||
@@ -954,16 +954,30 @@ toolbar[iconsize="small"] #feed-button {
|
@@ -1018,16 +1018,30 @@ toolbar[iconsize="small"] #feed-button {
|
||||||
}
|
}
|
||||||
|
|
||||||
#urlbar-display {
|
#urlbar-display {
|
||||||
@ -33,10 +33,10 @@ diff --git a/browser/themes/gnomestripe/browser/browser.css b/browser/themes/gno
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
/* Favicon */
|
/* Favicon */
|
||||||
#page-proxy-favicon,
|
#page-proxy-favicon {
|
||||||
#urlbar-throbber {
|
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-proxy-stack {
|
#page-proxy-stack {
|
||||||
|
width: 24px;
|
||||||
|
@ -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,1111 @@
|
@@ -0,0 +1,1125 @@
|
||||||
+#filter substitution
|
+#filter substitution
|
||||||
+<?xml version="1.0"?>
|
+<?xml version="1.0"?>
|
||||||
+# -*- Mode: HTML -*-
|
+# -*- Mode: HTML -*-
|
||||||
@ -42,6 +42,7 @@ new file mode 100644
|
|||||||
+# Patrick Walton <pcwalton@mozilla.com>
|
+# Patrick Walton <pcwalton@mozilla.com>
|
||||||
+# 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>
|
||||||
+#
|
+#
|
||||||
+# 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
|
||||||
@ -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/browser.css" type="text/css"?>
|
||||||
+<?xml-stylesheet href="chrome://browser/content/places/places.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"?>
|
+<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
|
||||||
+
|
+
|
||||||
+<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
+<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||||
@ -284,7 +286,11 @@ new file mode 100644
|
|||||||
+ if (gContextMenu.shouldDisplay)
|
+ if (gContextMenu.shouldDisplay)
|
||||||
+ updateEditUIVisibility();
|
+ updateEditUIVisibility();
|
||||||
+ return gContextMenu.shouldDisplay;"
|
+ 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
|
+#include browser-context.inc
|
||||||
+ </menupopup>
|
+ </menupopup>
|
||||||
+
|
+
|
||||||
@ -517,8 +523,6 @@ new file mode 100644
|
|||||||
+ ontextentered="this.handleCommand(param);"
|
+ ontextentered="this.handleCommand(param);"
|
||||||
+ ontextreverted="return this.handleRevert();"
|
+ ontextreverted="return this.handleRevert();"
|
||||||
+ pageproxystate="invalid"
|
+ pageproxystate="invalid"
|
||||||
+ onsearchbegin="LocationBarHelpers._searchBegin();"
|
|
||||||
+ onsearchcomplete="LocationBarHelpers._searchComplete();"
|
|
||||||
+ onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
|
+ onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
|
||||||
+ onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
|
+ onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
|
||||||
+ <box id="notification-popup-box" hidden="true" align="center">
|
+ <box id="notification-popup-box" hidden="true" align="center">
|
||||||
@ -539,7 +543,6 @@ new file mode 100644
|
|||||||
+ <hbox id="identity-box-inner" align="center">
|
+ <hbox id="identity-box-inner" align="center">
|
||||||
+ <stack id="page-proxy-stack"
|
+ <stack id="page-proxy-stack"
|
||||||
+ onclick="PageProxyClickHandler(event);">
|
+ onclick="PageProxyClickHandler(event);">
|
||||||
+ <image id="urlbar-throbber" busy="false"/>
|
|
||||||
+ <image id="page-proxy-favicon" validate="never"
|
+ <image id="page-proxy-favicon" validate="never"
|
||||||
+ pageproxystate="invalid"
|
+ pageproxystate="invalid"
|
||||||
+ onerror="this.removeAttribute('src');"/>
|
+ onerror="this.removeAttribute('src');"/>
|
||||||
@ -974,14 +977,16 @@ new file mode 100644
|
|||||||
+ <splitter id="devtools-side-splitter" hidden="true"/>
|
+ <splitter id="devtools-side-splitter" hidden="true"/>
|
||||||
+ <vbox id="devtools-sidebar-box" hidden="true"
|
+ <vbox id="devtools-sidebar-box" hidden="true"
|
||||||
+ style="min-width: 18em; width: 22em; max-width: 42em;" persist="width">
|
+ 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"/>
|
+ <deck id="devtools-sidebar-deck" flex="1"/>
|
||||||
+ </vbox>
|
+ </vbox>
|
||||||
+ <vbox id="browser-border-end" hidden="true" layer="true"/>
|
+ <vbox id="browser-border-end" hidden="true" layer="true"/>
|
||||||
+ </hbox>
|
+ </hbox>
|
||||||
+
|
+
|
||||||
+ <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
|
+ <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">
|
+ <hbox id="full-screen-warning-message">
|
||||||
+ <description id="full-screen-warning-text" value="&domFullScreenWarning.label;"></description>
|
+ <description id="full-screen-warning-text" value="&domFullScreenWarning.label;"></description>
|
||||||
+ </hbox>
|
+ </hbox>
|
||||||
@ -990,6 +995,7 @@ new file mode 100644
|
|||||||
+
|
+
|
||||||
+ <vbox id="browser-bottombox" layer="true">
|
+ <vbox id="browser-bottombox" layer="true">
|
||||||
+ <toolbar id="inspector-toolbar"
|
+ <toolbar id="inspector-toolbar"
|
||||||
|
+ class="devtools-toolbar"
|
||||||
+ nowindowdrag="true"
|
+ nowindowdrag="true"
|
||||||
+ hidden="true">
|
+ hidden="true">
|
||||||
+ <vbox flex="1">
|
+ <vbox flex="1">
|
||||||
@ -1004,6 +1010,7 @@ new file mode 100644
|
|||||||
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
|
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
|
||||||
+#endif
|
+#endif
|
||||||
+ <toolbarbutton id="inspector-inspect-toolbutton"
|
+ <toolbarbutton id="inspector-inspect-toolbutton"
|
||||||
|
+ class="devtools-toolbarbutton"
|
||||||
+ label="&inspectButton.label;"
|
+ label="&inspectButton.label;"
|
||||||
+ accesskey="&inspectButton.accesskey;"
|
+ accesskey="&inspectButton.accesskey;"
|
||||||
+ command="Inspector:Inspect"/>
|
+ command="Inspector:Inspect"/>
|
||||||
@ -1011,7 +1018,14 @@ new file mode 100644
|
|||||||
+ flex="1" orient="horizontal"
|
+ flex="1" orient="horizontal"
|
||||||
+ clicktoscroll="true"/>
|
+ clicktoscroll="true"/>
|
||||||
+ <hbox id="inspector-tools">
|
+ <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"
|
+ <toolbarbutton id="inspector-style-button"
|
||||||
|
+ class="devtools-toolbarbutton"
|
||||||
+ label="&inspectStyleButton.label;"
|
+ label="&inspectStyleButton.label;"
|
||||||
+ accesskey="&inspectStyleButton.accesskey;"
|
+ accesskey="&inspectStyleButton.accesskey;"
|
||||||
+ command="Inspector:Sidebar"/>
|
+ command="Inspector:Sidebar"/>
|
||||||
@ -1153,12 +1167,12 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "nsProfileMigrator.h"
|
#include "nsProfileMigrator.h"
|
||||||
#if !defined(XP_OS2)
|
|
||||||
#include "nsOperaProfileMigrator.h"
|
|
||||||
#endif
|
|
||||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||||
#include "nsIEProfileMigrator.h"
|
#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)
|
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(XP_OS2)
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
|
|
||||||
#endif
|
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
|
||||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
|
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
|
#endif
|
||||||
NS_DEFINE_NAMED_CID(NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID);
|
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
|
diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
|
||||||
--- a/browser/components/preferences/advanced.js
|
--- a/browser/components/preferences/advanced.js
|
||||||
+++ b/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 brandBundle = document.getElementById("bundleBrand");
|
||||||
var shellBundle = document.getElementById("bundleShell");
|
var shellBundle = document.getElementById("bundleShell");
|
||||||
var brandShortName = brandBundle.getString("brandShortName");
|
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
|
diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
|
||||||
--- a/browser/components/shell/src/Makefile.in
|
--- a/browser/components/shell/src/Makefile.in
|
||||||
+++ b/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)
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
CPPSRCS = nsWindowsShellService.cpp
|
CPPSRCS = nsWindowsShellService.cpp
|
||||||
@ -1270,7 +1284,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,193 @@
|
@@ -0,0 +1,257 @@
|
||||||
+/* -*- 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
|
||||||
@ -1316,6 +1330,9 @@ new file mode 100644
|
|||||||
+#include "nsILocalFile.h"
|
+#include "nsILocalFile.h"
|
||||||
+#include "nsServiceManagerUtils.h"
|
+#include "nsServiceManagerUtils.h"
|
||||||
+#include "nsComponentManagerUtils.h"
|
+#include "nsComponentManagerUtils.h"
|
||||||
|
+#include "nsIMutableArray.h"
|
||||||
|
+#include "nsISupportsPrimitives.h"
|
||||||
|
+#include "nsArrayUtils.h"
|
||||||
+
|
+
|
||||||
+nsresult
|
+nsresult
|
||||||
+nsKDEShellService::Init()
|
+nsKDEShellService::Init()
|
||||||
@ -1331,13 +1348,23 @@ new file mode 100644
|
|||||||
+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
|
+nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||||
+ bool* aIsDefaultBrowser)
|
+ bool* aIsDefaultBrowser)
|
||||||
+ {
|
+ {
|
||||||
+ *aIsDefaultBrowser = PR_FALSE;
|
+ *aIsDefaultBrowser = false;
|
||||||
+ if (aStartupCheck)
|
+ if (aStartupCheck)
|
||||||
+ mCheckedThisSession = PR_TRUE;
|
+ mCheckedThisSession = true;
|
||||||
+ nsTArray<nsCString> command;
|
+
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
|
+ 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 ))
|
+ if( nsKDEUtils::command( command ))
|
||||||
+ *aIsDefaultBrowser = PR_TRUE;
|
+ *aIsDefaultBrowser = true;
|
||||||
+ return NS_OK;
|
+ return NS_OK;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -1345,9 +1372,21 @@ new file mode 100644
|
|||||||
+nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
|
+nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
|
||||||
+ bool aForAllUsers)
|
+ bool aForAllUsers)
|
||||||
+ {
|
+ {
|
||||||
+ nsTArray<nsCString> command;
|
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
|
+ if (!command)
|
||||||
+ command.AppendElement( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
|
+ 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;
|
+ 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
|
+ // 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.
|
+ // new window open, and we don't want to check again.
|
||||||
+ if (mCheckedThisSession) {
|
+ if (mCheckedThisSession) {
|
||||||
+ *aResult = PR_FALSE;
|
+ *aResult = false;
|
||||||
+ return NS_OK;
|
+ return NS_OK;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -1387,7 +1426,7 @@ new file mode 100644
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+NS_IMETHODIMP
|
+NS_IMETHODIMP
|
||||||
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
|
+nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement,
|
||||||
+ PRInt32 aPosition)
|
+ PRInt32 aPosition)
|
||||||
+ {
|
+ {
|
||||||
+ return NS_ERROR_NOT_IMPLEMENTED;
|
+ return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
@ -1408,26 +1447,47 @@ new file mode 100644
|
|||||||
+NS_IMETHODIMP
|
+NS_IMETHODIMP
|
||||||
+nsKDEShellService::OpenApplication(PRInt32 aApplication)
|
+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 )
|
+ if( aApplication == APPLICATION_MAIL )
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "OPENMAIL" ));
|
+ str->SetData( NS_LITERAL_CSTRING( "OPENMAIL" ));
|
||||||
+ else if( aApplication == APPLICATION_NEWS )
|
+ else if( aApplication == APPLICATION_NEWS )
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "OPENNEWS" ));
|
+ str->SetData( NS_LITERAL_CSTRING( "OPENNEWS" ));
|
||||||
+ else
|
+ else
|
||||||
+ return NS_ERROR_NOT_IMPLEMENTED;
|
+ return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
+
|
||||||
|
+ command->AppendElement( str, false );
|
||||||
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+NS_IMETHODIMP
|
+NS_IMETHODIMP
|
||||||
+nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
|
+nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
|
||||||
+ {
|
+ {
|
||||||
+ nsTArray<nsCString> command;
|
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "RUN" ));
|
+ if (!command)
|
||||||
+ nsCString app;
|
+ 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 );
|
+ nsresult rv = aApplication->GetNativePath( app );
|
||||||
+ NS_ENSURE_SUCCESS( rv, rv );
|
+ NS_ENSURE_SUCCESS( rv, rv );
|
||||||
+ command.AppendElement( app );
|
+ appstr->SetData( app );
|
||||||
+ command.AppendElement( aURI );
|
+ command->AppendElement( appstr, false );
|
||||||
|
+ uristr->SetData( aURI );
|
||||||
|
+ command->AppendElement( uristr, false );
|
||||||
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@ -1436,14 +1496,32 @@ new file mode 100644
|
|||||||
+ {
|
+ {
|
||||||
+ *_retval = nsnull;
|
+ *_retval = nsnull;
|
||||||
+
|
+
|
||||||
+ nsTArray<nsCString> command;
|
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
|
+ if( !command )
|
||||||
+ nsTArray<nsCString> output;
|
|
||||||
+ if( !nsKDEUtils::command( command, &output ) || output.Length() != 1 )
|
|
||||||
+ return NS_ERROR_FAILURE;
|
+ return NS_ERROR_FAILURE;
|
||||||
+
|
+
|
||||||
+ nsCString path;
|
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID );
|
||||||
+ path = output[ 0 ];
|
+ 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())
|
+ if (path.IsEmpty())
|
||||||
+ return NS_ERROR_FAILURE;
|
+ 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
|
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
|
||||||
@@ -426,16 +426,17 @@
|
@@ -440,16 +440,17 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -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
3
l10n-10.99.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:dcd19d7b588e927fd79333bed7ad88838426767fbedcb06d45702b3aa3901b6d
|
||||||
|
size 47338704
|
@ -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.
|
|
@ -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"
|
|
@ -1,12 +1,12 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# User Joop Boonen <joop.boonen@opensuse.org>
|
# User Joop Boonen <joop.boonen@opensuse.org>
|
||||||
# Parent be20a0ae420eb2b3584ce2c5d241e2817bac8593
|
# Parent 5f38d3aa0414fe0ac7ff1f0b47da44069e7ccdda
|
||||||
Add configure option to allow disabling of neon.
|
Add configure option to allow disabling of neon.
|
||||||
|
|
||||||
diff --git a/configure.in b/configure.in
|
diff --git a/configure.in b/configure.in
|
||||||
--- a/configure.in
|
--- a/configure.in
|
||||||
+++ b/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"
|
ASFLAGS="$ASFLAGS $all_flags"
|
||||||
if test -n "$thumb_flag"; then
|
if test -n "$thumb_flag"; then
|
||||||
LDFLAGS="$LDFLAGS $thumb_flag"
|
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
|
- # We try to link so that this also fails when
|
||||||
- # building with LTO.
|
- # building with LTO.
|
||||||
- AC_TRY_LINK([],
|
- 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,
|
+MOZ_ARG_DISABLE_BOOL(neon,
|
||||||
+[ --disable-neon Disable neon extensions],
|
+[ --disable-neon Disable neon extensions],
|
||||||
+ NS_DISABLE_NEON=1,
|
+ 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
|
+ # We try to link so that this also fails when
|
||||||
+ # building with LTO.
|
+ # building with LTO.
|
||||||
+ AC_TRY_LINK([],
|
+ AC_TRY_LINK([],
|
||||||
+ [asm("uqadd8 r1, r1, r2");],
|
[asm("uqadd8 r1, r1, r2");],
|
||||||
+ result="yes", result="no")
|
result="yes", result="no")
|
||||||
|
- AC_MSG_RESULT("$result")
|
||||||
|
- if test "$result" = "yes"; then
|
||||||
+ AC_MSG_RESULT("$result")
|
+ AC_MSG_RESULT("$result")
|
||||||
+ if test "$result" = "yes"; then
|
+ if test "$result" = "yes"; then
|
||||||
+ AC_DEFINE(HAVE_ARM_SIMD)
|
AC_DEFINE(HAVE_ARM_SIMD)
|
||||||
+ HAVE_ARM_SIMD=1
|
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
|
+ fi
|
||||||
+
|
+
|
||||||
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
|
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
|
||||||
+ # We try to link so that this also fails when
|
+ # We try to link so that this also fails when
|
||||||
+ # building with LTO.
|
+ # building with LTO.
|
||||||
+ AC_TRY_LINK([],
|
+ AC_TRY_LINK([],
|
||||||
+ [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
|
[asm(".fpu neon\n vadd.i8 d0, d0, d0");],
|
||||||
+ result="yes", result="no")
|
result="yes", result="no")
|
||||||
|
- AC_MSG_RESULT("$result")
|
||||||
|
- if test "$result" = "yes"; then
|
||||||
+ AC_MSG_RESULT("$result")
|
+ AC_MSG_RESULT("$result")
|
||||||
+ if test "$result" = "yes"; then
|
+ if test "$result" = "yes"; then
|
||||||
+ AC_DEFINE(HAVE_ARM_NEON)
|
AC_DEFINE(HAVE_ARM_NEON)
|
||||||
+ HAVE_ARM_NEON=1
|
HAVE_ARM_NEON=1
|
||||||
|
- fi
|
||||||
|
-fi # CPU_ARCH = arm
|
||||||
+ fi
|
+ fi
|
||||||
+ fi # CPU_ARCH = arm
|
+ fi # CPU_ARCH = arm
|
||||||
+fi
|
+fi
|
||||||
@ -75,14 +67,14 @@ diff --git a/configure.in b/configure.in
|
|||||||
AC_SUBST(HAVE_ARM_SIMD)
|
AC_SUBST(HAVE_ARM_SIMD)
|
||||||
AC_SUBST(HAVE_ARM_NEON)
|
AC_SUBST(HAVE_ARM_NEON)
|
||||||
|
|
||||||
dnl ========================================================
|
dnl =================================================================
|
||||||
dnl Android libstdc++, placed here so it can use MOZ_ARCH
|
dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
|
||||||
dnl computed above.
|
dnl which is bad when cross compiling.
|
||||||
dnl ========================================================
|
dnl =================================================================
|
||||||
diff --git a/js/src/configure.in b/js/src/configure.in
|
diff --git a/js/src/configure.in b/js/src/configure.in
|
||||||
--- a/js/src/configure.in
|
--- a/js/src/configure.in
|
||||||
+++ b/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"
|
ASFLAGS="$ASFLAGS $all_flags"
|
||||||
if test -n "$thumb_flag"; then
|
if test -n "$thumb_flag"; then
|
||||||
LDFLAGS="$LDFLAGS $thumb_flag"
|
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
|
- # We try to link so that this also fails when
|
||||||
- # building with LTO.
|
- # building with LTO.
|
||||||
- AC_TRY_LINK([],
|
- 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,
|
+MOZ_ARG_DISABLE_BOOL(neon,
|
||||||
+[ --disable-neon Disable neon extensions],
|
+[ --disable-neon Disable neon extensions],
|
||||||
+ NS_DISABLE_NEON=1,
|
+ 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
|
+ # We try to link so that this also fails when
|
||||||
+ # building with LTO.
|
+ # building with LTO.
|
||||||
+ AC_TRY_LINK([],
|
+ AC_TRY_LINK([],
|
||||||
+ [asm("uqadd8 r1, r1, r2");],
|
[asm("uqadd8 r1, r1, r2");],
|
||||||
+ result="yes", result="no")
|
result="yes", result="no")
|
||||||
|
- AC_MSG_RESULT("$result")
|
||||||
|
- if test "$result" = "yes"; then
|
||||||
+ AC_MSG_RESULT("$result")
|
+ AC_MSG_RESULT("$result")
|
||||||
+ if test "$result" = "yes"; then
|
+ if test "$result" = "yes"; then
|
||||||
+ AC_DEFINE(HAVE_ARM_SIMD)
|
AC_DEFINE(HAVE_ARM_SIMD)
|
||||||
+ HAVE_ARM_SIMD=1
|
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
|
+ fi
|
||||||
+
|
+
|
||||||
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
|
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
|
||||||
+ # We try to link so that this also fails when
|
+ # We try to link so that this also fails when
|
||||||
+ # building with LTO.
|
+ # building with LTO.
|
||||||
+ AC_TRY_LINK([],
|
+ AC_TRY_LINK([],
|
||||||
+ [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
|
[asm(".fpu neon\n vadd.i8 d0, d0, d0");],
|
||||||
+ result="yes", result="no")
|
result="yes", result="no")
|
||||||
|
- AC_MSG_RESULT("$result")
|
||||||
|
- if test "$result" = "yes"; then
|
||||||
+ AC_MSG_RESULT("$result")
|
+ AC_MSG_RESULT("$result")
|
||||||
+ if test "$result" = "yes"; then
|
+ if test "$result" = "yes"; then
|
||||||
+ AC_DEFINE(HAVE_ARM_NEON)
|
AC_DEFINE(HAVE_ARM_NEON)
|
||||||
+ HAVE_ARM_NEON=1
|
HAVE_ARM_NEON=1
|
||||||
|
- fi
|
||||||
|
-fi # CPU_ARCH = arm
|
||||||
+ fi
|
+ fi
|
||||||
+ fi # CPU_ARCH = arm
|
+ fi # CPU_ARCH = arm
|
||||||
+fi
|
+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_SIMD)
|
||||||
AC_SUBST(HAVE_ARM_NEON)
|
AC_SUBST(HAVE_ARM_NEON)
|
||||||
|
|
||||||
dnl ========================================================
|
dnl =================================================================
|
||||||
dnl Android libstdc++, placed here so it can use MOZ_ARCH
|
dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
|
||||||
dnl computed above.
|
dnl which is bad when cross compiling.
|
||||||
dnl ========================================================
|
dnl =================================================================
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# Parent e589abb2c4d6aaa6083d254416211ac90360dbdd
|
# Parent 364802dc5df3b480143a54d318ceef74f32453fb
|
||||||
NO-BUG: Ignore a hack which is not needed in distribution build environments.
|
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
|
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
|
--- a/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
|
||||||
+++ b/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)
|
$(NULL)
|
||||||
|
|
||||||
# force C++ linking
|
# force C++ linking
|
||||||
CPP_PROG_LINK = 1
|
CPP_PROG_LINK = 1
|
||||||
FORCE_USE_PIC = 1
|
|
||||||
|
|
||||||
#XXX: bug 554854 causes us to be unable to run binaries on the build slaves
|
#XXX: bug 554854 causes us to be unable to run binaries on the build slaves
|
||||||
# due to them having an older libstdc++
|
# due to them having an older libstdc++
|
||||||
|
@ -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
|
diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
|
||||||
--- a/modules/libpref/src/Makefile.in
|
--- a/modules/libpref/src/Makefile.in
|
||||||
+++ b/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.");
|
NS_WARNING("Error parsing application default preferences.");
|
||||||
|
|
||||||
// Load jar:$app/omni.jar!/defaults/preferences/*.js
|
// 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) {
|
if (appJarReader) {
|
||||||
rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr);
|
rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr);
|
||||||
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
|
||||||
@ -164,7 +170,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
|
|||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
#include "AndroidBridge.h"
|
#include "AndroidBridge.h"
|
||||||
#endif
|
#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<nsIFileURL> fileURL = do_QueryInterface(mTarget);
|
||||||
nsCOMPtr<nsIFile> file;
|
nsCOMPtr<nsIFile> file;
|
||||||
nsAutoString path;
|
nsAutoString path;
|
||||||
@ -660,7 +666,7 @@ new file mode 100644
|
|||||||
+ <parameter name="evt"/>
|
+ <parameter name="evt"/>
|
||||||
+ <body>
|
+ <body>
|
||||||
+ <![CDATA[
|
+ <![CDATA[
|
||||||
+ if (evt.getPreventDefault())
|
+ if (evt.defaultPrevented)
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
+ var btn = this.getButton(this.defaultButton);
|
+ var btn = this.getButton(this.defaultButton);
|
||||||
@ -678,7 +684,7 @@ new file mode 100644
|
|||||||
+ <handler event="keypress" keycode="VK_RETURN"
|
+ <handler event="keypress" keycode="VK_RETURN"
|
||||||
+ group="system" action="this._hitEnter(event);"/>
|
+ group="system" action="this._hitEnter(event);"/>
|
||||||
+ <handler event="keypress" keycode="VK_ESCAPE" group="system">
|
+ <handler event="keypress" keycode="VK_ESCAPE" group="system">
|
||||||
+ if (!event.getPreventDefault())
|
+ if (!event.defaultPrevented)
|
||||||
+ this.cancelDialog();
|
+ this.cancelDialog();
|
||||||
+ </handler>
|
+ </handler>
|
||||||
+#ifdef XP_MACOSX
|
+#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
|
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
|
||||||
@@ -44,32 +44,35 @@
|
@@ -45,16 +45,18 @@
|
||||||
#include "nsIURI.h"
|
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsArrayUtils.h"
|
#include "nsArrayUtils.h"
|
||||||
#include "prnetdb.h"
|
#include "prnetdb.h"
|
||||||
@ -2095,6 +2100,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
|
|||||||
#include "nsPrintfCString.h"
|
#include "nsPrintfCString.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
|
#include "nsIGSettingsService.h"
|
||||||
+#include "nsVoidArray.h"
|
+#include "nsVoidArray.h"
|
||||||
+#include "nsKDEUtils.h"
|
+#include "nsKDEUtils.h"
|
||||||
|
|
||||||
@ -2105,14 +2111,15 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
|
|||||||
|
|
||||||
nsUnixSystemProxySettings() {}
|
nsUnixSystemProxySettings() {}
|
||||||
nsresult Init();
|
nsresult Init();
|
||||||
|
@@ -64,16 +66,17 @@ private:
|
||||||
private:
|
|
||||||
~nsUnixSystemProxySettings() {}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIGConfService> mGConf;
|
nsCOMPtr<nsIGConfService> mGConf;
|
||||||
|
nsCOMPtr<nsIGSettingsService> mGSettings;
|
||||||
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);
|
||||||
|
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);
|
+ 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
|
nsresult
|
||||||
nsUnixSystemProxySettings::Init()
|
nsUnixSystemProxySettings::Init()
|
||||||
{
|
{
|
||||||
mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
// If this is a GNOME session, load gconf and try to use its preferences.
|
||||||
@@ -408,16 +411,19 @@ nsUnixSystemProxySettings::GetProxyForUR
|
@@ -526,16 +529,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);
|
||||||
@ -2132,17 +2139,17 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
+ if( nsKDEUtils::kdeSupport())
|
+ if( nsKDEUtils::kdeSupport())
|
||||||
+ return GetProxyFromKDE( scheme, host, port, aResult );
|
+ return GetProxyFromKDE(scheme, host, port, aResult);
|
||||||
+
|
+
|
||||||
if (!mGConf)
|
if (mGSettings) {
|
||||||
return GetProxyFromEnvironment(scheme, host, port, aResult);
|
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);
|
@@ -561,8 +567,34 @@ static const mozilla::Module::ContractID
|
||||||
}
|
|
||||||
|
|
||||||
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
|
|
||||||
{ 0x0fa3158c, 0xd5a7, 0x43de, \
|
|
||||||
@@ -438,8 +444,34 @@ static const mozilla::Module::ContractID
|
|
||||||
|
|
||||||
static const mozilla::Module kUnixProxyModule = {
|
static const mozilla::Module kUnixProxyModule = {
|
||||||
mozilla::Module::kVersion,
|
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( NS_LITERAL_CSTRING( "GETPROXY" ));
|
||||||
+ command.AppendElement( url );
|
+ command.AppendElement( url );
|
||||||
+ nsTArray<nsCString> result;
|
+ nsTArray<nsCString> result;
|
||||||
+ if( !nsKDEUtils::command( command, &result ) || result.Count() != 1 )
|
+ if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 )
|
||||||
+ return NS_ERROR_FAILURE;
|
+ return NS_ERROR_FAILURE;
|
||||||
+ aResult = *result[ 0 ];
|
+ aResult = result[0];
|
||||||
+ return NS_OK;
|
+ return NS_OK;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
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
|
||||||
@@ -95,17 +95,18 @@ else
|
@@ -96,17 +96,18 @@ else
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||||
CMMSRCS = nsNativeAppSupportCocoa.mm
|
CMMSRCS = nsNativeAppSupportCocoa.mm
|
||||||
EXPORTS = MacQuirks.h
|
EXPORTS += MacQuirks.h
|
||||||
else
|
else
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||||
CPPSRCS += nsNativeAppSupportOS2.cpp
|
CPPSRCS += nsNativeAppSupportOS2.cpp
|
||||||
@ -2204,7 +2211,7 @@ diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
|
|||||||
new file mode 100644
|
new file mode 100644
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/toolkit/xre/nsKDEUtils.cpp
|
+++ b/toolkit/xre/nsKDEUtils.cpp
|
||||||
@@ -0,0 +1,330 @@
|
@@ -0,0 +1,372 @@
|
||||||
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
+/* ***** 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
|
||||||
@ -2244,6 +2251,10 @@ new file mode 100644
|
|||||||
+
|
+
|
||||||
+#include "nsKDEUtils.h"
|
+#include "nsKDEUtils.h"
|
||||||
+#include "nsIWidget.h"
|
+#include "nsIWidget.h"
|
||||||
|
+#include "nsISupportsPrimitives.h"
|
||||||
|
+#include "nsIMutableArray.h"
|
||||||
|
+#include "nsComponentManagerUtils.h"
|
||||||
|
+#include "nsArrayUtils.h"
|
||||||
+
|
+
|
||||||
+#include <gtk/gtk.h>
|
+#include <gtk/gtk.h>
|
||||||
+
|
+
|
||||||
@ -2302,7 +2313,7 @@ new file mode 100644
|
|||||||
+ nsTArray<nsCString> command;
|
+ nsTArray<nsCString> command;
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( "CHECK" ));
|
+ command.AppendElement( NS_LITERAL_CSTRING( "CHECK" ));
|
||||||
+ command.AppendElement( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION )));
|
+ command.AppendElement( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION )));
|
||||||
+ bool kde = nsKDEUtils::command( command.get() );
|
+ bool kde = nsKDEUtils::command( command );
|
||||||
+#ifdef DEBUG_KDE
|
+#ifdef DEBUG_KDE
|
||||||
+ fprintf( stderr, "KDE RUNNING %d\n", kde );
|
+ fprintf( stderr, "KDE RUNNING %d\n", kde );
|
||||||
+#endif
|
+#endif
|
||||||
@ -2395,6 +2406,46 @@ new file mode 100644
|
|||||||
+ return self()->internalCommand( command, NULL, false, output );
|
+ 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 )
|
+bool nsKDEUtils::commandBlockUi( const nsTArray<nsCString>& command, const GtkWindow* parent, nsTArray<nsCString>* output )
|
||||||
+ {
|
+ {
|
||||||
+ return self()->internalCommand( command, parent, true, 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,
|
+bool nsKDEUtils::internalCommand( const nsTArray<nsCString>& command, const GtkWindow* parent, bool blockUi,
|
||||||
+ nsTArray<nsCString>* output )
|
+ nsTArray<nsCString>* output )
|
||||||
+ {
|
+ {
|
||||||
+ nsCString internal_command;
|
|
||||||
+ internal_command.AssignLiteral(command);
|
|
||||||
+ if( !startHelper())
|
+ if( !startHelper())
|
||||||
+ return false;
|
+ return false;
|
||||||
+ feedCommand(internal_command);
|
+ feedCommand( command );
|
||||||
+ // do not store the data in 'this' but in extra structure, just in case there
|
+ // 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)
|
+ // is reentrancy (can there be? the event loop is re-entered)
|
||||||
+ nsKDECommandData data;
|
+ nsKDECommandData data;
|
||||||
@ -2539,7 +2588,7 @@ diff --git a/toolkit/xre/nsKDEUtils.h b/toolkit/xre/nsKDEUtils.h
|
|||||||
new file mode 100644
|
new file mode 100644
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/toolkit/xre/nsKDEUtils.h
|
+++ 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 -*-
|
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||||
+ *
|
+ *
|
||||||
+ * ***** BEGIN LICENSE BLOCK *****
|
+ * ***** BEGIN LICENSE BLOCK *****
|
||||||
@ -2587,6 +2636,8 @@ new file mode 100644
|
|||||||
+
|
+
|
||||||
+typedef struct _GtkWindow GtkWindow;
|
+typedef struct _GtkWindow GtkWindow;
|
||||||
+
|
+
|
||||||
|
+class nsIArray;
|
||||||
|
+
|
||||||
+class NS_EXPORT nsKDEUtils
|
+class NS_EXPORT nsKDEUtils
|
||||||
+ {
|
+ {
|
||||||
+ public:
|
+ public:
|
||||||
@ -2599,6 +2650,7 @@ new file mode 100644
|
|||||||
+ static bool kdeSupport();
|
+ static bool kdeSupport();
|
||||||
+ /* Executes the given helper command, returns true if helper returned success. */
|
+ /* 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( 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
|
+ /* 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,
|
+ a modal dialog shown and enters the event loop (i.e. there are still paint updates,
|
||||||
+ this is for commands that take long). */
|
+ 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
|
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
|
||||||
@@ -88,18 +88,19 @@ LOCAL_INCLUDES = -I$(srcdir)
|
@@ -92,18 +92,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 \
|
||||||
@ -3273,27 +3325,27 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
|
|||||||
|
|
||||||
mFilters.AppendElement(filter);
|
mFilters.AppendElement(filter);
|
||||||
mFilterNames.AppendElement(name);
|
mFilterNames.AppendElement(name);
|
||||||
@@ -433,16 +437,19 @@ confirm_overwrite_file(GtkWidget *parent
|
@@ -390,16 +394,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
|
||||||
gtk_widget_destroy(dialog);
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsFilePicker::Show(PRInt16 *aReturn)
|
nsFilePicker::Show(PRInt16 *aReturn)
|
||||||
{
|
{
|
||||||
+ if( nsKDEUtils::kdeSupport())
|
|
||||||
+ return kdeFileDialog( aReturn );
|
|
||||||
+
|
|
||||||
NS_ENSURE_ARG_POINTER(aReturn);
|
NS_ENSURE_ARG_POINTER(aReturn);
|
||||||
|
|
||||||
|
+ if( nsKDEUtils::kdeSupport())
|
||||||
|
+ return kdeFileDialog(aReturn);
|
||||||
|
+
|
||||||
nsXPIDLCString title;
|
nsXPIDLCString title;
|
||||||
title.Adopt(ToNewUTF8String(mTitle));
|
title.Adopt(ToNewUTF8String(mTitle));
|
||||||
|
|
||||||
GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
|
GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
|
||||||
|
|
||||||
GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
|
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;
|
*aReturn = nsIFilePicker::returnCancel;
|
||||||
break;
|
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
|
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
|
||||||
@@ -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
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_COM
|
DEFINES += -D_IMPL_NS_COM
|
||||||
@ -3585,7 +3637,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||||||
const char* directive;
|
const char* directive;
|
||||||
int argc;
|
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(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");
|
||||||
@ -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(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(ANDROID)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
|
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3603,7 +3655,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||||||
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
|
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
|
||||||
|
|
||||||
nsAutoString appID;
|
nsAutoString appID;
|
||||||
@@ -481,41 +483,46 @@ ParseManifestCommon(NSLocationType aType
|
@@ -476,41 +478,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);
|
||||||
@ -3635,7 +3687,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||||||
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(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);
|
||||||
@ -3650,11 +3702,11 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||||||
|
|
||||||
char *token;
|
char *token;
|
||||||
char *newline = buf;
|
char *newline = buf;
|
||||||
@@ -597,24 +604,26 @@ ParseManifestCommon(NSLocationType aType
|
@@ -592,24 +599,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(ANDROID)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
TriState stTablet = eUnspecified;
|
TriState stTablet = eUnspecified;
|
||||||
#endif
|
#endif
|
||||||
bool platform = false;
|
bool platform = false;
|
||||||
@ -3674,10 +3726,10 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||||||
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion))
|
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#if defined(ANDROID)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
bool tablet = false;
|
bool tablet = false;
|
||||||
if (CheckFlag(kTablet, wtoken, tablet)) {
|
if (CheckFlag(kTablet, wtoken, tablet)) {
|
||||||
@@ -643,16 +652,17 @@ ParseManifestCommon(NSLocationType aType
|
@@ -638,16 +647,17 @@ ParseManifest(NSLocationType type, FileL
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ok ||
|
if (!ok ||
|
||||||
@ -3687,7 +3739,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
|
|||||||
stOs == eBad ||
|
stOs == eBad ||
|
||||||
stOsVersion == eBad ||
|
stOsVersion == eBad ||
|
||||||
+ stDesktop == eBad ||
|
+ stDesktop == eBad ||
|
||||||
#ifdef ANDROID
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
stTablet == eBad ||
|
stTablet == eBad ||
|
||||||
#endif
|
#endif
|
||||||
stABI == eBad)
|
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
|
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
|
||||||
@@ -190,17 +190,17 @@ include $(topsrcdir)/ipc/chromium/chromi
|
@@ -188,17 +188,17 @@ include $(topsrcdir)/ipc/chromium/chromi
|
||||||
DEFINES += -D_IMPL_NS_COM
|
DEFINES += -D_IMPL_NS_COM
|
||||||
|
|
||||||
ifeq ($(OS_ARCH),Linux)
|
ifeq ($(OS_ARCH),Linux)
|
||||||
|
@ -9,7 +9,8 @@ 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
|
||||||
@@ -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)
|
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
|
||||||
@ -17,13 +18,15 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
|
|||||||
nsresult
|
nsresult
|
||||||
nsUnixSystemProxySettings::Init()
|
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 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")) {
|
||||||
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
|
||||||
|
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
|
||||||
+ }
|
+ }
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -1,28 +1,28 @@
|
|||||||
# HG changeset patch
|
# HG changeset patch
|
||||||
# Parent 07dc7ea11c92368cb7c137a403feaaa6861abb3c
|
# Parent e315e5900fa90c2183edccd211fbe1e81cdb4c5f
|
||||||
|
|
||||||
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
|
diff --git a/build/Makefile.in b/build/Makefile.in
|
||||||
--- a/browser/app/Makefile.in
|
--- a/build/Makefile.in
|
||||||
+++ b/browser/app/Makefile.in
|
+++ b/build/Makefile.in
|
||||||
@@ -68,17 +68,17 @@ GRE_BUILDID = $(shell $(PYTHON) $(topsrc
|
@@ -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 ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
|
||||||
|
|
||||||
MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) 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
|
||||||
|
|
||||||
-SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
|
_dollar=$$
|
||||||
+SOURCE_REPO ?= $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
|
-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
|
ifdef SOURCE_REPO
|
||||||
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
|
DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DEFINES += -DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
|
DEFINES += \
|
||||||
-DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)"
|
-DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
|
||||||
|
-DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)" \
|
||||||
ifdef MOZ_APP_PROFILE
|
-DMOZ_APP_ID="$(MOZ_APP_ID)" \
|
||||||
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
|
||||||
@ -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
|
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
|
||||||
@@ -154,20 +154,20 @@ SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME
|
@@ -156,20 +156,20 @@ SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME
|
||||||
TEST_PACKAGE = $(PKG_BASENAME).tests.zip
|
TEST_PACKAGE = $(PKG_BASENAME).tests.zip
|
||||||
|
|
||||||
ifneq (,$(wildcard $(DIST)/bin/application.ini))
|
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
|
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
|
||||||
@@ -227,17 +227,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR
|
@@ -235,17 +235,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ References:
|
|||||||
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
|
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
|
||||||
--- a/config/autoconf.mk.in
|
--- a/config/autoconf.mk.in
|
||||||
+++ b/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_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
|
||||||
|
|
||||||
MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
|
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
|
diff --git a/configure.in b/configure.in
|
||||||
--- a/configure.in
|
--- a/configure.in
|
||||||
+++ b/configure.in
|
+++ b/configure.in
|
||||||
@@ -8093,16 +8093,31 @@ AC_SUBST(QCMS_LIBS)
|
@@ -8213,16 +8213,31 @@ AC_SUBST(QCMS_LIBS)
|
||||||
|
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl HarfBuzz
|
dnl HarfBuzz
|
||||||
@ -55,23 +55,23 @@ diff --git a/configure.in b/configure.in
|
|||||||
+AC_SUBST(NSSHELPER_LIBS)
|
+AC_SUBST(NSSHELPER_LIBS)
|
||||||
+
|
+
|
||||||
+dnl ========================================================
|
+dnl ========================================================
|
||||||
dnl OTS
|
dnl SIL Graphite
|
||||||
dnl ========================================================
|
|
||||||
MOZ_OTS_LIBS='$(DEPTH)/gfx/ots/src/$(LIB_PREFIX)mozots.$(LIB_SUFFIX)'
|
|
||||||
AC_SUBST(MOZ_OTS_LIBS)
|
|
||||||
|
|
||||||
dnl ========================================================
|
|
||||||
dnl Skia
|
|
||||||
dnl ========================================================
|
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
|
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
|
||||||
--- a/security/manager/ssl/src/Makefile.in
|
--- a/security/manager/ssl/src/Makefile.in
|
||||||
+++ b/security/manager/ssl/src/Makefile.in
|
+++ b/security/manager/ssl/src/Makefile.in
|
||||||
@@ -114,12 +114,14 @@ CSRCS += md4.c
|
@@ -118,12 +118,14 @@ EXTRA_DEPS = $(NSS_DEP_LIBS)
|
||||||
|
DEFINES += \
|
||||||
|
-DNSS_ENABLE_ECC \
|
||||||
EXTRA_DEPS = $(NSS_DEP_LIBS)
|
-DDLL_PREFIX=\"$(DLL_PREFIX)\" \
|
||||||
|
-DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
|
||||||
DEFINES += -DNSS_ENABLE_ECC
|
$(NULL)
|
||||||
|
|
||||||
# Use local includes because they are inserted before INCLUDES
|
# Use local includes because they are inserted before INCLUDES
|
||||||
# so that Mozilla's nss.h is used, not glibc's
|
# 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 "nsNSSComponent.h"
|
||||||
#include "nsNSSCallbacks.h"
|
#include "nsNSSCallbacks.h"
|
||||||
#include "nsNSSIOLayer.h"
|
#include "nsNSSIOLayer.h"
|
||||||
#include "nsSSLThread.h"
|
|
||||||
#include "nsCertVerificationThread.h"
|
#include "nsCertVerificationThread.h"
|
||||||
|
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsAppDirectoryServiceDefs.h"
|
#include "nsAppDirectoryServiceDefs.h"
|
||||||
@@ -1725,18 +1732,34 @@ nsNSSComponent::InitializeNSS(bool showW
|
#include "nsDirectoryService.h"
|
||||||
|
@@ -1733,18 +1740,34 @@ nsNSSComponent::InitializeNSS(bool showW
|
||||||
ConfigureInternalPKCS11Token();
|
ConfigureInternalPKCS11Token();
|
||||||
|
|
||||||
// The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
|
// 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
|
diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
|
||||||
--- a/toolkit/library/Makefile.in
|
--- a/toolkit/library/Makefile.in
|
||||||
+++ b/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
|
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)
|
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS)
|
||||||
|
|
||||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||||
CXXFLAGS += $(TK_CFLAGS)
|
CXXFLAGS += $(TK_CFLAGS)
|
||||||
OS_LIBS += \
|
OS_LIBS += \
|
||||||
-framework SystemConfiguration \
|
-framework SystemConfiguration \
|
||||||
-framework QuickTime \
|
-framework QuickTime \
|
||||||
-framework IOKit \
|
-framework IOKit \
|
||||||
-F/System/Library/PrivateFrameworks -framework CoreUI \
|
-F/System/Library/PrivateFrameworks -framework CoreUI \
|
||||||
|
@ -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
|
// <intrin.h> conflicts with <windows.h> on MSVC 2005, and some files want to
|
||||||
// include both SSE.h and <windows.h>.
|
// 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
|
// cpuid.h is available on gcc 4.3 and higher on i386 and x86_64
|
||||||
-#include <cpuid.h>
|
-#include <cpuid.h>
|
||||||
|
@ -1,23 +1,20 @@
|
|||||||
From: Mike Hommey <mh@glandium.org>
|
# HG changeset patch
|
||||||
Date: Sat, 24 Dec 2011 09:56:58 +0100
|
# Parent 58dd942011a81f3149d9bc34e808806bda099056
|
||||||
Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
|
# User Landry Breuil <landry@openbsd.org>
|
||||||
YARR JIT is not supported
|
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(-)
|
|
||||||
|
|
||||||
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
|
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
|
||||||
index fc48cbd..49f0bdc 100644
|
|
||||||
--- a/js/src/Makefile.in
|
--- a/js/src/Makefile.in
|
||||||
+++ b/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)/yarr/pcre \
|
||||||
+VPATH += $(srcdir)/assembler \
|
+VPATH += $(srcdir)/assembler \
|
||||||
@ -31,7 +28,6 @@ index fc48cbd..49f0bdc 100644
|
|||||||
- pcre_tables.cpp \
|
- pcre_tables.cpp \
|
||||||
- pcre_xclass.cpp \
|
- pcre_xclass.cpp \
|
||||||
- pcre_ucp_searchfuncs.cpp \
|
- pcre_ucp_searchfuncs.cpp \
|
||||||
+ Assertions.cpp \
|
|
||||||
+ OSAllocatorOS2.cpp \
|
+ OSAllocatorOS2.cpp \
|
||||||
+ OSAllocatorPosix.cpp \
|
+ OSAllocatorPosix.cpp \
|
||||||
+ OSAllocatorWin.cpp \
|
+ OSAllocatorWin.cpp \
|
||||||
@ -42,128 +38,279 @@ index fc48cbd..49f0bdc 100644
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
else
|
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
|
# Needed to "configure" it correctly. Unfortunately these
|
||||||
# flags wind up being applied to all code in js/src, not just
|
# flags wind up being applied to all code in js/src, not just
|
||||||
# the code in js/src/assembler.
|
# the code in js/src/assembler.
|
||||||
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
|
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
|
||||||
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=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
|
||||||
+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
|
+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
|
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, ®exp, &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
|
||||||
index 5f7817d..91108a7 100644
|
|
||||||
--- 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
|
||||||
@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt
|
@@ -132,26 +132,28 @@ RegExpObject::setMultiline(bool enabled)
|
||||||
return RetType(self);
|
}
|
||||||
|
|
||||||
|
inline void
|
||||||
|
RegExpObject::setSticky(bool enabled)
|
||||||
|
{
|
||||||
|
setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled));
|
||||||
}
|
}
|
||||||
|
|
||||||
+#if ENABLE_YARR_JIT
|
+#if ENABLE_YARR_JIT
|
||||||
/* This function should be deleted once bad Android platforms phase out. See bug 604774. */
|
/* This function should be deleted once bad Android platforms phase out. See bug 604774. */
|
||||||
inline bool
|
inline bool
|
||||||
RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
|
detail::RegExpCode::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)
|
|
||||||
{
|
{
|
||||||
-#if ENABLE_YARR_JIT
|
#if defined(ANDROID) && defined(JS_METHODJIT)
|
||||||
/* Parse the pattern. */
|
return cx->methodJitEnabled;
|
||||||
ErrorCode yarrError;
|
#else
|
||||||
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();
|
|
||||||
return true;
|
return true;
|
||||||
-#else /* !defined(ENABLE_YARR_JIT) */
|
#endif
|
||||||
- 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
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz
|
RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g)
|
||||||
else
|
{
|
||||||
result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
|
JS_ASSERT(ObjectClassIs(obj, ESClass_RegExp, cx));
|
||||||
#else
|
if (obj.isRegExp())
|
||||||
- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount);
|
return obj.asRegExp().getShared(cx, g);
|
||||||
+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
|
return Proxy::regexp_toShared(cx, &obj, g);
|
||||||
#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;
|
|
||||||
}
|
|
||||||
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
|
||||||
index f75c6a5..7631dd5 100644
|
|
||||||
--- a/js/src/vm/RegExpObject.cpp
|
--- a/js/src/vm/RegExpObject.cpp
|
||||||
+++ b/js/src/vm/RegExpObject.cpp
|
+++ b/js/src/vm/RegExpObject.cpp
|
||||||
@@ -251,7 +251,6 @@ Class js::RegExpClass = {
|
@@ -162,17 +162,16 @@ MatchPairs::checkAgainst(size_t inputLen
|
||||||
NULL /* trace */
|
continue;
|
||||||
};
|
JS_ASSERT(size_t(p.limit) <= inputLength);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* detail::RegExpCode */
|
||||||
|
|
||||||
-#if ENABLE_YARR_JIT
|
-#if ENABLE_YARR_JIT
|
||||||
void
|
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 */
|
-#else /* !ENABLE_YARR_JIT */
|
||||||
-
|
-
|
||||||
-void
|
-void
|
||||||
-RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
|
-RegExpCode::reportPCREError(JSContext *cx, int error)
|
||||||
-{
|
-{
|
||||||
-#define REPORT(msg_) \
|
-#define REPORT(msg_) \
|
||||||
- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
|
- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
|
||||||
- return
|
- return
|
||||||
- switch (error) {
|
- switch (error) {
|
||||||
- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
- 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 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 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
||||||
- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
|
- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
|
||||||
- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
|
- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
|
||||||
@ -184,27 +331,134 @@ index f75c6a5..7631dd5 100644
|
|||||||
- }
|
- }
|
||||||
-#undef REPORT
|
-#undef REPORT
|
||||||
-}
|
-}
|
||||||
|
-
|
||||||
-#endif /* ENABLE_YARR_JIT */
|
-#endif /* ENABLE_YARR_JIT */
|
||||||
-
|
-
|
||||||
bool
|
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
|
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
|
||||||
index 1449d56..279f3c0 100644
|
|
||||||
--- a/js/src/vm/RegExpObject.h
|
--- a/js/src/vm/RegExpObject.h
|
||||||
+++ b/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"
|
#include "yarr/Yarr.h"
|
||||||
#if ENABLE_YARR_JIT
|
#if ENABLE_YARR_JIT
|
||||||
#include "yarr/YarrJIT.h"
|
#include "yarr/YarrJIT.h"
|
||||||
|
+#endif
|
||||||
|
#include "yarr/YarrSyntaxChecker.h"
|
||||||
-#else
|
-#else
|
||||||
-#include "yarr/pcre/pcre.h"
|
-#include "yarr/pcre/pcre.h"
|
||||||
#endif
|
-#endif
|
||||||
|
|
||||||
namespace js {
|
/*
|
||||||
@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
|
* JavaScript Regular Expressions
|
||||||
/* Abstracts away the gross |RegExpPrivate| backend details. */
|
*
|
||||||
class RegExpPrivateCode
|
* 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
|
-#if ENABLE_YARR_JIT
|
||||||
typedef JSC::Yarr::BytecodePattern BytecodePattern;
|
typedef JSC::Yarr::BytecodePattern BytecodePattern;
|
||||||
@ -217,25 +471,25 @@ index 1449d56..279f3c0 100644
|
|||||||
|
|
||||||
/* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
|
/* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
|
||||||
YarrCodeBlock codeBlock;
|
YarrCodeBlock codeBlock;
|
||||||
- BytecodePattern *byteCode;
|
+#endif
|
||||||
|
BytecodePattern *byteCode;
|
||||||
-#else
|
-#else
|
||||||
- JSRegExp *compiled;
|
- JSRegExp *compiled;
|
||||||
#endif
|
-#endif
|
||||||
+ BytecodePattern *byteCode;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RegExpPrivateCode()
|
RegExpCode()
|
||||||
:
|
:
|
||||||
#if ENABLE_YARR_JIT
|
#if ENABLE_YARR_JIT
|
||||||
codeBlock(),
|
codeBlock(),
|
||||||
- byteCode(NULL)
|
+#endif
|
||||||
|
byteCode(NULL)
|
||||||
-#else
|
-#else
|
||||||
- compiled(NULL)
|
- compiled(NULL)
|
||||||
#endif
|
-#endif
|
||||||
+ byteCode(NULL)
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
~RegExpPrivateCode() {
|
~RegExpCode() {
|
||||||
#if ENABLE_YARR_JIT
|
#if ENABLE_YARR_JIT
|
||||||
codeBlock.release();
|
codeBlock.release();
|
||||||
+#endif
|
+#endif
|
||||||
@ -244,21 +498,29 @@ index 1449d56..279f3c0 100644
|
|||||||
-#else
|
-#else
|
||||||
- if (compiled)
|
- if (compiled)
|
||||||
- jsRegExpFree(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
|
-#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_YARR_JIT
|
#if ENABLE_YARR_JIT
|
||||||
static inline bool isJITRuntimeEnabled(JSContext *cx);
|
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
|
-#else
|
||||||
- void reportPCREError(JSContext *cx, int error);
|
- static void reportPCREError(JSContext *cx, int error);
|
||||||
#endif
|
-#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 size_t getOutputSize(size_t pairCount) {
|
static size_t getOutputSize(size_t pairCount) {
|
||||||
-#if ENABLE_YARR_JIT
|
-#if ENABLE_YARR_JIT
|
||||||
@ -267,13 +529,22 @@ index 1449d56..279f3c0 100644
|
|||||||
- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
|
- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
|
||||||
-#endif
|
-#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
|
||||||
index ac41d08..fb8eb86 100644
|
|
||||||
--- a/js/src/yarr/wtfbridge.h
|
--- a/js/src/yarr/wtfbridge.h
|
||||||
+++ b/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 "jsprvtd.h"
|
||||||
#include "vm/String.h"
|
#include "vm/String.h"
|
||||||
#include "assembler/wtf/Platform.h"
|
#include "assembler/wtf/Platform.h"
|
||||||
@ -283,3 +554,8 @@ index ac41d08..fb8eb86 100644
|
|||||||
|
|
||||||
namespace JSC { namespace Yarr {
|
namespace JSC { namespace Yarr {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Basic type definitions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef jschar UChar;
|
||||||
|
@ -72,7 +72,7 @@ fi
|
|||||||
|
|
||||||
mozilla_lib=`file $MOZ_PROGRAM`
|
mozilla_lib=`file $MOZ_PROGRAM`
|
||||||
LIB=lib
|
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
|
BROWSER_PLUGIN_DIR=/usr/$LIB/browser-plugins
|
||||||
if [ ! -d $BROWSER_PLUGIN_DIR ]; then
|
if [ ! -d $BROWSER_PLUGIN_DIR ]; then
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
REV=72ad46d416ce
|
REV=8c9e4873d419
|
||||||
REPO=http://hg.mozilla.org/releases/mozilla-release
|
REPO=http://hg.mozilla.org/releases/mozilla-beta
|
||||||
|
Loading…
Reference in New Issue
Block a user