1
0

Accepting request 102411 from mozilla:Factory

- update to Firefox 10.0 (bnc#744275)
  * MFSA 2012-01/CVE-2012-0442/CVE-2012-0443
    Miscellaneous memory safety hazards
  * MFSA 2012-03/CVE-2012-0445 (bmo#701071)
    <iframe> element exposed across domains via name attribute
  * MFSA 2012-04/CVE-2011-3659 (bmo#708198)
    Child nodes from nsDOMAttribute still accessible after removal
    of nodes
  * MFSA 2012-05/CVE-2012-0446 (bmo#705651)
    Frame scripts calling into untrusted objects bypass security
    checks
  * MFSA 2012-06/CVE-2012-0447 (bmo#710079)
    Uninitialized memory appended when encoding icon images may
    cause information disclosure
  * MFSA 2012-07/CVE-2012-0444 (bmo#719612)
    Potential Memory Corruption When Decoding Ogg Vorbis files
  * MFSA 2012-08/CVE-2012-0449 (bmo#701806, bmo#702466)
    Crash with malformed embedded XSLT stylesheets
- KDE integration has been disabled since it needs refactoring
- removed obsolete ppc64 patch

- Disable neon for arm as it doesn't build correctly

OBS-URL: https://build.opensuse.org/request/show/102411
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaFirefox?expand=0&rev=141
This commit is contained in:
Stephan Kulow 2012-02-02 16:58:06 +00:00 committed by Git OBS Bridge
commit e5281c0a89
18 changed files with 551 additions and 324 deletions

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Mon Jan 30 09:41:59 UTC 2012 - wr@rosenauer.org
- update to Firefox 10.0 (bnc#744275)
* MFSA 2012-01/CVE-2012-0442/CVE-2012-0443
Miscellaneous memory safety hazards
* MFSA 2012-03/CVE-2012-0445 (bmo#701071)
<iframe> element exposed across domains via name attribute
* MFSA 2012-04/CVE-2011-3659 (bmo#708198)
Child nodes from nsDOMAttribute still accessible after removal
of nodes
* MFSA 2012-05/CVE-2012-0446 (bmo#705651)
Frame scripts calling into untrusted objects bypass security
checks
* MFSA 2012-06/CVE-2012-0447 (bmo#710079)
Uninitialized memory appended when encoding icon images may
cause information disclosure
* MFSA 2012-07/CVE-2012-0444 (bmo#719612)
Potential Memory Corruption When Decoding Ogg Vorbis files
* MFSA 2012-08/CVE-2012-0449 (bmo#701806, bmo#702466)
Crash with malformed embedded XSLT stylesheets
- KDE integration has been disabled since it needs refactoring
- removed obsolete ppc64 patch
-------------------------------------------------------------------
Sun Jan 22 12:08:07 UTC 2012 - joop.boonen@opensuse.org
- Disable neon for arm as it doesn't build correctly
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 23 17:02:01 UTC 2011 - wr@rosenauer.org Fri Dec 23 17:02:01 UTC 2011 - wr@rosenauer.org

View File

@ -1,8 +1,8 @@
# #
# spec file for package MozillaFirefox # spec file for package MozillaFirefox
# #
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 2006-2011 Wolfgang Rosenauer # 2006-2012 Wolfgang Rosenauer
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
# #
%define major 9 %define major 10
%define mainver %major.0 %define mainver %major.0
Name: MozillaFirefox Name: MozillaFirefox
@ -45,9 +45,9 @@ BuildRequires: wireless-tools
BuildRequires: mozilla-nspr-devel >= 4.8.9 BuildRequires: mozilla-nspr-devel >= 4.8.9
BuildRequires: mozilla-nss-devel >= 3.13.1 BuildRequires: mozilla-nss-devel >= 3.13.1
BuildRequires: nss-shared-helper-devel BuildRequires: nss-shared-helper-devel
Version: %{mainver}.1 Version: %{mainver}
Release: 0 Release: 0
%define releasedate 2011122000 %define releasedate 2012012900
Provides: web_browser Provides: web_browser
Provides: firefox = %{version}-%{release} Provides: firefox = %{version}-%{release}
Provides: firefox = %{mainver} Provides: firefox = %{mainver}
@ -86,8 +86,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-ppc64.patch Patch13: mozilla-a11y.patch
Patch14: mozilla-a11y.patch Patch14: mozilla-disable-neon-option.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
@ -204,7 +204,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
@ -220,10 +220,10 @@ cd $RPM_BUILD_DIR/mozilla
%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
@ -236,11 +236,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
@ -278,7 +278,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=default ac_add_options --enable-update-channel=release
EOF EOF
%if %suse_version > 1130 %if %suse_version > 1130
cat << EOF >> $MOZCONFIG cat << EOF >> $MOZCONFIG
@ -301,6 +301,12 @@ cat << EOF >> $MOZCONFIG
ac_add_options --disable-crashreporter ac_add_options --disable-crashreporter
EOF EOF
%endif %endif
# Disable neon for arm as it does not build correctly
%ifarch %arm
cat << EOF >> $MOZCONFIG
ac_add_options --disable-neon
EOF
%endif
make -f client.mk build make -f client.mk build
%install %install
@ -517,7 +523,6 @@ exit 0
%{progdir}/distribution/extensions/ %{progdir}/distribution/extensions/
%{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} %{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
%{progdir}/icons/ %{progdir}/icons/
%{progdir}/hyphenation/
%{progdir}/searchplugins/ %{progdir}/searchplugins/
%attr(755,root,root) %{progdir}/%{progname}.sh %attr(755,root,root) %{progdir}/%{progname}.sh
%{progdir}/firefox-bin %{progdir}/firefox-bin
@ -527,7 +532,7 @@ exit 0
%{progdir}/dependentlibs.list %{progdir}/dependentlibs.list
%{progdir}/*.so %{progdir}/*.so
%{progdir}/mozilla-xremote-client %{progdir}/mozilla-xremote-client
%{progdir}/omni.jar %{progdir}/omni.ja
%{progdir}/platform.ini %{progdir}/platform.ini
%{progdir}/plugin-container %{progdir}/plugin-container
%if %crashreporter %if %crashreporter

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:9b1a2ea89395fa658ce6b9688f98d8e84f59f3da97169853e174fa0bae7ca21d oid sha256:d9aef9aa9921cbc4a36c72e5912597e4a0e524a1fb747ce194b5b74c2ec52ee2
size 25683 size 25675

View File

@ -2,8 +2,8 @@
CHANNEL="release" CHANNEL="release"
BRANCH="releases/mozilla-$CHANNEL" BRANCH="releases/mozilla-$CHANNEL"
RELEASE_TAG="FIREFOX_9_0_1_RELEASE" RELEASE_TAG="FIREFOX_10_0_RELEASE"
VERSION="9.0.1" VERSION="10.0"
# mozilla # mozilla
hg clone http://hg.mozilla.org/$BRANCH mozilla hg clone http://hg.mozilla.org/$BRANCH mozilla

View File

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

View File

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

View File

@ -2,7 +2,7 @@ diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/browser/base/content/browser-kde.xul +++ b/browser/base/content/browser-kde.xul
@@ -0,0 +1,1054 @@ @@ -0,0 +1,1111 @@
+#filter substitution +#filter substitution
+<?xml version="1.0"?> +<?xml version="1.0"?>
+# -*- Mode: HTML -*- +# -*- Mode: HTML -*-
@ -477,6 +477,7 @@ new file mode 100644
+ +
+ <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional" + <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
+ context="backForwardMenu" removable="true" + context="backForwardMenu" removable="true"
+ forwarddisabled="true"
+ title="&backForwardItem.title;"> + title="&backForwardItem.title;">
+ <toolbarbutton id="back-button" class="toolbarbutton-1" + <toolbarbutton id="back-button" class="toolbarbutton-1"
+ label="&backCmd.label;" + label="&backCmd.label;"
@ -488,6 +489,13 @@ new file mode 100644
+ command="Browser:ForwardOrForwardDuplicate" + command="Browser:ForwardOrForwardDuplicate"
+ onclick="checkForMiddleClick(this, event);" + onclick="checkForMiddleClick(this, event);"
+ tooltip="forward-button-tooltip"/> + tooltip="forward-button-tooltip"/>
+ <dummyobservertarget hidden="true"
+ onbroadcast="if (this.getAttribute('disabled') == 'true')
+ this.parentNode.setAttribute('forwarddisabled', 'true');
+ else
+ this.parentNode.removeAttribute('forwarddisabled');">
+ <observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
+ </dummyobservertarget>
+ </toolbaritem> + </toolbaritem>
+ +
+ <toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true" + <toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
@ -963,22 +971,63 @@ new file mode 100644
+ onclick="return contentAreaClick(event, false);"/> + onclick="return contentAreaClick(event, false);"/>
+ <statuspanel id="statusbar-display" inactive="true"/> + <statuspanel id="statusbar-display" inactive="true"/>
+ </vbox> + </vbox>
+ <splitter id="devtools-side-splitter" hidden="true"/>
+ <vbox id="devtools-sidebar-box" hidden="true"
+ style="min-width: 18em; width: 22em; max-width: 42em;" persist="width">
+ <toolbar id="devtools-sidebar-toolbar" nowindowdrag="true"/>
+ <deck id="devtools-sidebar-deck" flex="1"/>
+ </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 style="min-width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
+ <hbox id="full-screen-warning-message">
+ <description id="full-screen-warning-text" value="&domFullScreenWarning.label;"></description>
+ </hbox>
+ </hbox>
+ </hbox>
+
+ <vbox id="browser-bottombox" layer="true"> + <vbox id="browser-bottombox" layer="true">
+ <toolbar id="inspector-toolbar" + <toolbar id="inspector-toolbar"
+ nowindowdrag="true" + nowindowdrag="true"
+ hidden="true"> + hidden="true">
+ <vbox flex="1">
+ <resizer id="inspector-top-resizer" flex="1"
+ class="inspector-resizer"
+ dir="top" disabled="true"
+ element="inspector-tree-box"/>
+ <hbox>
+#ifdef XP_MACOSX
+ <toolbarbutton id="highlighter-closebutton"
+ oncommand="InspectorUI.closeInspectorUI(false);"
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
+#endif
+ <toolbarbutton id="inspector-inspect-toolbutton" + <toolbarbutton id="inspector-inspect-toolbutton"
+ label="&inspectButton.label;" + label="&inspectButton.label;"
+ accesskey="&inspectButton.accesskey;" + accesskey="&inspectButton.accesskey;"
+ class="toolbarbutton-text"
+ command="Inspector:Inspect"/> + command="Inspector:Inspect"/>
+ <toolbarseparator /> + <arrowscrollbox id="inspector-breadcrumbs"
+ flex="1" orient="horizontal"
+ clicktoscroll="true"/>
+ <hbox id="inspector-tools"> + <hbox id="inspector-tools">
+ <toolbarbutton id="inspector-style-button"
+ label="&inspectStyleButton.label;"
+ accesskey="&inspectStyleButton.accesskey;"
+ command="Inspector:Sidebar"/>
+ <!-- registered tools go here --> + <!-- registered tools go here -->
+ </hbox> + </hbox>
+#ifndef XP_MACOSX
+ <toolbarbutton id="highlighter-closebutton"
+ oncommand="InspectorUI.closeInspectorUI(false);"
+ tooltiptext="&inspectCloseButton.tooltiptext;"/>
+#endif
+ <resizer id="inspector-end-resizer"
+ class="inspector-resizer"
+ dir="top" disabled="true"
+ element="inspector-tree-box"/>
+ </hbox>
+ </vbox>
+ </toolbar> + </toolbar>
+ <toolbar id="addon-bar" + <toolbar id="addon-bar"
+ toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;" + toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;"
@ -1007,6 +1056,10 @@ new file mode 100644
+ <svg:rect x="0" y="0" width="1" height="1" fill="white"/> + <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
+ <svg:circle cx="-0.35" cy="0.5" r="0.58"/> + <svg:circle cx="-0.35" cy="0.5" r="0.58"/>
+ </svg:mask> + </svg:mask>
+ <svg:mask id="winstripe-urlbar-back-button-mask" maskContentUnits="userSpaceOnUse">
+ <svg:rect x="0" y="0" width="10000" height="50" fill="white"/>
+ <svg:circle cx="-11" cy="13" r="15"/>
+ </svg:mask>
+ </svg:svg> + </svg:svg>
+#endif +#endif
+#ifdef XP_MACOSX +#ifdef XP_MACOSX
@ -1015,6 +1068,10 @@ new file mode 100644
+ <svg:rect x="0" y="0" width="1" height="1" fill="white"/> + <svg:rect x="0" y="0" width="1" height="1" fill="white"/>
+ <svg:circle cx="-0.41" cy="0.5" r="0.65"/> + <svg:circle cx="-0.41" cy="0.5" r="0.65"/>
+ </svg:mask> + </svg:mask>
+ <svg:mask id="pinstripe-urlbar-back-button-mask" maskContentUnits="userSpaceOnUse">
+ <svg:rect x="0" y="-5" width="10000" height="55" fill="white"/>
+ <svg:circle cx="-9" cy="11" r="15"/>
+ </svg:mask>
+ <svg:mask id="pinstripe-tab-ontop-left-curve-mask" maskContentUnits="userSpaceOnUse"> + <svg:mask id="pinstripe-tab-ontop-left-curve-mask" maskContentUnits="userSpaceOnUse">
+ <svg:circle cx="9" cy="3" r="3" fill="white"/> + <svg:circle cx="9" cy="3" r="3" fill="white"/>
+ <svg:rect x="9" y="0" width="3" height="3" fill="white"/> + <svg:rect x="9" y="0" width="3" height="3" fill="white"/>
@ -1142,7 +1199,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
@@ -683,24 +683,42 @@ var gAdvancedPane = { @@ -690,24 +690,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");
@ -1271,31 +1328,31 @@ new file mode 100644
+NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService) +NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
+ +
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::IsDefaultBrowser(PRBool aStartupCheck, +nsKDEShellService::IsDefaultBrowser(bool aStartupCheck,
+ PRBool* aIsDefaultBrowser) + bool* aIsDefaultBrowser)
+ { + {
+ *aIsDefaultBrowser = PR_FALSE; + *aIsDefaultBrowser = PR_FALSE;
+ if (aStartupCheck) + if (aStartupCheck)
+ mCheckedThisSession = PR_TRUE; + mCheckedThisSession = PR_TRUE;
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" )); + command.AppendElement( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
+ if( nsKDEUtils::command( command )) + if( nsKDEUtils::command( command ))
+ *aIsDefaultBrowser = PR_TRUE; + *aIsDefaultBrowser = PR_TRUE;
+ return NS_OK; + return NS_OK;
+ } + }
+ +
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::SetDefaultBrowser(PRBool aClaimAllTypes, +nsKDEShellService::SetDefaultBrowser(bool aClaimAllTypes,
+ PRBool aForAllUsers) + bool aForAllUsers)
+ { + {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" )); + command.AppendElement( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
+ command.AppendCString( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" )); + command.AppendElement( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ } + }
+ +
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult) +nsKDEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
+{ +{
+ // 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.
@ -1316,7 +1373,7 @@ new file mode 100644
+} +}
+ +
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck) +nsKDEShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
+{ +{
+ nsCOMPtr<nsIPrefBranch> prefs; + nsCOMPtr<nsIPrefBranch> prefs;
+ nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID)); + nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
@ -1351,11 +1408,11 @@ new file mode 100644
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::OpenApplication(PRInt32 aApplication) +nsKDEShellService::OpenApplication(PRInt32 aApplication)
+ { + {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ if( aApplication == APPLICATION_MAIL ) + if( aApplication == APPLICATION_MAIL )
+ command.AppendCString( NS_LITERAL_CSTRING( "OPENMAIL" )); + command.AppendElement( NS_LITERAL_CSTRING( "OPENMAIL" ));
+ else if( aApplication == APPLICATION_NEWS ) + else if( aApplication == APPLICATION_NEWS )
+ command.AppendCString( NS_LITERAL_CSTRING( "OPENNEWS" )); + command.AppendElement( NS_LITERAL_CSTRING( "OPENNEWS" ));
+ else + else
+ return NS_ERROR_NOT_IMPLEMENTED; + return NS_ERROR_NOT_IMPLEMENTED;
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
@ -1364,13 +1421,13 @@ new file mode 100644
+NS_IMETHODIMP +NS_IMETHODIMP
+nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI) +nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
+ { + {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "RUN" )); + command.AppendElement( NS_LITERAL_CSTRING( "RUN" ));
+ nsCString app; + nsCString app;
+ nsresult rv = aApplication->GetNativePath( app ); + nsresult rv = aApplication->GetNativePath( app );
+ NS_ENSURE_SUCCESS( rv, rv ); + NS_ENSURE_SUCCESS( rv, rv );
+ command.AppendCString( app ); + command.AppendElement( app );
+ command.AppendCString( aURI ); + command.AppendElement( aURI );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ } + }
+ +
@ -1379,14 +1436,14 @@ new file mode 100644
+ { + {
+ *_retval = nsnull; + *_retval = nsnull;
+ +
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" )); + command.AppendElement( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
+ nsCStringArray output; + nsTArray<nsCString> output;
+ if( !nsKDEUtils::command( command, &output ) || output.Count() != 1 ) + if( !nsKDEUtils::command( command, &output ) || output.Length() != 1 )
+ return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE;
+ +
+ nsCString path; + nsCString path;
+ path = *output[ 0 ]; + path = output[ 0 ];
+ if (path.IsEmpty()) + if (path.IsEmpty())
+ return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE;
+ +
@ -1398,7 +1455,7 @@ new file mode 100644
+ rv = defaultReader->InitWithNativePath(path); + rv = defaultReader->InitWithNativePath(path);
+ NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv);
+ +
+ PRBool exists; + bool exists;
+ rv = defaultReader->Exists(&exists); + rv = defaultReader->Exists(&exists);
+ NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, rv);
+ if (!exists) + if (!exists)
@ -1581,7 +1638,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
@@ -424,16 +424,17 @@ @@ -426,16 +426,17 @@
#endif #endif
#endif #endif

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

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

View File

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

View File

@ -1,6 +1,6 @@
# HG changeset patch # HG changeset patch
# User Michael Gorse <mgorse@suse.com> # User Michael Gorse <mgorse@suse.com>
# Parent d02253d1e8217008dfa26e6e2a901b6a8b75e989 # Parent 2c115988d04c0a0a8cb75b3a597ecdb2c4c001c9
a11y only enabled from Gnome 2's GConf setting a11y only enabled from Gnome 2's GConf setting
https://bugzilla.novell.com/show_bug.cgi?id=732898 https://bugzilla.novell.com/show_bug.cgi?id=732898
https://bugzilla.mozilla.org/show_bug.cgi?id=693343 https://bugzilla.mozilla.org/show_bug.cgi?id=693343
@ -31,7 +31,7 @@ diff --git a/accessible/src/atk/Makefile.in b/accessible/src/atk/Makefile.in
diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src/atk/nsApplicationAccessibleWrap.cpp diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src/atk/nsApplicationAccessibleWrap.cpp
--- a/accessible/src/atk/nsApplicationAccessibleWrap.cpp --- a/accessible/src/atk/nsApplicationAccessibleWrap.cpp
+++ b/accessible/src/atk/nsApplicationAccessibleWrap.cpp +++ b/accessible/src/atk/nsApplicationAccessibleWrap.cpp
@@ -47,29 +47,27 @@ @@ -47,29 +47,29 @@
#include "nsIPrefBranch.h" #include "nsIPrefBranch.h"
#include "nsIServiceManager.h" #include "nsIServiceManager.h"
#include "nsAutoPtr.h" #include "nsAutoPtr.h"
@ -40,14 +40,15 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <atk/atk.h> #include <atk/atk.h>
+#ifdef MOZ_ENABLE_DBUS
+#include <dbus/dbus.h> +#include <dbus/dbus.h>
+#endif
+ +
+using namespace mozilla::a11y; +using namespace mozilla::a11y;
typedef GType (* AtkGetTypeType) (void); typedef GType (* AtkGetTypeType) (void);
GType g_atk_hyperlink_impl_type = G_TYPE_INVALID; GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
-static bool sATKChecked = false; static bool sATKChecked = false;
+static PRBool sATKChecked = PR_FALSE;
static PRLibrary *sATKLib = nsnull; static PRLibrary *sATKLib = nsnull;
static const char sATKLibName[] = "libatk-1.0.so.0"; static const char sATKLibName[] = "libatk-1.0.so.0";
static const char sATKHyperlinkImplGetTypeSymbol[] = static const char sATKHyperlinkImplGetTypeSymbol[] =
@ -65,13 +66,13 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
static void (* gail_remove_key_event_listener) (guint remove_listener); static void (* gail_remove_key_event_listener) (guint remove_listener);
static AtkObject * (*gail_get_root) (void); static AtkObject * (*gail_get_root) (void);
@@ -609,36 +607,17 @@ toplevel_event_watcher(GSignalInvocation @@ -609,36 +609,17 @@ toplevel_event_watcher(GSignalInvocation
} }
return TRUE; return TRUE;
} }
PRBool bool
nsApplicationAccessibleWrap::Init() nsApplicationAccessibleWrap::Init()
{ {
- // XXX following code is copied from widget/src/gtk2/nsWindow.cpp - // XXX following code is copied from widget/src/gtk2/nsWindow.cpp
@ -79,7 +80,7 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
- // see bug 390761 - // see bug 390761
- -
- // check if accessibility enabled/disabled by environment variable - // check if accessibility enabled/disabled by environment variable
- PRBool isGnomeATEnabled = PR_FALSE; - bool isGnomeATEnabled = false;
- const char *envValue = PR_GetEnv(sAccEnv); - const char *envValue = PR_GetEnv(sAccEnv);
- if (envValue) { - if (envValue) {
- isGnomeATEnabled = !!atoi(envValue); - isGnomeATEnabled = !!atoi(envValue);
@ -103,7 +104,7 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
else { else {
MAI_LOG_DEBUG(("Fail to load lib: %s\n", sGail.libName)); MAI_LOG_DEBUG(("Fail to load lib: %s\n", sGail.libName));
} }
@@ -877,8 +856,129 @@ LoadGtkModule(GnomeAccessibilityModule& @@ -877,8 +858,129 @@ LoadGtkModule(GnomeAccessibilityModule&
aModule.init ? aModule.shutdownName : aModule.initName, aModule.init ? aModule.shutdownName : aModule.initName,
aModule.libName)); aModule.libName));
PR_UnloadLibrary(aModule.lib); PR_UnloadLibrary(aModule.lib);
@ -123,16 +124,16 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
+void +void
+PreInit() +PreInit()
+{ +{
+ static PRBool sChecked = FALSE; + static bool sChecked = false;
+ if (sChecked) + if (sChecked)
+ return; + return;
+ sChecked = TRUE; + sChecked = true;
+ DBusError error; + DBusError error;
+ dbus_error_init(&error); + dbus_error_init(&error);
+ DBusConnection* bus = dbus_bus_get(DBUS_BUS_SESSION, &error); + DBusConnection* bus = dbus_bus_get(DBUS_BUS_SESSION, &error);
+ if (!bus) + if (!bus)
+ return; + return;
+ dbus_connection_set_exit_on_disconnect(bus, FALSE); + dbus_connection_set_exit_on_disconnect(bus, false);
+ +
+ DBusMessage *message; + DBusMessage *message;
+ message = dbus_message_new_method_call("org.a11y.Bus", "/org/a11y/bus", + message = dbus_message_new_method_call("org.a11y.Bus", "/org/a11y/bus",
@ -155,14 +156,14 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
+ dbus_error_free(&error); + dbus_error_free(&error);
+} +}
+ +
+PRBool +bool
+ShouldA11yBeEnabled() +ShouldA11yBeEnabled()
+{ +{
+ static PRBool sChecked = PR_FALSE, sShouldEnable = PR_FALSE; + static bool sChecked = false, sShouldEnable = false;
+ if (sChecked) + if (sChecked)
+ return sShouldEnable; + return sShouldEnable;
+ +
+ sChecked = PR_TRUE; + sChecked = true;
+ +
+ // check if accessibility enabled/disabled by environment variable + // check if accessibility enabled/disabled by environment variable
+ static const char sAccEnv [] = "GNOME_ACCESSIBILITY"; + static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
@ -172,7 +173,7 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
+ +
+#ifdef MOZ_ENABLE_DBUS +#ifdef MOZ_ENABLE_DBUS
+ PreInit(); + PreInit();
+ PRBool dbusSuccess = PR_FALSE; + bool dbusSuccess = false;
+ DBusMessage *reply = nsnull; + DBusMessage *reply = nsnull;
+ if (a11yPendingCall) { + if (a11yPendingCall) {
+ dbus_pending_call_block(a11yPendingCall); + dbus_pending_call_block(a11yPendingCall);
@ -236,47 +237,44 @@ diff --git a/accessible/src/atk/nsApplicationAccessibleWrap.cpp b/accessible/src
diff --git a/accessible/src/base/nsAccessibilityService.h b/accessible/src/base/nsAccessibilityService.h diff --git a/accessible/src/base/nsAccessibilityService.h b/accessible/src/base/nsAccessibilityService.h
--- a/accessible/src/base/nsAccessibilityService.h --- a/accessible/src/base/nsAccessibilityService.h
+++ b/accessible/src/base/nsAccessibilityService.h +++ b/accessible/src/base/nsAccessibilityService.h
@@ -41,16 +41,36 @@ @@ -46,16 +46,33 @@
#include "nsIAccessibilityService.h" #include "mozilla/a11y/FocusManager.h"
#include "a11yGeneric.h"
#include "nsAccDocManager.h"
#include "nsIObserver.h" #include "nsIObserver.h"
+namespace mozilla { namespace mozilla {
+namespace a11y { namespace a11y {
+#ifdef MOZ_ACCESSIBILITY_ATK +#ifdef MOZ_ACCESSIBILITY_ATK
+/** +/**
+ * Perform initialization that should be done as soon as possible, in order + * + * Perform initialization that should be done as soon as possible, in
+ * to minimize startup time. + * order
+ * XXX: this function and the next defined in nsApplicationAccessibleWrap.cpp + * + * to minimize startup time.
+ */ + * + * XXX: this function and the next defined in
+ * nsApplicationAccessibleWrap.cpp
+ * + */
+void PreInit(); +void PreInit();
+ +
+/** +/**
+ * Is platform accessibility enabled. + * + * Is platform accessibility enabled.
+ * Only used on linux with atk for now. + * + * Only used on linux with atk for now.
+ */ + * + */
+PRBool ShouldA11yBeEnabled(); +bool ShouldA11yBeEnabled();
+#endif +#endif
+ +
+} // namespace a11y /**
+} // namespace mozilla * Return focus manager.
+ */
class nsAccessibilityService : public nsAccDocManager, FocusManager* FocusMgr();
public nsIAccessibilityService,
public nsIObserver } // namespace a11y
{ } // namespace mozilla
public:
virtual ~nsAccessibilityService();
NS_DECL_ISUPPORTS_INHERITED
diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
--- a/widget/src/gtk2/nsWindow.cpp --- a/widget/src/gtk2/nsWindow.cpp
+++ b/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp
@@ -103,29 +103,20 @@ @@ -105,29 +105,21 @@
#include "nsIStringBundle.h" #include "nsIStringBundle.h"
#include "nsGfxCIID.h" #include "nsGfxCIID.h"
#include "nsIObserverService.h" #include "nsIObserverService.h"
@ -292,10 +290,10 @@ diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
-#include "stdlib.h" -#include "stdlib.h"
using namespace mozilla; using namespace mozilla;
-
-static PRBool sAccessibilityChecked = PR_FALSE; -static bool sAccessibilityChecked = false;
-/* static */ -/* static */
-PRBool nsWindow::sAccessibilityEnabled = PR_FALSE; -bool nsWindow::sAccessibilityEnabled = false;
-static const char sSysPrefService [] = "@mozilla.org/system-preference-service;1"; -static const char sSysPrefService [] = "@mozilla.org/system-preference-service;1";
-static const char sAccEnv [] = "GNOME_ACCESSIBILITY"; -static const char sAccEnv [] = "GNOME_ACCESSIBILITY";
-static const char sAccessibilityKey [] = "config.use_system_prefs.accessibility"; -static const char sAccessibilityKey [] = "config.use_system_prefs.accessibility";
@ -307,11 +305,11 @@ diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
#include "nsIFile.h" #include "nsIFile.h"
#include "nsILocalFile.h" #include "nsILocalFile.h"
@@ -1109,19 +1100,18 @@ nsWindow::Show(PRBool aState) @@ -1111,19 +1103,18 @@ nsWindow::Show(bool aState)
NativeResize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, NativeResize(mBounds.x, mBounds.y, mBounds.width, mBounds.height,
PR_FALSE); false);
} else if (mNeedsResize) { } else if (mNeedsResize) {
NativeResize(mBounds.width, mBounds.height, PR_FALSE); NativeResize(mBounds.width, mBounds.height, false);
} }
} }
@ -328,7 +326,7 @@ diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
} }
NS_IMETHODIMP NS_IMETHODIMP
@@ -3887,16 +3877,21 @@ nsWindow::Create(nsIWidget *aPare @@ -3885,16 +3876,21 @@ nsWindow::Create(nsIWidget *aPare
nsIWidget *baseParent = aInitData && nsIWidget *baseParent = aInitData &&
(aInitData->mWindowType == eWindowType_dialog || (aInitData->mWindowType == eWindowType_dialog ||
aInitData->mWindowType == eWindowType_toplevel || aInitData->mWindowType == eWindowType_toplevel ||
@ -342,27 +340,27 @@ diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
+ a11y::PreInit(); + a11y::PreInit();
+#endif +#endif
+ +
// Ensure that the toolkit is created.
nsGTKToolkit::GetToolkit();
// initialize all the common bits of this class // initialize all the common bits of this class
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext, BaseCreate(baseParent, aRect, aHandleEventFunction, aContext, aInitData);
aAppShell, aToolkit, aInitData);
// Do we need to listen for resizes? // Do we need to listen for resizes?
PRBool listenForResizes = PR_FALSE;; bool listenForResizes = false;;
if (aNativeParent || (aInitData && aInitData->mListenForResizes)) @@ -4278,43 +4274,16 @@ nsWindow::Create(nsIWidget *aPare
listenForResizes = PR_TRUE;
@@ -4278,43 +4273,16 @@ nsWindow::Create(nsIWidget *aPare
LOG(("\tmGdkWindow %p %lx\n", (void *)mGdkWindow, LOG(("\tmGdkWindow %p %lx\n", (void *)mGdkWindow,
gdk_x11_window_get_xid(mGdkWindow))); gdk_x11_window_get_xid(mGdkWindow)));
} }
// resize so that everything is set to the right dimensions // resize so that everything is set to the right dimensions
if (!mIsTopLevel) if (!mIsTopLevel)
Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, PR_FALSE); Resize(mBounds.x, mBounds.y, mBounds.width, mBounds.height, false);
-#ifdef ACCESSIBILITY -#ifdef ACCESSIBILITY
- nsresult rv; - nsresult rv;
- if (!sAccessibilityChecked) { - if (!sAccessibilityChecked) {
- sAccessibilityChecked = PR_TRUE; - sAccessibilityChecked = true;
- -
- //check if accessibility enabled/disabled by environment variable - //check if accessibility enabled/disabled by environment variable
- const char *envValue = PR_GetEnv(sAccEnv); - const char *envValue = PR_GetEnv(sAccEnv);
@ -394,7 +392,7 @@ diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp
if (mDFB) if (mDFB)
mDFB->GetDisplayLayer( mDFB, DLID_PRIMARY, &mDFBLayer ); mDFB->GetDisplayLayer( mDFB, DLID_PRIMARY, &mDFBLayer );
@@ -6504,19 +6472,18 @@ nsWindow::DispatchAccessibleEvent() @@ -6504,19 +6473,18 @@ nsWindow::DispatchAccessibleEvent()
DispatchEvent(&event, status); DispatchEvent(&event, status);
return event.mAccessible; return event.mAccessible;

View File

@ -0,0 +1,157 @@
# HG changeset patch
# User Joop Boonen <joop.boonen@opensuse.org>
# Parent be20a0ae420eb2b3584ce2c5d241e2817bac8593
Add configure option to allow disabling of neon.
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1674,41 +1674,47 @@ if test -n "$all_flags"; then
ASFLAGS="$ASFLAGS $all_flags"
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
fi
fi
AC_SUBST(MOZ_THUMB2)
-if test "$CPU_ARCH" = "arm"; then
- AC_MSG_CHECKING(for ARM SIMD support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm("uqadd8 r1, r1, r2");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_SIMD)
- HAVE_ARM_SIMD=1
- fi
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_NEON)
- HAVE_ARM_NEON=1
- fi
-fi # CPU_ARCH = arm
+MOZ_ARG_DISABLE_BOOL(neon,
+[ --disable-neon Disable neon extensions],
+ NS_DISABLE_NEON=1,
+ NS_DISABLE_NEON= )
+if test "$NS_DISABLE_NEON" != "1"; then
+ if test "$CPU_ARCH" = "arm"; then
+ AC_MSG_CHECKING(for ARM SIMD support in compiler)
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm("uqadd8 r1, r1, r2");],
+ result="yes", result="no")
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_SIMD)
+ HAVE_ARM_SIMD=1
+ fi
+
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
+ result="yes", result="no")
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_NEON)
+ HAVE_ARM_NEON=1
+ fi
+ fi # CPU_ARCH = arm
+fi
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
dnl ========================================================
dnl Android libstdc++, placed here so it can use MOZ_ARCH
dnl computed above.
dnl ========================================================
diff --git a/js/src/configure.in b/js/src/configure.in
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1604,41 +1604,47 @@ if test -n "$all_flags"; then
ASFLAGS="$ASFLAGS $all_flags"
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
fi
fi
AC_SUBST(MOZ_THUMB2)
-if test "$CPU_ARCH" = "arm"; then
- AC_MSG_CHECKING(for ARM SIMD support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm("uqadd8 r1, r1, r2");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_SIMD)
- HAVE_ARM_SIMD=1
- fi
-
- AC_MSG_CHECKING(for ARM NEON support in compiler)
- # We try to link so that this also fails when
- # building with LTO.
- AC_TRY_LINK([],
- [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
- result="yes", result="no")
- AC_MSG_RESULT("$result")
- if test "$result" = "yes"; then
- AC_DEFINE(HAVE_ARM_NEON)
- HAVE_ARM_NEON=1
- fi
-fi # CPU_ARCH = arm
+MOZ_ARG_DISABLE_BOOL(neon,
+[ --disable-neon Disable neon extensions],
+ NS_DISABLE_NEON=1,
+ NS_DISABLE_NEON= )
+if test "$NS_DISABLE_NEON" != "1"; then
+ if test "$CPU_ARCH" = "arm"; then
+ AC_MSG_CHECKING(for ARM SIMD support in compiler)
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm("uqadd8 r1, r1, r2");],
+ result="yes", result="no")
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_SIMD)
+ HAVE_ARM_SIMD=1
+ fi
+
+ AC_MSG_CHECKING(for ARM NEON support in compiler)
+ # We try to link so that this also fails when
+ # building with LTO.
+ AC_TRY_LINK([],
+ [asm(".fpu neon\n vadd.i8 d0, d0, d0");],
+ result="yes", result="no")
+ AC_MSG_RESULT("$result")
+ if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_ARM_NEON)
+ HAVE_ARM_NEON=1
+ fi
+ fi # CPU_ARCH = arm
+fi
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
dnl ========================================================
dnl Android libstdc++, placed here so it can use MOZ_ARCH
dnl computed above.
dnl ========================================================

View File

@ -21,7 +21,7 @@ diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp
--- a/modules/libpref/src/Preferences.cpp --- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp +++ b/modules/libpref/src/Preferences.cpp
@@ -53,16 +53,17 @@ @@ -56,16 +56,17 @@
#include "nsIStringEnumerator.h" #include "nsIStringEnumerator.h"
#include "nsIZipReader.h" #include "nsIZipReader.h"
#include "nsPrefBranch.h" #include "nsPrefBranch.h"
@ -39,7 +39,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
#include "prefapi.h" #include "prefapi.h"
#include "prefread.h" #include "prefread.h"
#include "prefapi_private_data.h" #include "prefapi_private_data.h"
@@ -956,30 +957,48 @@ pref_LoadPrefsInDir(nsIFile* aDir, char @@ -935,30 +936,48 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
} }
static nsresult pref_LoadPrefsInDirList(const char *listId) static nsresult pref_LoadPrefsInDirList(const char *listId)
@ -71,7 +71,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
NS_GET_IID(nsISimpleEnumerator), NS_GET_IID(nsISimpleEnumerator),
getter_AddRefs(dirList)); getter_AddRefs(dirList));
if (dirList) { if (dirList) {
PRBool hasMore; bool hasMore;
while (NS_SUCCEEDED(dirList->HasMoreElements(&hasMore)) && hasMore) { while (NS_SUCCEEDED(dirList->HasMoreElements(&hasMore)) && hasMore) {
nsCOMPtr<nsISupports> elem; nsCOMPtr<nsISupports> elem;
dirList->GetNext(getter_AddRefs(elem)); dirList->GetNext(getter_AddRefs(elem));
@ -89,7 +89,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
} }
static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
@@ -1072,28 +1091,40 @@ static nsresult pref_InitInitialObjects( @@ -1051,28 +1070,40 @@ static nsresult pref_InitInitialObjects(
/* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
static const char* specialFiles[] = { static const char* specialFiles[] = {
#if defined(XP_MACOSX) #if defined(XP_MACOSX)
@ -122,7 +122,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
+ } + }
+ } + }
+ +
rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles));
if (NS_FAILED(rv)) if (NS_FAILED(rv))
NS_WARNING("Error parsing application default preferences."); NS_WARNING("Error parsing application default preferences.");
@ -147,7 +147,7 @@ diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downl
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
--- a/toolkit/components/downloads/nsDownloadManager.cpp --- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -71,16 +71,20 @@ @@ -74,16 +74,20 @@
#ifdef XP_WIN #ifdef XP_WIN
#include <shlobj.h> #include <shlobj.h>
@ -168,21 +168,21 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#include "AndroidBridge.h" #include "AndroidBridge.h"
#endif #endif
@@ -2203,16 +2207,25 @@ nsDownload::SetState(DownloadState aStat @@ -2214,16 +2218,25 @@ nsDownload::SetState(DownloadState aStat
nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
// Master pref to control this function. // Master pref to control this function.
PRBool showTaskbarAlert = PR_TRUE; bool showTaskbarAlert = true;
if (pref) if (pref)
pref->GetBoolPref(PREF_BDM_SHOWALERTONCOMPLETE, &showTaskbarAlert); pref->GetBoolPref(PREF_BDM_SHOWALERTONCOMPLETE, &showTaskbarAlert);
if (showTaskbarAlert) { if (showTaskbarAlert) {
+ if( nsKDEUtils::kdeSupport()) { + if( nsKDEUtils::kdeSupport()) {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "DOWNLOADFINISHED" )); + command.AppendElement( NS_LITERAL_CSTRING( "DOWNLOADFINISHED" ));
+ nsAutoString displayName; + nsAutoString displayName;
+ GetDisplayName( displayName ); + GetDisplayName( displayName );
+ command.AppendCString( nsCAutoString( ToNewUTF8String( displayName ))); + command.AppendElement( nsCAutoString( ToNewUTF8String( displayName )));
+ nsKDEUtils::command( command ); + nsKDEUtils::command( command );
+ } else { + } else {
+ // begin non-KDE block + // begin non-KDE block
@ -194,7 +194,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
PRInt64 goat = PR_Now() - mStartTime; PRInt64 goat = PR_Now() - mStartTime;
showTaskbarAlert = goat > alertIntervalUSec; showTaskbarAlert = goat > alertIntervalUSec;
@@ -2236,19 +2249,20 @@ nsDownload::SetState(DownloadState aStat @@ -2247,19 +2260,20 @@ nsDownload::SetState(DownloadState aStat
// If downloads are automatically removed per the user's // If downloads are automatically removed per the user's
// retention policy, there's no reason to make the text clickable // retention policy, there's no reason to make the text clickable
// because if it is, they'll click open the download manager and // because if it is, they'll click open the download manager and
@ -2110,7 +2110,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
~nsUnixSystemProxySettings() {} ~nsUnixSystemProxySettings() {}
nsCOMPtr<nsIGConfService> mGConf; nsCOMPtr<nsIGConfService> mGConf;
PRBool 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 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 +2121,8 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsresult nsresult
nsUnixSystemProxySettings::Init() nsUnixSystemProxySettings::Init()
{ {
// If this is a GNOME session, load gconf and try to use its preferences. mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
@@ -407,16 +410,19 @@ nsUnixSystemProxySettings::GetProxyForUR @@ -408,16 +411,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);
@ -2142,7 +2142,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\ #define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
{ 0x0fa3158c, 0xd5a7, 0x43de, \ { 0x0fa3158c, 0xd5a7, 0x43de, \
@@ -437,8 +443,34 @@ static const mozilla::Module::ContractID @@ -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,
@ -2167,10 +2167,10 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+ url += ":"; + url += ":";
+ url += nsPrintfCString("%d", aPort); + url += nsPrintfCString("%d", aPort);
+ } + }
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "GETPROXY" )); + command.AppendElement( NS_LITERAL_CSTRING( "GETPROXY" ));
+ command.AppendCString( url ); + command.AppendElement( url );
+ nsCStringArray result; + nsTArray<nsCString> result;
+ if( !nsKDEUtils::command( command, &result ) || result.Count() != 1 ) + if( !nsKDEUtils::command( command, &result ) || result.Count() != 1 )
+ return NS_ERROR_FAILURE; + return NS_ERROR_FAILURE;
+ aResult = *result[ 0 ]; + aResult = *result[ 0 ];
@ -2180,10 +2180,10 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
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
@@ -94,17 +94,18 @@ EXPORTS = nsWindowsDllInterceptor.h @@ -95,17 +95,18 @@ else
else
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CMMSRCS = nsNativeAppSupportCocoa.mm CMMSRCS = nsNativeAppSupportCocoa.mm
EXPORTS = MacQuirks.h
else else
ifeq ($(MOZ_WIDGET_TOOLKIT),os2) ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
CPPSRCS += nsNativeAppSupportOS2.cpp CPPSRCS += nsNativeAppSupportOS2.cpp
@ -2195,16 +2195,16 @@ diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
else else
ifeq ($(MOZ_WIDGET_TOOLKIT),qt) ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
MOCSRCS += moc_nsNativeAppSupportQt.cpp MOCSRCS += moc_nsNativeAppSupportQt.cpp
$(NULL)
CPPSRCS += $(MOCSRCS) CPPSRCS += $(MOCSRCS)
CPPSRCS += nsNativeAppSupportQt.cpp CPPSRCS += nsNativeAppSupportQt.cpp
CPPSRCS += nsQAppInstance.cpp CPPSRCS += nsQAppInstance.cpp
EXPORTS += nsQAppInstance.h EXPORTS += nsQAppInstance.h
else
diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp 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,328 @@ @@ -0,0 +1,330 @@
+/* -*- 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
@ -2299,10 +2299,10 @@ new file mode 100644
+ +
+static bool getKdeSupport() +static bool getKdeSupport()
+ { + {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "CHECK" )); + command.AppendElement( NS_LITERAL_CSTRING( "CHECK" ));
+ command.AppendCString( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION ))); + command.AppendElement( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION )));
+ bool kde = nsKDEUtils::command( command ); + bool kde = nsKDEUtils::command( command.get() );
+#ifdef DEBUG_KDE +#ifdef DEBUG_KDE
+ fprintf( stderr, "KDE RUNNING %d\n", kde ); + fprintf( stderr, "KDE RUNNING %d\n", kde );
+#endif +#endif
@ -2344,7 +2344,7 @@ new file mode 100644
+struct nsKDECommandData +struct nsKDECommandData
+ { + {
+ FILE* file; + FILE* file;
+ nsCStringArray* output; + nsTArray<nsCString>* output;
+ GMainLoop* loop; + GMainLoop* loop;
+ bool success; + bool success;
+ }; + };
@ -2368,7 +2368,7 @@ new file mode 100644
+ line.ReplaceSubstring( "\\n", "\n" ); + line.ReplaceSubstring( "\\n", "\n" );
+ line.ReplaceSubstring( "\\" "\\", "\\" ); // \\ -> \ , i.e. unescape + line.ReplaceSubstring( "\\" "\\", "\\" ); // \\ -> \ , i.e. unescape
+ if( p->output && !( command_done || command_failed )) + if( p->output && !( command_done || command_failed ))
+ p->output->AppendCString( nsCString( buf )); // TODO utf8? + p->output->AppendElement( nsCString( buf )); // TODO utf8?
+ } + }
+ bool quit = false; + bool quit = false;
+ if( feof( p->file ) || command_failed ) + if( feof( p->file ) || command_failed )
@ -2390,22 +2390,24 @@ new file mode 100644
+ return TRUE; + return TRUE;
+ } + }
+ +
+bool nsKDEUtils::command( const nsCStringArray& command, nsCStringArray* output ) +bool nsKDEUtils::command( const nsTArray<nsCString>& command, nsTArray<nsCString>* output )
+ { + {
+ return self()->internalCommand( command, NULL, false, output ); + return self()->internalCommand( command, NULL, false, output );
+ } + }
+ +
+bool nsKDEUtils::commandBlockUi( const nsCStringArray& command, const GtkWindow* parent, nsCStringArray* 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 );
+ } + }
+ +
+bool nsKDEUtils::internalCommand( const nsCStringArray& command, const GtkWindow* parent, bool blockUi, +bool nsKDEUtils::internalCommand( const nsTArray<nsCString>& command, const GtkWindow* parent, bool blockUi,
+ nsCStringArray* output ) + nsTArray<nsCString>* output )
+ { + {
+ nsCString internal_command;
+ internal_command.AssignLiteral(command);
+ if( !startHelper()) + if( !startHelper())
+ return false; + return false;
+ feedCommand( command ); + feedCommand(internal_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;
@ -2515,13 +2517,13 @@ new file mode 100644
+ helperRunning = false; + helperRunning = false;
+ } + }
+ +
+void nsKDEUtils::feedCommand( const nsCStringArray& command ) +void nsKDEUtils::feedCommand( const nsTArray<nsCString>& command )
+ { + {
+ for( int i = 0; + for( int i = 0;
+ i < command.Count(); + i < command.Length();
+ ++i ) + ++i )
+ { + {
+ nsCString line = *command[ i ]; + nsCString line = command[ i ];
+ line.ReplaceSubstring( "\\", "\\" "\\" ); // \ -> \\ , i.e. escape + line.ReplaceSubstring( "\\", "\\" "\\" ); // \ -> \\ , i.e. escape
+ line.ReplaceSubstring( "\n", "\\n" ); + line.ReplaceSubstring( "\n", "\\n" );
+#ifdef DEBUG_KDE +#ifdef DEBUG_KDE
@ -2537,7 +2539,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,77 @@ @@ -0,0 +1,78 @@
+/* -*- 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 *****
@ -2580,7 +2582,7 @@ new file mode 100644
+#define nsKDEUtils_h__ +#define nsKDEUtils_h__
+ +
+#include "nsStringGlue.h" +#include "nsStringGlue.h"
+#include "nsVoidArray.h" +#include "nsTArray.h"
+#include <stdio.h> +#include <stdio.h>
+ +
+typedef struct _GtkWindow GtkWindow; +typedef struct _GtkWindow GtkWindow;
@ -2596,20 +2598,21 @@ new file mode 100644
+ for Firefox. This should be used everywhere where the external helper is needed. */ + for Firefox. This should be used everywhere where the external helper is needed. */
+ 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 nsCStringArray& command, nsCStringArray* output = NULL ); + static bool command( const nsTArray<nsCString>& command, nsTArray<nsCString>* 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). */
+ static bool commandBlockUi( const nsCStringArray& command, const GtkWindow* parent, nsCStringArray* output = NULL ); + static bool commandBlockUi( const nsTArray<nsCString>& command, const GtkWindow* parent, nsTArray<nsCString>* output = NULL );
+
+ private: + private:
+ nsKDEUtils(); + nsKDEUtils();
+ ~nsKDEUtils(); + ~nsKDEUtils();
+ static nsKDEUtils* self(); + static nsKDEUtils* self();
+ bool startHelper(); + bool startHelper();
+ void closeHelper(); + void closeHelper();
+ void feedCommand( const nsCStringArray& command ); + void feedCommand( const nsTArray<nsCString>& command );
+ bool internalCommand( const nsCStringArray& command, const GtkWindow* parent, bool isParent, + bool internalCommand( const nsTArray<nsCString>& command, const GtkWindow* parent, bool isParent,
+ nsCStringArray* output ); + nsTArray<nsCString>* output );
+ FILE* commandFile; + FILE* commandFile;
+ FILE* replyFile; + FILE* replyFile;
+ }; + };
@ -2847,20 +2850,20 @@ new file mode 100644
+/* static */ PRBool +/* static */ PRBool
+nsKDERegistry::HandlerExists(const char *aProtocolScheme) +nsKDERegistry::HandlerExists(const char *aProtocolScheme)
+{ +{
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "HANDLEREXISTS" )); + command.AppendElement( NS_LITERAL_CSTRING( "HANDLEREXISTS" ));
+ command.AppendCString( nsCAutoString( aProtocolScheme )); + command.AppendElement( nsCAutoString( aProtocolScheme ));
+ return nsKDEUtils::command( command ); + return nsKDEUtils::command( command );
+} +}
+ +
+/* static */ nsresult +/* static */ nsresult
+nsKDERegistry::LoadURL(nsIURI *aURL) +nsKDERegistry::LoadURL(nsIURI *aURL)
+{ +{
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "OPEN" )); + command.AppendElement( NS_LITERAL_CSTRING( "OPEN" ));
+ nsCString url; + nsCString url;
+ aURL->GetSpec( url ); + aURL->GetSpec( url );
+ command.AppendCString( url ); + command.AppendElement( url );
+ return nsKDEUtils::command( command ); + return nsKDEUtils::command( command );
+} +}
+ +
@ -2868,12 +2871,12 @@ new file mode 100644
+nsKDERegistry::GetAppDescForScheme(const nsACString& aScheme, +nsKDERegistry::GetAppDescForScheme(const nsACString& aScheme,
+ nsAString& aDesc) + nsAString& aDesc)
+{ +{
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "GETAPPDESCFORSCHEME" )); + command.AppendElement( NS_LITERAL_CSTRING( "GETAPPDESCFORSCHEME" ));
+ command.AppendCString( aScheme ); + command.AppendElement( aScheme );
+ nsCStringArray output; + nsTArray<nsCString> output;
+ if( nsKDEUtils::command( command, &output ) && output.Count() == 1 ) + if( nsKDEUtils::command( command, &output ) && output.Length() == 1 )
+ CopyUTF8toUTF16( *output[ 0 ], aDesc ); + CopyUTF8toUTF16( output[ 0 ], aDesc );
+} +}
+ +
+ +
@ -2881,33 +2884,33 @@ new file mode 100644
+nsKDERegistry::GetFromExtension(const nsACString& aFileExt) +nsKDERegistry::GetFromExtension(const nsACString& aFileExt)
+{ +{
+ NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot"); + NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot");
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "GETFROMEXTENSION" )); + command.AppendElement( NS_LITERAL_CSTRING( "GETFROMEXTENSION" ));
+ command.AppendCString( aFileExt ); + command.AppendElement( aFileExt );
+ return GetFromHelper( command ); + return GetFromHelper( command );
+} +}
+ +
+/* static */ already_AddRefed<nsMIMEInfoBase> +/* static */ already_AddRefed<nsMIMEInfoBase>
+nsKDERegistry::GetFromType(const nsACString& aMIMEType) +nsKDERegistry::GetFromType(const nsACString& aMIMEType)
+{ +{
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "GETFROMTYPE" )); + command.AppendElement( NS_LITERAL_CSTRING( "GETFROMTYPE" ));
+ command.AppendCString( aMIMEType ); + command.AppendElement( aMIMEType );
+ return GetFromHelper( command ); + return GetFromHelper( command );
+} +}
+ +
+/* static */ already_AddRefed<nsMIMEInfoBase> +/* static */ already_AddRefed<nsMIMEInfoBase>
+nsKDERegistry::GetFromHelper(const nsCStringArray& command) +nsKDERegistry::GetFromHelper(const nsTArray<nsCString>& command)
+{ +{
+ nsCStringArray output; + nsTArray<nsCString> output;
+ if( nsKDEUtils::command( command, &output ) && output.Count() == 3 ) + if( nsKDEUtils::command( command, &output ) && output.Length() == 3 )
+ { + {
+ nsCString mimetype = *output[ 0 ]; + nsCString mimetype = output[ 0 ];
+ nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype ); + nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype );
+ NS_ENSURE_TRUE(mimeInfo, nsnull); + NS_ENSURE_TRUE(mimeInfo, nsnull);
+ nsCString description = *output[ 1 ]; + nsCString description = output[ 1 ];
+ mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); + mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description));
+ nsCString handlerAppName = *output[ 2 ]; + nsCString handlerAppName = output[ 2 ];
+ mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); + mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName));
+ mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault); + mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault);
+ nsMIMEInfoBase* retval; + nsMIMEInfoBase* retval;
@ -2920,7 +2923,7 @@ diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/un
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/uriloader/exthandler/unix/nsKDERegistry.h +++ b/uriloader/exthandler/unix/nsKDERegistry.h
@@ -0,0 +1,61 @@ @@ -0,0 +1,62 @@
+/* ***** 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
+ * + *
@ -2960,10 +2963,11 @@ new file mode 100644
+ +
+#include "nsIURI.h" +#include "nsIURI.h"
+#include "nsCOMPtr.h" +#include "nsCOMPtr.h"
+#include "nsTArray.h"
+ +
+class nsMIMEInfoBase; +class nsMIMEInfoBase;
+class nsCAutoString; +class nsCAutoString;
+class nsCStringArray; +class nsCString;
+ +
+class nsKDERegistry +class nsKDERegistry
+{ +{
@ -2979,7 +2983,7 @@ new file mode 100644
+ +
+ static already_AddRefed<nsMIMEInfoBase> GetFromType(const nsACString& aMIMEType); + static already_AddRefed<nsMIMEInfoBase> GetFromType(const nsACString& aMIMEType);
+ private: + private:
+ static already_AddRefed<nsMIMEInfoBase> GetFromHelper(const nsCStringArray& command); + static already_AddRefed<nsMIMEInfoBase> GetFromHelper(const nsTArray<nsCString>& command);
+ +
+}; +};
diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
@ -3027,9 +3031,9 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
} }
NS_IMETHODIMP NS_IMETHODIMP
nsMIMEInfoUnix::GetHasDefaultHandler(PRBool *_retval) nsMIMEInfoUnix::GetHasDefaultHandler(bool *_retval)
{ {
*_retval = PR_FALSE; *_retval = false;
- nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromType(mSchemeOrType); - nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromType(mSchemeOrType);
+ nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromType(mSchemeOrType); + nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromType(mSchemeOrType);
if (!mimeInfo) { if (!mimeInfo) {
@ -3041,7 +3045,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
} }
} }
if (mimeInfo) if (mimeInfo)
*_retval = PR_TRUE; *_retval = true;
if (*_retval) if (*_retval)
return NS_OK; return NS_OK;
@ -3056,13 +3060,13 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
#endif #endif
+ if( nsKDEUtils::kdeSupport()) { + if( nsKDEUtils::kdeSupport()) {
+ PRBool supports; + bool supports;
+ if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) { + if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "OPEN" )); + command.AppendElement( NS_LITERAL_CSTRING( "OPEN" ));
+ command.AppendCString( nativePath ); + command.AppendElement( nativePath );
+ command.AppendCString( NS_LITERAL_CSTRING( "MIMETYPE" )); + command.AppendElement( NS_LITERAL_CSTRING( "MIMETYPE" ));
+ command.AppendCString( mSchemeOrType ); + command.AppendElement( mSchemeOrType );
+ if( nsKDEUtils::command( command )) + if( nsKDEUtils::command( command ))
+ return NS_OK; + return NS_OK;
+ } + }
@ -3125,7 +3129,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
ContentAction::Action::defaultActionForScheme(QString(aProtocolScheme) + ':'); ContentAction::Action::defaultActionForScheme(QString(aProtocolScheme) + ':');
if (action.isValid()) if (action.isValid())
*aHandlerExists = PR_TRUE; *aHandlerExists = true;
#endif #endif
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK2
@ -3156,7 +3160,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
@@ -1299,17 +1299,17 @@ nsOSHelperAppService::GetFromExtension(c @@ -1299,17 +1299,17 @@ nsOSHelperAppService::GetFromExtension(c
minorType, minorType,
mime_types_description, mime_types_description,
PR_TRUE); true);
if (NS_FAILED(rv) || majorType.IsEmpty()) { if (NS_FAILED(rv) || majorType.IsEmpty()) {
@ -3212,14 +3216,14 @@ diff --git a/widget/src/gtk2/Makefile.in b/widget/src/gtk2/Makefile.in
diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
--- a/widget/src/gtk2/nsFilePicker.cpp --- a/widget/src/gtk2/nsFilePicker.cpp
+++ b/widget/src/gtk2/nsFilePicker.cpp +++ b/widget/src/gtk2/nsFilePicker.cpp
@@ -31,16 +31,17 @@ @@ -33,16 +33,17 @@
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under * the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL. * the terms of any one of the MPL, the GPL or the LGPL.
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
#include "mozilla/Util.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
+#include <gdk/gdkx.h> +#include <gdk/gdkx.h>
@ -3230,7 +3234,7 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
#include "nsIStringBundle.h" #include "nsIStringBundle.h"
#include "nsArrayEnumerator.h" #include "nsArrayEnumerator.h"
@@ -49,16 +50,17 @@ @@ -51,16 +52,17 @@
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsReadableUtils.h" #include "nsReadableUtils.h"
#include "mozcontainer.h" #include "mozcontainer.h"
@ -3245,10 +3249,10 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
#include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h> #include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h>
#endif #endif
#define MAX_PREVIEW_SIZE 180 using namespace mozilla;
nsILocalFile *nsFilePicker::mPrevDisplayDirectory = nsnull; #define MAX_PREVIEW_SIZE 180
@@ -281,17 +283,19 @@ nsFilePicker::AppendFilters(PRInt32 aFil @@ -285,17 +287,19 @@ nsFilePicker::AppendFilters(PRInt32 aFil
return nsBaseFilePicker::AppendFilters(aFilterMask); return nsBaseFilePicker::AppendFilters(aFilterMask);
} }
@ -3269,7 +3273,7 @@ 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);
@@ -429,16 +433,19 @@ confirm_overwrite_file(GtkWidget *parent @@ -433,16 +437,19 @@ confirm_overwrite_file(GtkWidget *parent
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
return result; return result;
@ -3289,7 +3293,7 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
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);
@@ -579,8 +586,234 @@ nsFilePicker::Show(PRInt16 *aReturn) @@ -583,8 +590,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
*aReturn = nsIFilePicker::returnCancel; *aReturn = nsIFilePicker::returnCancel;
break; break;
} }
@ -3403,47 +3407,47 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
+ } + }
+ } + }
+ +
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( nsCAutoString( arg )); + command.AppendElement( nsCAutoString( arg ));
+ command.AppendCString( startdir ); + command.AppendElement( startdir );
+ if( mMode != nsIFilePicker::modeGetFolder ) + if( mMode != nsIFilePicker::modeGetFolder )
+ { + {
+ command.AppendCString( filters ); + command.AppendElement( filters );
+ nsCAutoString selected; + nsCAutoString selected;
+ selected.AppendInt( mSelectedType ); + selected.AppendInt( mSelectedType );
+ command.AppendCString( selected ); + command.AppendElement( selected );
+ } + }
+ command.AppendCString( title ); + command.AppendElement( title );
+ if( mMode == nsIFilePicker::modeOpenMultiple ) + if( mMode == nsIFilePicker::modeOpenMultiple )
+ command.AppendCString( NS_LITERAL_CSTRING( "MULTIPLE" )); + command.AppendElement( NS_LITERAL_CSTRING( "MULTIPLE" ));
+ if( PRInt32 xid = windowToXid( mParentWidget )) + if( PRInt32 xid = windowToXid( mParentWidget ))
+ { + {
+ command.AppendCString( NS_LITERAL_CSTRING( "PARENT" )); + command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
+ nsCAutoString parent; + nsCAutoString parent;
+ parent.AppendInt( xid ); + parent.AppendInt( xid );
+ command.AppendCString( parent ); + command.AppendElement( parent );
+ } + }
+ +
+ nsCStringArray output; + nsTArray<nsCString> output;
+ if( nsKDEUtils::commandBlockUi( command, get_gtk_window_for_nsiwidget( mParentWidget ), &output )) + if( nsKDEUtils::commandBlockUi( command, get_gtk_window_for_nsiwidget( mParentWidget ), &output ))
+ { + {
+ *aReturn = nsIFilePicker::returnOK; + *aReturn = nsIFilePicker::returnOK;
+ mFiles.Clear(); + mFiles.Clear();
+ if( mMode != nsIFilePicker::modeGetFolder ) + if( mMode != nsIFilePicker::modeGetFolder )
+ { + {
+ mSelectedType = atoi( output[ 0 ]->get()); + mSelectedType = atoi( output[ 0 ].get());
+ output.RemoveCStringAt( 0 ); + output.RemoveElementAt( 0 );
+ } + }
+ if (mMode == nsIFilePicker::modeOpenMultiple) + if (mMode == nsIFilePicker::modeOpenMultiple)
+ { + {
+ mFileURL.Truncate(); + mFileURL.Truncate();
+ PRUint32 count = output.Count(); + PRUint32 count = output.Length();
+ for( PRUint32 i = 0; + for( PRUint32 i = 0;
+ i < count; + i < count;
+ ++i ) + ++i )
+ { + {
+ nsCOMPtr<nsILocalFile> localfile; + nsCOMPtr<nsILocalFile> localfile;
+ nsresult rv = NS_NewNativeLocalFile( *output[ i ], + nsresult rv = NS_NewNativeLocalFile( output[ i ],
+ PR_FALSE, + PR_FALSE,
+ getter_AddRefs(localfile)); + getter_AddRefs(localfile));
+ if (NS_SUCCEEDED(rv)) + if (NS_SUCCEEDED(rv))
@ -3452,14 +3456,14 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
+ } + }
+ else + else
+ { + {
+ if( output.Count() == 0 ) + if( output.Length() == 0 )
+ mFileURL = nsCString(); + mFileURL = nsCString();
+ else if( mAllowURLs ) + else if( mAllowURLs )
+ mFileURL = *output[ 0 ]; + mFileURL = output[ 0 ];
+ else // GetFile() actually requires it to be url even for local files :-/ + else // GetFile() actually requires it to be url even for local files :-/
+ { + {
+ mFileURL = nsCString( "file://" ); + mFileURL = nsCString( "file://" );
+ mFileURL.Append( *output[ 0 ] ); + mFileURL.Append( output[ 0 ] );
+ } + }
+ } + }
+ // Remember last used directory. + // Remember last used directory.
@ -3479,7 +3483,7 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
+ GetFile(getter_AddRefs(file)); + GetFile(getter_AddRefs(file));
+ if (file) + if (file)
+ { + {
+ PRBool exists = PR_FALSE; + bool exists = false;
+ file->Exists(&exists); + file->Exists(&exists);
+ if (exists) // TODO do overwrite check in the helper app + if (exists) // TODO do overwrite check in the helper app
+ *aReturn = nsIFilePicker::returnReplace; + *aReturn = nsIFilePicker::returnReplace;
@ -3501,22 +3505,22 @@ diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp
+ nsXPIDLCString title; + nsXPIDLCString title;
+ title.Adopt(ToNewUTF8String(mTitle)); + title.Adopt(ToNewUTF8String(mTitle));
+ +
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "APPSDIALOG" )); + command.AppendElement( NS_LITERAL_CSTRING( "APPSDIALOG" ));
+ command.AppendCString( title ); + command.AppendElement( title );
+ if( PRInt32 xid = windowToXid( mParentWidget )) + if( PRInt32 xid = windowToXid( mParentWidget ))
+ { + {
+ command.AppendCString( NS_LITERAL_CSTRING( "PARENT" )); + command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
+ nsCAutoString parent; + nsCAutoString parent;
+ parent.AppendInt( xid ); + parent.AppendInt( xid );
+ command.AppendCString( parent ); + command.AppendElement( parent );
+ } + }
+ +
+ nsCStringArray output; + nsTArray<nsCString> output;
+ if( nsKDEUtils::commandBlockUi( command, get_gtk_window_for_nsiwidget( mParentWidget ), &output )) + if( nsKDEUtils::commandBlockUi( command, get_gtk_window_for_nsiwidget( mParentWidget ), &output ))
+ { + {
+ *aReturn = nsIFilePicker::returnOK; + *aReturn = nsIFilePicker::returnOK;
+ mFileURL = output.Count() > 0 ? *output[ 0 ] : nsCString(); + mFileURL = output.Length() > 0 ? output[ 0 ] : nsCString();
+ } + }
+ else + else
+ { + {
@ -3563,7 +3567,7 @@ diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp --- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp
@@ -60,16 +60,17 @@ @@ -62,16 +62,17 @@
#include "nsTextFormatter.h" #include "nsTextFormatter.h"
#include "nsVersionComparator.h" #include "nsVersionComparator.h"
#include "nsXPCOMCIDInternal.h" #include "nsXPCOMCIDInternal.h"
@ -3574,14 +3578,14 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
#include "nsIXULRuntime.h" #include "nsIXULRuntime.h"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
using namespace mozilla;
struct ManifestDirective struct ManifestDirective
{ {
const char* directive; const char* directive;
int argc; int argc;
// Some directives should only be delivered for NS_COMPONENT_LOCATION @@ -434,16 +435,17 @@ ParseManifestCommon(NSLocationType aType
// manifests.
@@ -430,16 +431,17 @@ ParseManifestCommon(NSLocationType aType
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");
@ -3591,15 +3595,15 @@ 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)
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
#endif
// Obsolete // Obsolete
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
nsAutoString appID; nsAutoString appID;
nsAutoString appVersion; @@ -481,41 +483,46 @@ ParseManifestCommon(NSLocationType aType
nsAutoString geckoVersion;
nsAutoString osTarget;
@@ -474,39 +476,44 @@ ParseManifestCommon(NSLocationType aType
CopyUTF8toUTF16(s, abi); CopyUTF8toUTF16(s, abi);
abi.Insert(PRUnichar('_'), 0); abi.Insert(PRUnichar('_'), 0);
abi.Insert(osTarget, 0); abi.Insert(osTarget, 0);
@ -3632,8 +3636,10 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
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(ANDROID)
bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) { if (mozilla::AndroidBridge::Bridge()) {
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
isTablet = mozilla::AndroidBridge::Bridge()->IsTablet();
} }
+ desktop = NS_LITERAL_STRING("android"); + desktop = NS_LITERAL_STRING("android");
#endif #endif
@ -3644,13 +3650,13 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
char *token; char *token;
char *newline = buf; char *newline = buf;
@@ -585,24 +592,26 @@ ParseManifestCommon(NSLocationType aType @@ -597,24 +604,26 @@ ParseManifestCommon(NSLocationType aType
TriState stAppVersion = eUnspecified;
TriState stGeckoVersion = eUnspecified;
TriState stApp = eUnspecified;
TriState stOsVersion = eUnspecified; TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified; TriState stOs = eUnspecified;
TriState stABI = eUnspecified; TriState stABI = eUnspecified;
#if defined(ANDROID)
TriState stTablet = eUnspecified;
#endif
bool platform = false; bool platform = false;
bool contentAccessible = false; bool contentAccessible = false;
+ TriState stDesktop = eUnspecified; + TriState stDesktop = eUnspecified;
@ -3668,10 +3674,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 (directive->contentflags && #if defined(ANDROID)
(CheckFlag(kPlatform, wtoken, platform) || bool tablet = false;
CheckFlag(kContentAccessible, wtoken, contentAccessible))) if (CheckFlag(kTablet, wtoken, tablet)) {
@@ -623,16 +632,17 @@ ParseManifestCommon(NSLocationType aType @@ -643,16 +652,17 @@ ParseManifestCommon(NSLocationType aType
} }
if (!ok || if (!ok ||
@ -3681,14 +3687,14 @@ 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
stTablet == eBad ||
#endif
stABI == eBad) stABI == eBad)
continue; continue;
if (directive->regfunc) { if (directive->regfunc) {
if (GeckoProcessType_Default != XRE_GetProcessType()) if (GeckoProcessType_Default != XRE_GetProcessType())
continue;
if (!nsChromeRegistry::gChromeRegistry) {
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
@ -3714,11 +3720,11 @@ diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
--- a/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -87,16 +87,17 @@ @@ -90,16 +90,17 @@
#include "nsXPIDLString.h"
#include "prproces.h" #include "prproces.h"
#include "nsIDirectoryEnumerator.h" #include "nsIDirectoryEnumerator.h"
#include "nsISimpleEnumerator.h" #include "nsISimpleEnumerator.h"
#include "private/pprio.h"
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK2
#include "nsIGIOService.h" #include "nsIGIOService.h"
@ -3726,13 +3732,13 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
#endif #endif
#ifdef XP_MACOSX #ifdef MOZ_WIDGET_COCOA
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#include "CocoaFileUtils.h" #include "CocoaFileUtils.h"
#include "prmem.h" #include "prmem.h"
#include "plbase64.h" #include "plbase64.h"
@@ -1785,44 +1786,50 @@ nsLocalFile::SetPersistentDescriptor(con @@ -1795,44 +1796,51 @@ nsLocalFile::SetPersistentDescriptor(con
return InitWithNativePath(aPersistentDescriptor); return InitWithNativePath(aPersistentDescriptor);
#endif #endif
} }
@ -3747,7 +3753,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
- return NS_ERROR_FAILURE; - return NS_ERROR_FAILURE;
- -
+ nsCAutoString url; + nsCAutoString url;
PRBool isDirectory; bool isDirectory;
if (NS_FAILED(IsDirectory(&isDirectory))) if (NS_FAILED(IsDirectory(&isDirectory)))
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@ -3774,9 +3780,9 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
} }
+ +
+ if(nsKDEUtils::kdeSupport()) { + if(nsKDEUtils::kdeSupport()) {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "OPEN" )); + command.AppendElement( NS_LITERAL_CSTRING("OPEN") );
+ command.AppendCString( url ); + command.AppendElement( url );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ } + }
+ +
@ -3789,7 +3795,8 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
+ return giovfs->ShowURIForInput(url); + return giovfs->ShowURIForInput(url);
+ else + else
+ return gnomevfs->ShowURIForInput(url); + return gnomevfs->ShowURIForInput(url);
#elif defined(XP_MACOSX) +
#elif defined(MOZ_WIDGET_COCOA)
CFURLRef url; CFURLRef url;
if (NS_SUCCEEDED(GetCFURL(&url))) { if (NS_SUCCEEDED(GetCFURL(&url))) {
nsresult rv = CocoaFileUtils::RevealFileInFinder(url); nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
@ -3797,7 +3804,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
return rv; return rv;
} }
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@@ -1848,16 +1855,23 @@ nsLocalFile::Launch() @@ -1858,16 +1866,23 @@ nsLocalFile::Launch()
if (nsnull == connection) if (nsnull == connection)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@ -3807,9 +3814,9 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
return NS_OK; return NS_OK;
#else #else
+ if( nsKDEUtils::kdeSupport()) { + if( nsKDEUtils::kdeSupport()) {
+ nsCStringArray command; + nsTArray<nsCString> command;
+ command.AppendCString( NS_LITERAL_CSTRING( "OPEN" )); + command.AppendElement( NS_LITERAL_CSTRING("OPEN") );
+ command.AppendCString( mPath ); + command.AppendElement( mPath );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ } + }
+ +

View File

@ -5,17 +5,19 @@ Index: toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
=================================================================== ===================================================================
RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v RCS file: /cvsroot/mozilla/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp,v
retrieving revision 1.1 retrieving revision 1.1
diff -u -p -6 -r1.1 nsUnixSystemProxySettings.cpp
--- toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 29 Jan 2008 15:58:41 -0000 1.1 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 17 Apr 2008 19:02:19 -0000 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -69,13 +69,19 @@ private: +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -68,16 +68,23 @@ private:
};
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
nsresult nsresult
nsUnixSystemProxySettings::Init() nsUnixSystemProxySettings::Init()
{ {
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID); mGConf = do_GetService(NS_GCONFSERVICE_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.
@ -26,6 +28,8 @@ diff -u -p -6 -r1.1 nsUnixSystemProxySettings.cpp
return NS_OK; return NS_OK;
} }
PRBool bool
nsUnixSystemProxySettings::IsProxyMode(const char* aMode) nsUnixSystemProxySettings::IsProxyMode(const char* aMode)
{ {
nsCAutoString mode;
return NS_SUCCEEDED(mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) &&

View File

@ -1,6 +1,6 @@
# HG changeset patch # HG changeset patch
# User Petr Cerny <pcerny@novell.com> # User Petr Cerny <pcerny@novell.com>
# Parent 971259052418fda3b7fc81da75be4557ea5d82bc # Parent a843037ea4cee813a68dd529e7a503d1e40b81e4
Bug 634334 - call to the ntlm_auth helper fails Bug 634334 - call to the ntlm_auth helper fails
diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp
@ -23,5 +23,5 @@ diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNT
nsnull nsnull
}; };
PRBool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD); bool isOK = SpawnIOChild(args, &mChildPID, &mFromChildFD, &mToChildFD);
if (!isOK) if (!isOK)

View File

@ -1,30 +0,0 @@
# HG changeset patch
# Parent 928a29c4a79c9041d6b9f68e24de8f5aab15cc5d
From: upstream
Subject: Fix PPC64 build
https://bugzilla.mozilla.org/show_bug.cgi?id=670719
https://bugzilla.mozilla.org/show_bug.cgi?id=654056
diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h
--- a/ipc/chromium/src/build/build_config.h
+++ b/ipc/chromium/src/build/build_config.h
@@ -54,16 +54,19 @@
#define ARCH_CPU_X86_FAMILY 1
#define ARCH_CPU_X86 1
#define ARCH_CPU_32_BITS 1
#elif defined(__ARMEL__)
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
#define WCHAR_T_IS_UNSIGNED 1
+#elif defined(__powerpc64__)
+#define ARCH_CPU_PPC64 1
+#define ARCH_CPU_64_BITS 1
#elif defined(__ppc__) || defined(__powerpc__)
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
#elif defined(__sparc64__)
#define ARCH_CPU_SPARC 1
#define ARCH_CPU_64_BITS 1
#else
#error Please add support for your architecture in build/build_config.h

View File

@ -4,8 +4,8 @@ Subject: introduce a pref to prefer certain plugins for mime-types
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp --- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp
@@ -1637,17 +1637,48 @@ nsPluginHost::FindPluginForType(const ch @@ -1580,17 +1580,48 @@ nsPluginHost::FindPluginForType(const ch
PRBool aCheckEnabled) bool aCheckEnabled)
{ {
if (!aMimeType) { if (!aMimeType) {
return nsnull; return nsnull;

View File

@ -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
@@ -571,16 +571,20 @@ MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS @@ -567,16 +567,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
@@ -8016,16 +8016,31 @@ AC_SUBST(QCMS_LIBS) @@ -8093,16 +8093,31 @@ AC_SUBST(QCMS_LIBS)
dnl ======================================================== dnl ========================================================
dnl HarfBuzz dnl HarfBuzz
@ -61,12 +61,12 @@ diff --git a/configure.in b/configure.in
AC_SUBST(MOZ_OTS_LIBS) AC_SUBST(MOZ_OTS_LIBS)
dnl ======================================================== dnl ========================================================
dnl disable xul dnl Skia
dnl ======================================================== dnl ========================================================
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
@@ -113,12 +113,14 @@ CSRCS += md4.c @@ -114,12 +114,14 @@ CSRCS += md4.c
EXTRA_DEPS = $(NSS_DEP_LIBS) EXTRA_DEPS = $(NSS_DEP_LIBS)
@ -109,7 +109,7 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsAppDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h"
@@ -1727,18 +1734,34 @@ nsNSSComponent::InitializeNSS(PRBool sho @@ -1725,18 +1732,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,8 +149,8 @@ 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
@@ -138,17 +138,17 @@ ifdef MOZ_DEBUG @@ -126,17 +126,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
EXTRA_DSO_LDOPTS += -INCREMENTAL:NO endif
endif endif
endif endif

View File

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