Accepting request 199621 from mozilla:Factory

- update to Thunderbird 24.0 (bnc#840485)
  * MFSA 2013-76/CVE-2013-1718/CVE-2013-1719
    Miscellaneous memory safety hazards
  * MFSA 2013-77/CVE-2013-1720 (bmo#888820)
    Improper state in HTML5 Tree Builder with templates
  * MFSA 2013-79/CVE-2013-1722 (bmo#893308)
    Use-after-free in Animation Manager during stylesheet cloning
  * MFSA 2013-80/CVE-2013-1723 (bmo#891292)
    NativeKey continues handling key messages after widget is destroyed
  * MFSA 2013-81/CVE-2013-1724 (bmo#894137)
    Use-after-free with select element
  * MFSA 2013-82/CVE-2013-1725 (bmo#876762)
    Calling scope for new Javascript objects can lead to memory corruption
  * MFSA 2013-85/CVE-2013-1728 (bmo#883686)
    Uninitialized data in IonMonkey
  * MFSA 2013-88/CVE-2013-1730 (bmo#851353)
    Compartment mismatch re-attaching XBL-backed nodes
  * MFSA 2013-89/CVE-2013-1732 (bmo#883514)
    Buffer overflow with multi-column, lists, and floats
  * MFSA 2013-90/CVE-2013-1735/CVE-2013-1736 (bmo#898871, bmo#906301)
    Memory corruption involving scrolling
  * MFSA 2013-91/CVE-2013-1737 (bmo#907727)
    User-defined properties on DOM proxies get the wrong "this" object
  * MFSA 2013-92/CVE-2013-1738 (bmo#887334, bmo#882897)
    GC hazard with default compartments and frame chain restoration
- moved greek to common translation package
- require NSPR 4.10 and NSS 3.15.1
- add GStreamer build requirements for Gecko
- added enigmail-build.patch to fix TB packaging (bmo#886095)
- removed obsolete patches:

OBS-URL: https://build.opensuse.org/request/show/199621
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaThunderbird?expand=0&rev=123
This commit is contained in:
Stephan Kulow 2013-09-23 08:27:40 +00:00 committed by Git OBS Bridge
commit d30a1e6fdf
21 changed files with 377 additions and 544 deletions

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Sat Sep 14 20:32:28 UTC 2013 - wr@rosenauer.org
- update to Thunderbird 24.0 (bnc#840485)
* MFSA 2013-76/CVE-2013-1718/CVE-2013-1719
Miscellaneous memory safety hazards
* MFSA 2013-77/CVE-2013-1720 (bmo#888820)
Improper state in HTML5 Tree Builder with templates
* MFSA 2013-79/CVE-2013-1722 (bmo#893308)
Use-after-free in Animation Manager during stylesheet cloning
* MFSA 2013-80/CVE-2013-1723 (bmo#891292)
NativeKey continues handling key messages after widget is destroyed
* MFSA 2013-81/CVE-2013-1724 (bmo#894137)
Use-after-free with select element
* MFSA 2013-82/CVE-2013-1725 (bmo#876762)
Calling scope for new Javascript objects can lead to memory corruption
* MFSA 2013-85/CVE-2013-1728 (bmo#883686)
Uninitialized data in IonMonkey
* MFSA 2013-88/CVE-2013-1730 (bmo#851353)
Compartment mismatch re-attaching XBL-backed nodes
* MFSA 2013-89/CVE-2013-1732 (bmo#883514)
Buffer overflow with multi-column, lists, and floats
* MFSA 2013-90/CVE-2013-1735/CVE-2013-1736 (bmo#898871, bmo#906301)
Memory corruption involving scrolling
* MFSA 2013-91/CVE-2013-1737 (bmo#907727)
User-defined properties on DOM proxies get the wrong "this" object
* MFSA 2013-92/CVE-2013-1738 (bmo#887334, bmo#882897)
GC hazard with default compartments and frame chain restoration
- moved greek to common translation package
- require NSPR 4.10 and NSS 3.15.1
- add GStreamer build requirements for Gecko
- added enigmail-build.patch to fix TB packaging (bmo#886095)
- removed obsolete patches:
* enigmail-old-gcc.patch
* mozilla-gcc43-enums.patch
* mozilla-gcc43-template_hacks.patch
* mozilla-gcc43-templates_instantiation.patch
* ppc-xpcshell.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 2 06:01:03 UTC 2013 - wr@rosenauer.org Fri Aug 2 06:01:03 UTC 2013 - wr@rosenauer.org

View File

@ -19,6 +19,8 @@
%define with_kde 1 %define with_kde 1
%define gstreamer_ver 0.10
Name: MozillaThunderbird Name: MozillaThunderbird
BuildRequires: Mesa-devel BuildRequires: Mesa-devel
BuildRequires: autoconf213 BuildRequires: autoconf213
@ -30,8 +32,8 @@ BuildRequires: libcurl-devel
BuildRequires: libgnomeui-devel BuildRequires: libgnomeui-devel
BuildRequires: libidl-devel BuildRequires: libidl-devel
BuildRequires: libnotify-devel BuildRequires: libnotify-devel
BuildRequires: mozilla-nspr-devel >= 4.9.5 BuildRequires: mozilla-nspr-devel >= 4.10
BuildRequires: mozilla-nss-devel >= 3.14.3 BuildRequires: mozilla-nss-devel >= 3.15.1
BuildRequires: nss-shared-helper-devel BuildRequires: nss-shared-helper-devel
BuildRequires: python BuildRequires: python
BuildRequires: startup-notification-devel BuildRequires: startup-notification-devel
@ -40,11 +42,16 @@ BuildRequires: update-desktop-files
BuildRequires: xorg-x11-libXt-devel BuildRequires: xorg-x11-libXt-devel
BuildRequires: yasm BuildRequires: yasm
BuildRequires: zip BuildRequires: zip
%define mainversion 17.0.8 %if %suse_version > 1210
BuildRequires: pkgconfig(gstreamer-%gstreamer_ver)
BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver)
BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver)
%endif
%define mainversion 24.0
%define update_channel release %define update_channel release
Version: %{mainversion} Version: %{mainversion}
Release: 0 Release: 0
%define releasedate 2013080100 %define releasedate 2013091200
Provides: thunderbird = %{version} Provides: thunderbird = %{version}
%if %{with_kde} %if %{with_kde}
# 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
@ -76,16 +83,12 @@ Patch3: mozilla-nongnome-proxies.patch
Patch4: mozilla-kde.patch Patch4: mozilla-kde.patch
Patch5: mozilla-arm-disable-edsp.patch Patch5: mozilla-arm-disable-edsp.patch
Patch7: mozilla-ppc.patch Patch7: mozilla-ppc.patch
Patch8: ppc-xpcshell.patch
# SLE11 patches
Patch10: mozilla-gcc43-enums.patch
Patch11: mozilla-gcc43-template_hacks.patch
Patch12: mozilla-gcc43-templates_instantiation.patch
# Thunderbird/mail # Thunderbird/mail
Patch20: tb-ssldap.patch Patch20: tb-ssldap.patch
Patch21: tb-develdirs.patch Patch21: tb-develdirs.patch
Patch22: thunderbird-shared-nss-db.patch Patch22: thunderbird-shared-nss-db.patch
Patch30: enigmail-old-gcc.patch # Enigmail
Patch30: enigmail-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: coreutils fileutils textutils /bin/sh PreReq: coreutils fileutils textutils /bin/sh
Recommends: libcanberra0 Recommends: libcanberra0
@ -127,7 +130,7 @@ Mozilla application suite.
Summary: Common translations for MozillaThunderbird Summary: Common translations for MozillaThunderbird
License: MPL-2.0 License: MPL-2.0
Group: System/Localization Group: System/Localization
Provides: locale(%{name}:ar;ca;cs;da;de;en_GB;es_AR;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW) Provides: locale(%{name}:ar;ca;cs;da;de;el;en_GB;es_AR;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW)
PreReq: %{name} = %{mainversion} PreReq: %{name} = %{mainversion}
Obsoletes: %{name}-translations < %{version}-%{release} Obsoletes: %{name}-translations < %{version}-%{release}
@ -140,7 +143,7 @@ of MozillaThunderbird.
Summary: Extra translations for MozillaThunderbird Summary: Extra translations for MozillaThunderbird
License: MPL-2.0 License: MPL-2.0
Group: System/Localization Group: System/Localization
Provides: locale(%{name}:ast;be;bg;bn_BD;br;el;et;eu;fy_NL;ga_IE;gd;gl;he;hr;hy_AM;id;is;lt;nn_NO;pa_IN;rm;ro;si;sk;sl;sq;sr;ta_LK;tr;uk;vi) Provides: locale(%{name}:ast;be;bg;bn_BD;br;et;eu;fy_NL;ga_IE;gd;gl;he;hr;hy_AM;id;is;lt;nn_NO;pa_IN;rm;ro;si;sk;sl;sq;sr;ta_LK;tr;uk;vi)
PreReq: %{name} = %{mainversion} PreReq: %{name} = %{mainversion}
Obsoletes: %{name}-translations < %{version}-%{release} Obsoletes: %{name}-translations < %{version}-%{release}
@ -209,20 +212,14 @@ pushd mozilla
%endif %endif
%patch5 -p1 %patch5 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
# SLE patches
%if %suse_version <= 1110
%patch10 -p1
%patch11 -p1
%patch12 -p1
%endif
popd popd
# comm-central patches # comm-central patches
%patch20 -p1 %patch20 -p1
%patch21 -p1 %patch21 -p1
%patch22 -p1 %patch22 -p1
%if %suse_version < 1120 %if %build_enigmail
pushd ../enigmail # enigmail
pushd $RPM_BUILD_DIR/enigmail
%patch30 -p1 %patch30 -p1
popd popd
%endif %endif
@ -279,7 +276,6 @@ ac_add_options --enable-startup-notification
ac_add_options --enable-official-branding ac_add_options --enable-official-branding
ac_add_options --disable-necko-wifi ac_add_options --disable-necko-wifi
ac_add_options --enable-update-channel=%{update_channel} ac_add_options --enable-update-channel=%{update_channel}
ac_add_options --disable-webrtc
EOF EOF
%if %suse_version > 1130 %if %suse_version > 1130
cat << EOF >> $MOZCONFIG cat << EOF >> $MOZCONFIG
@ -287,6 +283,11 @@ ac_add_options --disable-gnomevfs
ac_add_options --enable-gio ac_add_options --enable-gio
EOF EOF
%endif %endif
%if %suse_version < 1220
cat << EOF >> $MOZCONFIG
ac_add_options --disable-gstreamer
EOF
%endif
%if %has_system_cairo %if %has_system_cairo
cat << EOF >> $MOZCONFIG cat << EOF >> $MOZCONFIG
ac_add_options --enable-system-cairo ac_add_options --enable-system-cairo
@ -320,7 +321,7 @@ popd
%install %install
cd ../obj cd ../obj
make -C mail/installer STRIP=/bin/true make -C mail/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
# copy tree into RPM_BUILD_ROOT # copy tree into RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{progdir} mkdir -p $RPM_BUILD_ROOT%{progdir}
cp -rf $RPM_BUILD_DIR/obj/mozilla/dist/thunderbird/* \ cp -rf $RPM_BUILD_DIR/obj/mozilla/dist/thunderbird/* \
@ -358,7 +359,7 @@ for locale in $(awk '{ print $1; }' ../thunderbird/mail/locales/all-locales); do
rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@thunderbird.mozilla.org/defaults rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@thunderbird.mozilla.org/defaults
# check against the fixed common list and sort into the right filelist # check against the fixed common list and sort into the right filelist
_matched=0 _matched=0
for _match in ar ca cs da de en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do for _match in ar ca cs da de el en-GB es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do
[ "$_match" = "$locale" ] && _matched=1 [ "$_match" = "$locale" ] && _matched=1
done done
[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
@ -535,7 +536,6 @@ exit 0
%{progdir}/blocklist.xml %{progdir}/blocklist.xml
%{progdir}/chrome.manifest %{progdir}/chrome.manifest
%{progdir}/dependentlibs.list %{progdir}/dependentlibs.list
%{progdir}/distribution/
%{progdir}/*.so %{progdir}/*.so
%{progdir}/mozilla-xremote-client %{progdir}/mozilla-xremote-client
%{progdir}/omni.ja %{progdir}/omni.ja

View File

@ -5,7 +5,7 @@
<size unit="G">9</size> <size unit="G">9</size>
</disk> </disk>
<memory> <memory>
<size unit="M">2500</size> <size unit="M">3500</size>
</memory> </memory>
</hardware> </hardware>
</constraints> </constraints>

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:2228bed9902f18c5fb22ec286d081b9773d19f3157bd68517c2e7dd3a5e13272 oid sha256:974a49bccf5a58915935a55714975dd519cb668fd76b5907b3a49964afcc72cc
size 29890 size 29942

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
CHANNEL="esr17" CHANNEL="esr24"
BRANCH="releases/comm-$CHANNEL" BRANCH="releases/comm-$CHANNEL"
RELEASE_TAG="THUNDERBIRD_17_0_8_RELEASE" RELEASE_TAG="THUNDERBIRD_24_0_RELEASE"
VERSION="17.0.8" VERSION="24.0"
echo "cloning $BRANCH..." echo "cloning $BRANCH..."
hg clone http://hg.mozilla.org/$BRANCH thunderbird hg clone http://hg.mozilla.org/$BRANCH thunderbird

37
enigmail-build.patch Normal file
View File

@ -0,0 +1,37 @@
Subject: Enigmail breaks Thunderbird packaging
Reference:
https://bug886095.bugzilla.mozilla.org/attachment.cgi?id=773916
diff --git a/genxpi b/genxpi
--- a/genxpi
+++ b/genxpi
@@ -73,16 +73,17 @@ if [ ${platform} = OS2_x86-gcc3 ]; then
enigDllFile=platform/${platform}/components/${enigmimeDll}
else
enigDllFile=platform/${platform}/components/${libPrefix}enigmime-${xpcomAbi}${dllSuffix}
fi
subprocessDll=${libPrefix}subprocess${dllSuffix}
spDllFile=platform/${platform}/lib/${libPrefix}subprocess-${xpcomAbi}${dllSuffix}
+cp ${targetDir}/chrome.manifest{,.save}
# Prepare chrome.manifest
cat ${srcDir}/package/chrome.manifest | \
sed 's/##ENIGMIMEDLL-PLACEHOLDER##/binary-component platform\/'${platform}'\/components\/'`basename ${enigDllFile}`' ABI='${platform}'/' \
> ${targetDir}/chrome.manifest
# Prepare languages other than en-US
if [ -s ${srcDir}/lang/current-languages.txt ]; then
@@ -146,9 +147,10 @@ zip ${xpiFile} \
chrome/${xpiModule}.jar \
${localeJar} \
components/enigmime.xpt \
${enigDllFile} \
${spDllFile} \
chrome.manifest \
install.rdf
-rm install.rdf chrome.manifest
+rm install.rdf
+mv chrome.manifest{.save,}

View File

@ -1,48 +0,0 @@
# HG changeset patch
# Parent 354e161f21ba8fa67aa9f140c2bcdf3b1213abda
# User Wolfgang Rosenauer <wr@rosenauer.org>
diff --git a/ipc/src/Makefile.enig b/ipc/src/Makefile.enig
--- a/ipc/src/Makefile.enig
+++ b/ipc/src/Makefile.enig
@@ -57,17 +57,17 @@ objfiles = subprocess.$(OBJ_SUFF)
libname = $(DLL_PREFIX)subprocess$(DLL_SUFFIX)
all: libs
libs: source
$(CC) $(LDFLAGS) -o $(libname) $(objfiles)
source: $(source)
- $(CC) $(CFLAGS) -Wno-return-type-c-linkage -c -o $(objfiles) $^
+ $(CC) $(CFLAGS) -c -o $(objfiles) $^
clean:
rm -f $(objfiles) $(libname)
tools:
export:
diff --git a/ipc/src/Makefile.in b/ipc/src/Makefile.in
--- a/ipc/src/Makefile.in
+++ b/ipc/src/Makefile.in
@@ -57,17 +57,17 @@ objfiles = subprocess.$(OBJ_SUFF)
libname = $(DLL_PREFIX)subprocess$(DLL_SUFFIX)
all: libs
libs: source
$(CC) $(LDFLAGS) -o $(libname) $(objfiles)
source: $(source)
- $(CC) $(CFLAGS) -Wno-return-type-c-linkage -c -o $(objfiles) $^
+ $(CC) $(CFLAGS) -c -o $(objfiles) $^
clean:
rm -f $(objfiles) $(libname)
tools:
export:

View File

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

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

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

View File

@ -1,93 +0,0 @@
# HG changeset patch
# Parent 6d0e0f7dc4cf04f1d08f8b4f8e9312ac05928608
remove trailing commas in enum definitions as these are unpalatable for gcc
(4.3.4) in pedantic mode
diff --git a/media/webrtc/trunk/src/common_types.h b/media/webrtc/trunk/src/common_types.h
--- a/media/webrtc/trunk/src/common_types.h
+++ b/media/webrtc/trunk/src/common_types.h
@@ -342,17 +342,17 @@ enum TelephoneEventDetectionMethods
enum NsModes // type of Noise Suppression
{
kNsUnchanged = 0, // previously set mode
kNsDefault, // platform default
kNsConference, // conferencing default
kNsLowSuppression, // lowest suppression
kNsModerateSuppression,
kNsHighSuppression,
- kNsVeryHighSuppression, // highest suppression
+ kNsVeryHighSuppression // highest suppression
};
enum AgcModes // type of Automatic Gain Control
{
kAgcUnchanged = 0, // previously set mode
kAgcDefault, // platform default
// adaptive mode for use when analog volume control exists (e.g. for
// PC softphone)
@@ -367,17 +367,17 @@ enum AgcModes // type o
// EC modes
enum EcModes // type of Echo Control
{
kEcUnchanged = 0, // previously set mode
kEcDefault, // platform default
kEcConference, // conferencing default (aggressive AEC)
kEcAec, // Acoustic Echo Cancellation
- kEcAecm, // AEC mobile
+ kEcAecm // AEC mobile
};
// AECM modes
enum AecmModes // mode of AECM
{
kAecmQuietEarpieceOrHeadset = 0,
// Quiet earpiece or headset use
kAecmEarpiece, // most earpiece use
@@ -416,43 +416,43 @@ enum NetEqModes // NetEQ pla
// Optimized trade-off between low delay and jitter robustness for two-way
// communication.
kNetEqDefault = 0,
// Improved jitter robustness at the cost of increased delay. Can be
// used in one-way communication.
kNetEqStreaming = 1,
// Optimzed for decodability of fax signals rather than for perceived audio
// quality.
- kNetEqFax = 2,
+ kNetEqFax = 2
};
enum NetEqBgnModes // NetEQ Background Noise (BGN) configurations
{
// BGN is always on and will be generated when the incoming RTP stream
// stops (default).
kBgnOn = 0,
// The BGN is faded to zero (complete silence) after a few seconds.
kBgnFade = 1,
// BGN is not used at all. Silence is produced after speech extrapolation
// has faded.
- kBgnOff = 2,
+ kBgnOff = 2
};
enum OnHoldModes // On Hold direction
{
kHoldSendAndPlay = 0, // Put both sending and playing in on-hold state.
kHoldSendOnly, // Put only sending in on-hold state.
kHoldPlayOnly // Put only playing in on-hold state.
};
enum AmrMode
{
kRfc3267BwEfficient = 0,
kRfc3267OctetAligned = 1,
- kRfc3267FileStorage = 2,
+ kRfc3267FileStorage = 2
};
// ==================================================================
// Video specific types
// ==================================================================
// Raw video types
enum RawVideoType

View File

@ -1,26 +0,0 @@
# HG changeset patch
# Parent 993c5b5a44ca18c5273b74c75704b418c2477d28
bmo#783505 - bump gcc version required for building without template hacks
diff --git a/js/src/jstypedarray.cpp b/js/src/jstypedarray.cpp
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -1404,17 +1404,17 @@ class TypedArrayTemplate
// retrieves a given Value, probably from a slot on the object.
template<Value ValueGetter(JSObject *obj)>
static JSBool
Getter(JSContext *cx, unsigned argc, Value *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
// FIXME: Hack to keep us building with gcc 4.2. Remove this once we
// drop support for gcc 4.2. See bug 783505 for the details.
-#if defined(__GNUC__) && __GNUC_MINOR__ <= 2
+#if defined(__GNUC__) && __GNUC_MINOR__ <= 3
return CallNonGenericMethod(cx, IsThisClass, GetterImpl<ValueGetter>, args);
#else
return CallNonGenericMethod<ThisTypeArray::IsThisClass,
ThisTypeArray::GetterImpl<ValueGetter> >(cx, args);
#endif
}
// Define an accessor for a read-only property that invokes a native getter

View File

@ -1,20 +0,0 @@
# HG changeset patch
# Parent 2e78665a1ab70f4dc3884965428bda14da684ef6
bmo#732340 - explicitly instantiate templates
diff --git a/gfx/harfbuzz/src/hb-ot-layout.cc b/gfx/harfbuzz/src/hb-ot-layout.cc
--- a/gfx/harfbuzz/src/hb-ot-layout.cc
+++ b/gfx/harfbuzz/src/hb-ot-layout.cc
@@ -479,8 +479,12 @@ hb_ot_layout_position_lookup (hb_font_t
return hb_ot_layout_from_face (font->face)->gpos->position_lookup (&c, lookup_index);
}
void
hb_ot_layout_position_finish (hb_font_t *font, hb_buffer_t *buffer, hb_bool_t zero_width_attached_marks)
{
GPOS::position_finish (font, buffer, zero_width_attached_marks);
}
+
+template int SortedArrayOf<Record<LangSys> >::search<unsigned int>(unsigned int const &) const;
+template int SortedArrayOf<Record<Script> >::search<unsigned int>(unsigned int const &) const;
+template int SortedArrayOf<IntType<unsigned short> >::search<unsigned int>(unsigned int const &) const;

View File

@ -7,7 +7,7 @@ Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
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
@@ -45,14 +45,16 @@ GREPREF_FILES = $(topsrcdir)/netwerk/bas @@ -49,14 +49,15 @@ endif
# Optimizer bug with GCC 3.2.2 on OS/2 # Optimizer bug with GCC 3.2.2 on OS/2
ifeq ($(OS_ARCH), OS2) ifeq ($(OS_ARCH), OS2)
nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
@ -17,9 +17,8 @@ diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
endif endif
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+
greprefs.js: $(GREPREF_FILES) greprefs.js: $(grepref_files)
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@ $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@
libs:: greprefs.js libs:: greprefs.js
@ -39,13 +38,13 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
#include "nsQuickSort.h" #include "nsQuickSort.h"
#include "prmem.h"
#include "pldhash.h" #include "pldhash.h"
#include "prefapi.h" #include "prefapi.h"
#include "prefread.h" #include "prefread.h"
#include "prefapi_private_data.h" #include "prefapi_private_data.h"
@@ -896,16 +897,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
@@ -972,16 +973,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
static nsresult pref_LoadPrefsInDirList(const char *listId) static nsresult pref_LoadPrefsInDirList(const char *listId)
{ {
@ -80,9 +79,9 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
return NS_OK; return NS_OK;
bool hasMore; bool hasMore;
@@ -921,17 +940,17 @@ static nsresult pref_LoadPrefsInDirList( @@ -997,17 +1016,17 @@ static nsresult pref_LoadPrefsInDirList(
nsCAutoString leaf; nsAutoCString leaf;
path->GetNativeLeafName(leaf); path->GetNativeLeafName(leaf);
// Do we care if a file provided by this process fails to load? // Do we care if a file provided by this process fails to load?
@ -99,7 +98,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
{ {
nsZipItemPtr<char> manifest(jarReader, name, true); nsZipItemPtr<char> manifest(jarReader, name, true);
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
@@ -1025,28 +1044,40 @@ static nsresult pref_InitInitialObjects( @@ -1101,28 +1120,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)
@ -140,26 +139,67 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
// or jar:$gre/omni.jar!/defaults/preferences/*.js. // or jar:$gre/omni.jar!/defaults/preferences/*.js.
nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
// GetReader(mozilla::Omnijar::APP) returns null when $app == $gre, in which // GetReader(mozilla::Omnijar::APP) returns null when $app == $gre, in which
diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py
--- a/python/mozbuild/mozpack/chrome/flags.py
+++ b/python/mozbuild/mozpack/chrome/flags.py
@@ -208,16 +208,17 @@ class Flags(OrderedDict):
'platformversion': VersionFlag,
'contentaccessible': Flag,
'os': StringFlag,
'osversion': VersionFlag,
'abi': StringFlag,
'platform': Flag,
'xpcnativewrappers': Flag,
'tablet': Flag,
+ 'desktop': StringFlag,
}
RE = re.compile(r'([!<>=]+)')
def __init__(self, *flags):
'''
Initialize a set of flags given in string form.
flags = Flags('contentaccessible=yes', 'appversion>=3.5')
'''
diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py
--- a/python/mozbuild/mozpack/chrome/manifest.py
+++ b/python/mozbuild/mozpack/chrome/manifest.py
@@ -30,16 +30,17 @@ class ManifestEntry(object):
allowed_flags = [
'application',
'platformversion',
'os',
'osversion',
'abi',
'xpcnativewrappers',
'tablet',
+ 'desktop',
]
def __init__(self, base, *flags):
'''
Initialize a manifest entry with the given base path and flags.
'''
self.base = base
self.flags = Flags(*flags)
diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
--- a/toolkit/components/downloads/Makefile.in --- a/toolkit/components/downloads/Makefile.in
+++ b/toolkit/components/downloads/Makefile.in +++ b/toolkit/components/downloads/Makefile.in
@@ -41,9 +41,12 @@ EXTRA_COMPONENTS = \ @@ -23,9 +23,11 @@ ifndef MOZ_SUITE
DISABLED_EXTRA_COMPONENTS = \
nsDownloadManagerUI.js \
nsDownloadManagerUI.manifest \ nsDownloadManagerUI.manifest \
$(NULL) $(NULL)
endif endif
TEST_DIRS += test
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+
+ +
CXXFLAGS += $(TK_CFLAGS) CXXFLAGS += $(TK_CFLAGS)
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
@@ -35,16 +35,20 @@ @@ -38,16 +38,20 @@
#ifdef XP_WIN #ifdef XP_WIN
#include <shlobj.h> #include <shlobj.h>
@ -180,7 +220,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#include "AndroidBridge.h" #include "AndroidBridge.h"
#endif #endif
@@ -2233,16 +2237,25 @@ nsDownload::SetState(DownloadState aStat @@ -2609,16 +2613,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.
@ -194,7 +234,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
+ command.AppendElement( NS_LITERAL_CSTRING( "DOWNLOADFINISHED" )); + command.AppendElement( NS_LITERAL_CSTRING( "DOWNLOADFINISHED" ));
+ nsAutoString displayName; + nsAutoString displayName;
+ GetDisplayName( displayName ); + GetDisplayName( displayName );
+ command.AppendElement( nsCAutoString( ToNewUTF8String( displayName ))); + command.AppendElement( nsAutoCString( ToNewUTF8String( displayName )));
+ nsKDEUtils::command( command ); + nsKDEUtils::command( command );
+ } else { + } else {
+ // begin non-KDE block + // begin non-KDE block
@ -206,15 +246,15 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
int64_t goat = PR_Now() - mStartTime; int64_t goat = PR_Now() - mStartTime;
showTaskbarAlert = goat > alertIntervalUSec; showTaskbarAlert = goat > alertIntervalUSec;
@@ -2266,19 +2279,20 @@ nsDownload::SetState(DownloadState aStat @@ -2645,19 +2658,20 @@ nsDownload::SetState(DownloadState aStat
// 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
// the items they downloaded will have been removed. // the items they downloaded will have been removed.
alerts->ShowAlertNotification( alerts->ShowAlertNotification(
NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
message, !removeWhenDone, EmptyString(), mDownloadManager, message, !removeWhenDone,
EmptyString()); mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"), EmptyString());
- } - }
+ } + }
} }
@ -231,7 +271,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
--- a/toolkit/content/jar.mn --- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn
@@ -45,29 +45,33 @@ toolkit.jar: @@ -50,29 +50,33 @@ toolkit.jar:
content/global/viewZoomOverlay.js (viewZoomOverlay.js) content/global/viewZoomOverlay.js (viewZoomOverlay.js)
*+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml)
content/global/bindings/browser.xml (widgets/browser.xml) content/global/bindings/browser.xml (widgets/browser.xml)
@ -259,12 +299,12 @@ diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
+% override chrome://global/content/bindings/preferences.xml chrome://global/content/bindings/preferences-kde.xml desktop=kde +% override chrome://global/content/bindings/preferences.xml chrome://global/content/bindings/preferences-kde.xml desktop=kde
content/global/bindings/progressmeter.xml (widgets/progressmeter.xml) content/global/bindings/progressmeter.xml (widgets/progressmeter.xml)
content/global/bindings/radio.xml (widgets/radio.xml) content/global/bindings/radio.xml (widgets/radio.xml)
content/global/bindings/remote-browser.xml (widgets/remote-browser.xml)
content/global/bindings/resizer.xml (widgets/resizer.xml) content/global/bindings/resizer.xml (widgets/resizer.xml)
content/global/bindings/richlistbox.xml (widgets/richlistbox.xml) content/global/bindings/richlistbox.xml (widgets/richlistbox.xml)
content/global/bindings/scale.xml (widgets/scale.xml) content/global/bindings/scale.xml (widgets/scale.xml)
content/global/bindings/scrollbar.xml (widgets/scrollbar.xml) content/global/bindings/scrollbar.xml (widgets/scrollbar.xml)
content/global/bindings/scrollbox.xml (widgets/scrollbox.xml) content/global/bindings/scrollbox.xml (widgets/scrollbox.xml)
content/global/bindings/splitter.xml (widgets/splitter.xml)
diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
@ -1366,7 +1406,7 @@ new file mode 100644
+ if (this.lastSelected) { + if (this.lastSelected) {
+ lastPane = document.getElementById(this.lastSelected); + lastPane = document.getElementById(this.lastSelected);
+ if (!lastPane) { + if (!lastPane) {
+ this.lastSelected = null; + this.lastSelected = "";
+ } + }
+ } + }
+ +
@ -2068,8 +2108,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
@@ -13,16 +13,19 @@ @@ -14,16 +14,18 @@
#include "prnetdb.h"
#include "prenv.h" #include "prenv.h"
#include "nsPrintfCString.h" #include "nsPrintfCString.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"
@ -2077,9 +2116,9 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
#include "nsIGSettingsService.h" #include "nsIGSettingsService.h"
#include "nsInterfaceHashtable.h" #include "nsInterfaceHashtable.h"
#include "mozilla/Attributes.h" #include "mozilla/Attributes.h"
#include "nsIURI.h"
+#include "nsVoidArray.h" +#include "nsVoidArray.h"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
+
class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings { class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
public: public:
@ -2088,7 +2127,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
nsUnixSystemProxySettings() {} nsUnixSystemProxySettings() {}
nsresult Init(); nsresult Init();
@@ -34,16 +37,17 @@ private: @@ -35,16 +37,17 @@ private:
nsCOMPtr<nsIGSettingsService> mGSettings; nsCOMPtr<nsIGSettingsService> mGSettings;
nsCOMPtr<nsIGSettingsCollection> mProxySettings; nsCOMPtr<nsIGSettingsCollection> mProxySettings;
nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings; nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
@ -2102,31 +2141,31 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
nsresult NS_IMETHODIMP
nsUnixSystemProxySettings::Init() nsUnixSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly)
{ {
// If this is a GNOME session, load gconf and try to use its preferences. // dbus prevents us from being threadsafe, but this routine should not block anyhow
@@ -496,16 +500,19 @@ nsUnixSystemProxySettings::GetProxyForUR @@ -496,16 +499,19 @@ nsUnixSystemProxySettings::GetProxyFromG
nsCAutoString host;
rv = aURI->GetHost(host);
NS_ENSURE_SUCCESS(rv, rv);
int32_t port; nsresult
rv = aURI->GetPort(&port); nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec,
NS_ENSURE_SUCCESS(rv, rv); const nsACString & aScheme,
const nsACString & aHost,
+ if( nsKDEUtils::kdeSupport()) const int32_t aPort,
+ return GetProxyFromKDE(scheme, host, port, aResult); nsACString & aResult)
{
+ if (nsKDEUtils::kdeSupport())
+ return GetProxyFromKDE(aScheme, aHost, aPort, aResult);
+ +
if (mProxySettings) { if (mProxySettings) {
rv = GetProxyFromGSettings(scheme, host, port, aResult); nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult);
if (rv == NS_OK) if (NS_SUCCEEDED(rv))
return rv; return rv;
} }
if (mGConf) if (mGConf)
return GetProxyFromGConf(scheme, host, port, aResult); return GetProxyFromGConf(aScheme, aHost, aPort, aResult);
@@ -531,8 +538,34 @@ static const mozilla::Module::ContractID @@ -531,8 +537,34 @@ static const mozilla::Module::ContractID
static const mozilla::Module kUnixProxyModule = { static const mozilla::Module kUnixProxyModule = {
mozilla::Module::kVersion, mozilla::Module::kVersion,
@ -2142,7 +2181,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+ PRInt32 aPort, + PRInt32 aPort,
+ nsACString& aResult) + nsACString& aResult)
+{ +{
+ nsCAutoString url; + nsAutoCString url;
+ url = aScheme; + url = aScheme;
+ url += "://"; + url += "://";
+ url += aHost; + url += aHost;
@ -2161,34 +2200,35 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+ return NS_OK; + return NS_OK;
+} +}
+ +
diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
--- a/toolkit/xre/Makefile.in --- a/toolkit/xre/moz.build
+++ b/toolkit/xre/Makefile.in +++ b/toolkit/xre/moz.build
@@ -69,17 +69,18 @@ else @@ -38,18 +38,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) 'nsNativeAppSupportQt.cpp',
CMMSRCS = nsNativeAppSupportCocoa.mm 'nsQAppInstance.cpp',
EXPORTS += MacQuirks.h ]
else elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
ifeq ($(MOZ_WIDGET_TOOLKIT),os2) CPP_SOURCES += [
CPPSRCS += nsNativeAppSupportOS2.cpp 'nsNativeAppSupportOS2.cpp',
else ]
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) elif CONFIG['MOZ_ENABLE_GTK']:
-CPPSRCS += nsNativeAppSupportUnix.cpp + EXPORTS += ['nsKDEUtils.h']
+CPPSRCS += nsNativeAppSupportUnix.cpp nsKDEUtils.cpp CPP_SOURCES += [
+EXPORTS += nsKDEUtils.h 'nsNativeAppSupportUnix.cpp',
else + 'nsKDEUtils.cpp'
ifeq ($(MOZ_WIDGET_TOOLKIT),qt) ]
MOCSRCS += moc_nsNativeAppSupportQt.cpp else:
CPPSRCS += $(MOCSRCS) CPP_SOURCES += [
CPPSRCS += nsNativeAppSupportQt.cpp 'nsNativeAppSupportDefault.cpp',
CPPSRCS += nsQAppInstance.cpp ]
EXPORTS += nsQAppInstance.h
else if CONFIG['MOZ_X11']:
CPP_SOURCES += [
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,341 @@ @@ -0,0 +1,339 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public +/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this + * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -2321,7 +2361,7 @@ new file mode 100644
+ *eol = '\0'; + *eol = '\0';
+ command_done = ( strcmp( buf, "\\1" ) == 0 ); + command_done = ( strcmp( buf, "\\1" ) == 0 );
+ command_failed = ( strcmp( buf, "\\0" ) == 0 ); + command_failed = ( strcmp( buf, "\\0" ) == 0 );
+ nsCAutoString line( buf ); + nsAutoCString line( buf );
+ 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 ))
@ -2354,8 +2394,6 @@ new file mode 100644
+ +
+bool nsKDEUtils::command( nsIArray* command, nsIArray** output) +bool nsKDEUtils::command( nsIArray* command, nsIArray** output)
+ { + {
+ NS_ENSURE_ARG( command );
+
+ nsTArray<nsCString> in; + nsTArray<nsCString> in;
+ PRUint32 length; + PRUint32 length;
+ command->GetLength( &length ); + command->GetLength( &length );
@ -2364,7 +2402,7 @@ new file mode 100644
+ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt( command, i ); + nsCOMPtr<nsISupportsCString> str = do_QueryElementAt( command, i );
+ if( str ) + if( str )
+ { + {
+ nsCAutoString s; + nsAutoCString s;
+ str->GetData( s ); + str->GetData( s );
+ in.AppendElement( s ); + in.AppendElement( s );
+ } + }
@ -2586,27 +2624,39 @@ 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
@@ -58,18 +58,19 @@ LOCAL_INCLUDES = -I$(srcdir) @@ -86,9 +86,10 @@ EXTRA_COMPONENTS = \
LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \ # we don't want the shared lib, but we want to force the creation of a static lib.
-I$(topsrcdir)/dom/ipc \ FORCE_STATIC_LIB = 1
-I$(topsrcdir)/content/base/src \ include $(topsrcdir)/config/config.mk
-I$(topsrcdir)/content/events/src \ include $(topsrcdir)/ipc/chromium/chromium-config.mk
-I$(topsrcdir)/netwerk/base/src \ include $(topsrcdir)/config/rules.mk
-I$(topsrcdir)/netwerk/protocol/http
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
-OSHELPER += nsGNOMERegistry.cpp CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
+OSHELPER += nsCommonRegistry.cpp nsGNOMERegistry.cpp nsKDERegistry.cpp
OSHELPER += nsMIMEInfoUnix.cpp
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
endif endif
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -68,16 +68,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
pass
else:
CPP_SOURCES += [
'nsOSHelperAppService.cpp',
]
ifeq ($(MOZ_WIDGET_TOOLKIT),android) if CONFIG['MOZ_ENABLE_GTK']:
OSHELPER += nsMIMEInfoAndroid.cpp CPP_SOURCES += [
OSHELPER += nsAndroidHandlerApp.cpp + 'nsCommonRegistry.cpp',
OSHELPER += nsExternalSharingAppService.cpp + 'nsKDERegistry.cpp',
EXPORTS += nsExternalSharingAppService.h 'nsGNOMERegistry.cpp',
OSHELPER += nsExternalURLHandlerService.cpp 'nsMIMEInfoUnix.cpp',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
CPP_SOURCES += [
'nsMIMEInfoAndroid.cpp',
'nsAndroidHandlerApp.cpp',
'nsExternalSharingAppService.cpp',
diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
@ -2625,7 +2675,7 @@ new file mode 100644
+#include "nsVoidArray.h" +#include "nsVoidArray.h"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
+ +
+/* static */ PRBool +/* static */ bool
+nsCommonRegistry::HandlerExists(const char *aProtocolScheme) +nsCommonRegistry::HandlerExists(const char *aProtocolScheme)
+{ +{
+ if( nsKDEUtils::kdeSupport()) + if( nsKDEUtils::kdeSupport())
@ -2683,7 +2733,7 @@ new file mode 100644
+class nsCommonRegistry +class nsCommonRegistry
+{ +{
+ public: + public:
+ static PRBool HandlerExists(const char *aProtocolScheme); + static bool HandlerExists(const char *aProtocolScheme);
+ +
+ static nsresult LoadURL(nsIURI *aURL); + static nsresult LoadURL(nsIURI *aURL);
+ +
@ -2698,7 +2748,7 @@ diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/
new file mode 100644 new file mode 100644
--- /dev/null --- /dev/null
+++ b/uriloader/exthandler/unix/nsKDERegistry.cpp +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp
@@ -0,0 +1,86 @@ @@ -0,0 +1,88 @@
+/* -*- 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 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public +/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this + * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -2713,12 +2763,12 @@ new file mode 100644
+#include "nsAutoPtr.h" +#include "nsAutoPtr.h"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
+ +
+/* static */ PRBool +/* static */ bool
+nsKDERegistry::HandlerExists(const char *aProtocolScheme) +nsKDERegistry::HandlerExists(const char *aProtocolScheme)
+{ +{
+ nsTArray<nsCString> command; + nsTArray<nsCString> command;
+ command.AppendElement( NS_LITERAL_CSTRING( "HANDLEREXISTS" )); + command.AppendElement( NS_LITERAL_CSTRING( "HANDLEREXISTS" ));
+ command.AppendElement( nsCAutoString( aProtocolScheme )); + command.AppendElement( nsAutoCString( aProtocolScheme ));
+ return nsKDEUtils::command( command ); + return nsKDEUtils::command( command );
+} +}
+ +
@ -2730,7 +2780,11 @@ new file mode 100644
+ nsCString url; + nsCString url;
+ aURL->GetSpec( url ); + aURL->GetSpec( url );
+ command.AppendElement( url ); + command.AppendElement( url );
+ return nsKDEUtils::command( command ); + bool rv = nsKDEUtils::command( command );
+ if (!rv)
+ return NS_ERROR_FAILURE;
+
+ return NS_OK;
+} +}
+ +
+/* static */ void +/* static */ void
@ -2779,9 +2833,7 @@ new file mode 100644
+ 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; + return mimeInfo.forget();
+ NS_ADDREF((retval = mimeInfo));
+ return retval;
+ } + }
+ return nullptr; + return nullptr;
+} +}
@ -2799,13 +2851,13 @@ new file mode 100644
+#include "nsTArray.h" +#include "nsTArray.h"
+ +
+class nsMIMEInfoBase; +class nsMIMEInfoBase;
+class nsCAutoString; +class nsAutoCString;
+class nsCString; +class nsCString;
+ +
+class nsKDERegistry +class nsKDERegistry
+{ +{
+ public: + public:
+ static PRBool HandlerExists(const char *aProtocolScheme); + static bool HandlerExists(const char *aProtocolScheme);
+ +
+ static nsresult LoadURL(nsIURI *aURL); + static nsresult LoadURL(nsIURI *aURL);
+ +
@ -2855,22 +2907,22 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
if (NS_FAILED(rv)){ if (NS_FAILED(rv)){
HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nullptr); HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nullptr);
if (action) { if (action) {
nsCAutoString spec; nsAutoCString spec;
aURI->GetAsciiSpec(spec); aURI->GetAsciiSpec(spec);
if (hildon_uri_open(spec.get(), action, nullptr)) if (hildon_uri_open(spec.get(), action, nullptr))
@@ -61,22 +64,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI * @@ -67,22 +70,22 @@ nsMIMEInfoUnix::GetHasDefaultHandler(boo
return rv;
}
NS_IMETHODIMP
nsMIMEInfoUnix::GetHasDefaultHandler(bool *_retval)
{ {
// if mDefaultApplication is set, it means the application has been set from
// either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to
// give the GNOME answer.
if (mDefaultApplication)
return nsMIMEInfoImpl::GetHasDefaultHandler(_retval);
*_retval = 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) {
nsCAutoString ext; nsAutoCString ext;
nsresult rv = GetPrimaryExtension(ext); nsresult rv = GetPrimaryExtension(ext);
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
- mimeInfo = nsGNOMERegistry::GetFromExtension(ext); - mimeInfo = nsGNOMERegistry::GetFromExtension(ext);
@ -2883,7 +2935,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
if (*_retval) if (*_retval)
return NS_OK; return NS_OK;
@@ -119,16 +122,33 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns @@ -130,16 +133,33 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get())); ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get()));
if (action.isValid()) { if (action.isValid()) {
action.trigger(); action.trigger();
@ -2910,14 +2962,14 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
+ } + }
+ +
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCAutoString uriSpec; nsAutoCString uriSpec;
if (giovfs) { if (giovfs) {
// nsGIOMimeApp->Launch wants a URI string instead of local file // nsGIOMimeApp->Launch wants a URI string instead of local file
nsresult rv; nsresult rv;
nsCOMPtr<nsIIOService> ioservice = do_GetService(NS_IOSERVICE_CONTRACTID, &rv); nsCOMPtr<nsIIOService> ioservice = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIURI> uri; nsCOMPtr<nsIURI> uri;
@@ -146,17 +166,17 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns @@ -157,17 +177,17 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
/* Fallback to GnomeVFS */ /* Fallback to GnomeVFS */
nsCOMPtr<nsIGnomeVFSMimeApp> app; nsCOMPtr<nsIGnomeVFSMimeApp> app;
if (NS_SUCCEEDED(gnomevfs->GetAppForMimeType(mSchemeOrType, getter_AddRefs(app))) && app) if (NS_SUCCEEDED(gnomevfs->GetAppForMimeType(mSchemeOrType, getter_AddRefs(app))) && app)
@ -2929,7 +2981,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
- nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromExtension(nativePath); - nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromExtension(nativePath);
+ nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromExtension(nativePath); + nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromExtension(nativePath);
if (mimeInfo) { if (mimeInfo) {
nsCAutoString type; nsAutoCString type;
mimeInfo->GetType(type); mimeInfo->GetType(type);
if (giovfs) { if (giovfs) {
nsCOMPtr<nsIGIOMimeApp> app; nsCOMPtr<nsIGIOMimeApp> app;
@ -2947,7 +2999,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
#include "nsOSHelperAppService.h" #include "nsOSHelperAppService.h"
#include "nsMIMEInfoUnix.h" #include "nsMIMEInfoUnix.h"
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
-#include "nsGNOMERegistry.h" -#include "nsGNOMERegistry.h"
+#include "nsCommonRegistry.h" +#include "nsCommonRegistry.h"
#endif #endif
@ -2965,7 +3017,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
*aHandlerExists = true; *aHandlerExists = true;
#endif #endif
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
// Check the GConf registry for a protocol handler // Check the GConf registry for a protocol handler
- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); - *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
+ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); + *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme);
@ -2979,7 +3031,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval)
{ {
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
- nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); - nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval);
+ nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); + nsCommonRegistry::GetAppDescForScheme(aScheme, _retval);
return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK;
@ -2990,39 +3042,39 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
nsresult nsOSHelperAppService::GetFileTokenForPath(const PRUnichar * platformAppPath, nsIFile ** aFile) nsresult nsOSHelperAppService::GetFileTokenForPath(const PRUnichar * platformAppPath, nsIFile ** aFile)
{ {
@@ -1265,17 +1265,17 @@ nsOSHelperAppService::GetFromExtension(c @@ -1266,17 +1266,17 @@ nsOSHelperAppService::GetFromExtension(c
minorType,
mime_types_description, mime_types_description,
true); true);
if (NS_FAILED(rv) || majorType.IsEmpty()) { if (NS_FAILED(rv) || majorType.IsEmpty()) {
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
LOG(("Looking in GNOME registry\n")); LOG(("Looking in GNOME registry\n"));
- nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromExtension(aFileExt).get(); nsRefPtr<nsMIMEInfoBase> gnomeInfo =
+ nsMIMEInfoBase *gnomeInfo = nsCommonRegistry::GetFromExtension(aFileExt).get(); - nsGNOMERegistry::GetFromExtension(aFileExt);
+ nsCommonRegistry::GetFromExtension(aFileExt);
if (gnomeInfo) { if (gnomeInfo) {
LOG(("Got MIMEInfo from GNOME registry\n")); LOG(("Got MIMEInfo from GNOME registry\n"));
return gnomeInfo; return gnomeInfo.forget();
} }
#endif #endif
rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
majorType, majorType,
@@ -1391,17 +1391,17 @@ nsOSHelperAppService::GetFromType(const @@ -1389,17 +1389,17 @@ nsOSHelperAppService::GetFromType(const
#ifdef MOZ_WIDGET_GTK2 #ifdef MOZ_WIDGET_GTK
nsMIMEInfoBase *gnomeInfo = nullptr; nsRefPtr<nsMIMEInfoBase> gnomeInfo;
if (handler.IsEmpty()) { if (handler.IsEmpty()) {
// No useful data yet. Check the GNOME registry. Unfortunately, newer // No useful data yet. Check the GNOME registry. Unfortunately, newer
// GNOME versions no longer have type-to-extension mappings, so we might // GNOME versions no longer have type-to-extension mappings, so we might
// get back a MIMEInfo without any extensions set. In that case we'll have // get back a MIMEInfo without any extensions set. In that case we'll have
// to look in our mime.types files for the extensions. // to look in our mime.types files for the extensions.
LOG(("Looking in GNOME registry\n")); LOG(("Looking in GNOME registry\n"));
- gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType).get(); - gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType);
+ gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType).get(); + gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType);
if (gnomeInfo && gnomeInfo->HasExtensions()) { if (gnomeInfo && gnomeInfo->HasExtensions()) {
LOG(("Got MIMEInfo from GNOME registry, and it has extensions set\n")); LOG(("Got MIMEInfo from GNOME registry, and it has extensions set\n"));
return gnomeInfo; return gnomeInfo.forget();
} }
} }
#endif #endif
@ -3031,7 +3083,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in
--- a/widget/gtk2/Makefile.in --- a/widget/gtk2/Makefile.in
+++ b/widget/gtk2/Makefile.in +++ b/widget/gtk2/Makefile.in
@@ -104,11 +104,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME=' @@ -67,11 +67,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME='
INCLUDES += \ INCLUDES += \
-I$(srcdir)/../xpwidgets \ -I$(srcdir)/../xpwidgets \
@ -3049,7 +3101,7 @@ diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in
diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
--- a/widget/gtk2/nsFilePicker.cpp --- a/widget/gtk2/nsFilePicker.cpp
+++ b/widget/gtk2/nsFilePicker.cpp +++ b/widget/gtk2/nsFilePicker.cpp
@@ -1,16 +1,17 @@ @@ -1,31 +1,33 @@
/* -*- 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 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
@ -3067,14 +3119,12 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
#include "nsIStringBundle.h" #include "nsIStringBundle.h"
#include "nsArrayEnumerator.h" #include "nsArrayEnumerator.h"
@@ -19,16 +20,17 @@ #include "nsMemory.h"
#include "nsEnumeratorUtils.h"
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsReadableUtils.h" #include "nsReadableUtils.h"
#include "mozcontainer.h" #include "mozcontainer.h"
#include "prmem.h"
#include "prlink.h"
#include "nsFilePicker.h" #include "nsFilePicker.h"
+#include "nsKDEUtils.h" +#include "nsKDEUtils.h"
@ -3085,7 +3135,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
using namespace mozilla; using namespace mozilla;
#define MAX_PREVIEW_SIZE 180 #define MAX_PREVIEW_SIZE 180
@@ -264,17 +266,19 @@ nsFilePicker::AppendFilters(int32_t aFil @@ -242,17 +244,19 @@ nsFilePicker::AppendFilters(int32_t aFil
return nsBaseFilePicker::AppendFilters(aFilterMask); return nsBaseFilePicker::AppendFilters(aFilterMask);
} }
@ -3097,16 +3147,16 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
- return NS_OK; - return NS_OK;
+ // Unless it's KDE. + // Unless it's KDE.
+ if( mMode != modeOpen || !nsKDEUtils::kdeSupport()) + if( mMode != modeOpen || !nsKDEUtils::kdeSupport())
+ return NS_OK; + return NS_OK;
} }
nsCAutoString filter, name; nsAutoCString filter, name;
CopyUTF16toUTF8(aFilter, filter); CopyUTF16toUTF8(aFilter, filter);
CopyUTF16toUTF8(aTitle, name); CopyUTF16toUTF8(aTitle, name);
mFilters.AppendElement(filter); mFilters.AppendElement(filter);
mFilterNames.AppendElement(name); mFilterNames.AppendElement(name);
@@ -388,16 +392,32 @@ nsFilePicker::Show(int16_t *aReturn) @@ -366,16 +370,32 @@ nsFilePicker::Show(int16_t *aReturn)
NS_IMETHODIMP NS_IMETHODIMP
nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
@ -3134,12 +3184,12 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
nsXPIDLCString title; nsXPIDLCString title;
title.Adopt(ToNewUTF8String(mTitle)); title.Adopt(ToNewUTF8String(mTitle));
GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget); GtkWindow *parent_widget =
GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
GtkFileChooserAction action = GetGtkFileChooserAction(mMode); GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
? GTK_STOCK_SAVE : GTK_STOCK_OPEN; @@ -567,8 +587,235 @@ nsFilePicker::Done(GtkWidget* file_choos
@@ -587,8 +607,235 @@ nsFilePicker::Done(GtkWidget* file_choos
if (mCallback) { if (mCallback) {
mCallback->Done(result); mCallback->Done(result);
mCallback = nullptr; mCallback = nullptr;
@ -3167,7 +3217,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ +
+static PRInt32 windowToXid( nsIWidget* widget ) +static PRInt32 windowToXid( nsIWidget* widget )
+ { + {
+ GtkWindow *parent_widget = get_gtk_window_for_nsiwidget( widget ); + GtkWindow *parent_widget = GTK_WINDOW(widget->GetNativeData(NS_NATIVE_SHELLWIDGET));
+ GdkWindow* gdk_window = gtk_widget_get_window( gtk_widget_get_toplevel( GTK_WIDGET( parent_widget ))); + GdkWindow* gdk_window = gtk_widget_get_window( gtk_widget_get_toplevel( GTK_WIDGET( parent_widget )));
+ return GDK_WINDOW_XID( gdk_window ); + return GDK_WINDOW_XID( gdk_window );
+ } + }
@ -3216,14 +3266,14 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ } + }
+ } + }
+ +
+ nsCAutoString directory; + nsAutoCString directory;
+ if (mDisplayDirectory) { + if (mDisplayDirectory) {
+ mDisplayDirectory->GetNativePath(directory); + mDisplayDirectory->GetNativePath(directory);
+ } else if (mPrevDisplayDirectory) { + } else if (mPrevDisplayDirectory) {
+ mPrevDisplayDirectory->GetNativePath(directory); + mPrevDisplayDirectory->GetNativePath(directory);
+ } + }
+ +
+ nsCAutoString startdir; + nsAutoCString startdir;
+ if (!directory.IsEmpty()) { + if (!directory.IsEmpty()) {
+ startdir = directory; + startdir = directory;
+ } + }
@ -3239,7 +3289,7 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ if( startdir.IsEmpty()) + if( startdir.IsEmpty())
+ startdir = "."; + startdir = ".";
+ +
+ nsCAutoString filters; + nsAutoCString filters;
+ PRInt32 count = mFilters.Length(); + PRInt32 count = mFilters.Length();
+ if( count == 0 ) //just in case + if( count == 0 ) //just in case
+ filters = "*"; + filters = "*";
@ -3254,12 +3304,12 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ } + }
+ +
+ nsTArray<nsCString> command; + nsTArray<nsCString> command;
+ command.AppendElement( nsCAutoString( arg )); + command.AppendElement( nsAutoCString( arg ));
+ command.AppendElement( startdir ); + command.AppendElement( startdir );
+ if( mMode != nsIFilePicker::modeGetFolder ) + if( mMode != nsIFilePicker::modeGetFolder )
+ { + {
+ command.AppendElement( filters ); + command.AppendElement( filters );
+ nsCAutoString selected; + nsAutoCString selected;
+ selected.AppendInt( mSelectedType ); + selected.AppendInt( mSelectedType );
+ command.AppendElement( selected ); + command.AppendElement( selected );
+ } + }
@ -3269,13 +3319,13 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ if( PRInt32 xid = windowToXid( mParentWidget )) + if( PRInt32 xid = windowToXid( mParentWidget ))
+ { + {
+ command.AppendElement( NS_LITERAL_CSTRING( "PARENT" )); + command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
+ nsCAutoString parent; + nsAutoCString parent;
+ parent.AppendInt( xid ); + parent.AppendInt( xid );
+ command.AppendElement( parent ); + command.AppendElement( parent );
+ } + }
+ +
+ nsTArray<nsCString> output; + nsTArray<nsCString> output;
+ if( nsKDEUtils::commandBlockUi( command, get_gtk_window_for_nsiwidget( mParentWidget ), &output )) + if( nsKDEUtils::commandBlockUi( command, GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), &output ))
+ { + {
+ *aReturn = nsIFilePicker::returnOK; + *aReturn = nsIFilePicker::returnOK;
+ mFiles.Clear(); + mFiles.Clear();
@ -3357,13 +3407,13 @@ diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp
+ if( PRInt32 xid = windowToXid( mParentWidget )) + if( PRInt32 xid = windowToXid( mParentWidget ))
+ { + {
+ command.AppendElement( NS_LITERAL_CSTRING( "PARENT" )); + command.AppendElement( NS_LITERAL_CSTRING( "PARENT" ));
+ nsCAutoString parent; + nsAutoCString parent;
+ parent.AppendInt( xid ); + parent.AppendInt( xid );
+ command.AppendElement( parent ); + command.AppendElement( parent );
+ } + }
+ +
+ nsTArray<nsCString> output; + nsTArray<nsCString> output;
+ if( nsKDEUtils::commandBlockUi( command, get_gtk_window_for_nsiwidget( mParentWidget ), &output )) + if( nsKDEUtils::commandBlockUi( command, GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), &output ))
+ { + {
+ *aReturn = nsIFilePicker::returnOK; + *aReturn = nsIFilePicker::returnOK;
+ mFileURL = output.Length() > 0 ? output[ 0 ] : nsCString(); + mFileURL = output.Length() > 0 ? output[ 0 ] : nsCString();
@ -3399,17 +3449,16 @@ diff --git a/widget/gtk2/nsFilePicker.h b/widget/gtk2/nsFilePicker.h
diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
--- a/xpcom/components/Makefile.in --- a/xpcom/components/Makefile.in
+++ b/xpcom/components/Makefile.in +++ b/xpcom/components/Makefile.in
@@ -59,10 +59,11 @@ LOCAL_INCLUDES = \ @@ -28,9 +28,10 @@ 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_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_COM DEFINES += -D_IMPL_NS_COM
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) ifdef MOZ_WIDGET_GTK
CXXFLAGS += $(TK_CFLAGS)
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
endif endif
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
@ -3477,7 +3526,7 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
minorVersion); minorVersion);
} }
+ desktop = NS_LITERAL_STRING("macosx"); + desktop = NS_LITERAL_STRING("macosx");
#elif defined(MOZ_WIDGET_GTK2) #elif defined(MOZ_WIDGET_GTK)
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
gtk_major_version, gtk_major_version,
gtk_minor_version); gtk_minor_version);
@ -3545,7 +3594,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
@@ -157,17 +157,17 @@ include $(topsrcdir)/ipc/chromium/chromi @@ -43,17 +43,17 @@ include $(topsrcdir)/ipc/chromium/chromi
DEFINES += -D_IMPL_NS_COM DEFINES += -D_IMPL_NS_COM
ifeq ($(OS_ARCH),Linux) ifeq ($(OS_ARCH),Linux)
@ -3567,7 +3616,7 @@ 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
@@ -49,16 +49,17 @@ @@ -50,16 +50,17 @@
#include "prproces.h" #include "prproces.h"
#include "nsIDirectoryEnumerator.h" #include "nsIDirectoryEnumerator.h"
#include "nsISimpleEnumerator.h" #include "nsISimpleEnumerator.h"
@ -3585,7 +3634,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
#include "prmem.h" #include "prmem.h"
#include "plbase64.h" #include "plbase64.h"
@@ -1760,44 +1761,51 @@ nsLocalFile::SetPersistentDescriptor(con @@ -1753,44 +1754,51 @@ nsLocalFile::SetPersistentDescriptor(con
return InitWithNativePath(aPersistentDescriptor); return InitWithNativePath(aPersistentDescriptor);
#endif #endif
} }
@ -3599,7 +3648,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
- if (!giovfs && !gnomevfs) - if (!giovfs && !gnomevfs)
- return NS_ERROR_FAILURE; - return NS_ERROR_FAILURE;
- -
+ nsCAutoString url; + nsAutoCString url;
bool isDirectory; bool isDirectory;
if (NS_FAILED(IsDirectory(&isDirectory))) if (NS_FAILED(IsDirectory(&isDirectory)))
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@ -3613,7 +3662,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
+ url = mPath; + url = mPath;
} else { } else {
nsCOMPtr<nsIFile> parentDir; nsCOMPtr<nsIFile> parentDir;
nsCAutoString dirPath; nsAutoCString dirPath;
if (NS_FAILED(GetParent(getter_AddRefs(parentDir)))) if (NS_FAILED(GetParent(getter_AddRefs(parentDir))))
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
if (NS_FAILED(parentDir->GetNativePath(dirPath))) if (NS_FAILED(parentDir->GetNativePath(dirPath)))
@ -3651,7 +3700,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;
@@ -1823,16 +1831,23 @@ nsLocalFile::Launch() @@ -1816,16 +1824,23 @@ nsLocalFile::Launch()
if (nullptr == connection) if (nullptr == connection)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;

View File

@ -1,17 +1,17 @@
# HG changeset patch # HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org> # User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent 0d6917b8f28f6e0398dbf329dda4932ba4f997c2 # Parent df748bfc0eaca6dedf086cfd7167392416bfae27
Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp
--- a/intl/locale/src/nsLocaleService.cpp --- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp +++ b/intl/locale/src/nsLocaleService.cpp
@@ -160,16 +160,17 @@ nsLocaleService::nsLocaleService(void) @@ -127,16 +127,17 @@ nsLocaleService::nsLocaleService(void)
nsRefPtr<nsLocale> resultLocale(new nsLocale()); nsRefPtr<nsLocale> resultLocale(new nsLocale());
NS_ENSURE_TRUE(resultLocale, ); NS_ENSURE_TRUE_VOID(resultLocale);
#ifdef MOZ_WIDGET_QT #ifdef MOZ_WIDGET_QT
const char* lang = QLocale::system().name().toAscii(); const char* lang = QLocale::system().name().toUtf8();
#else #else
// Get system configuration // Get system configuration
const char* lang = getenv("LANG"); const char* lang = getenv("LANG");
@ -24,7 +24,7 @@ diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleServi
for( i = 0; i < LocaleListLength; i++ ) { for( i = 0; i < LocaleListLength; i++ ) {
nsresult result; nsresult result;
@@ -188,16 +189,21 @@ nsLocaleService::nsLocaleService(void) @@ -155,16 +156,21 @@ nsLocaleService::nsLocaleService(void)
} else { } else {
CopyASCIItoUTF16(lang, platformLocale); CopyASCIItoUTF16(lang, platformLocale);
result = nsPosixLocale::GetXPLocale(lang, xpLocale); result = nsPosixLocale::GetXPLocale(lang, xpLocale);

View File

@ -9,35 +9,37 @@ 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
@@ -74,22 +74,28 @@ private: @@ -50,24 +50,28 @@ nsUnixSystemProxySettings::GetMainThread
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult); // dbus prevents us from being threadsafe, but this routine should not block anyhow
}; *aMainThreadOnly = true;
return NS_OK;
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings) }
nsresult nsresult
nsUnixSystemProxySettings::Init() nsUnixSystemProxySettings::Init()
{ {
- mSchemeProxySettings.Init(5); - mSchemeProxySettings.Init(5);
- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
- mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); - mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
- if (mGSettings) { - if (mGSettings) {
- mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), - mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
- getter_AddRefs(mProxySettings)); - getter_AddRefs(mProxySettings));
+ // 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 (!mProxySettings) {
+ // this was not a GNOME session, using *_PROXY environment variables. - mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ // only use GSettings if that is a GNOME session
+ const char* sessionType = PR_GetEnv("DESKTOP_SESSION"); + const char* sessionType = PR_GetEnv("DESKTOP_SESSION");
+ if (sessionType && !strcmp(sessionType, "gnome")) { + if (sessionType && !strcmp(sessionType, "gnome")) {
+ mSchemeProxySettings.Init(5); + mSchemeProxySettings.Init(5);
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID); + mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
+ if (mGSettings) { + if (mGSettings) {
+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"), + mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
+ getter_AddRefs(mProxySettings)); + getter_AddRefs(mProxySettings));
+ }
+ if (!mProxySettings) {
+ mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ } + }
} }
return NS_OK; return NS_OK;
} }

View File

@ -1,5 +1,5 @@
# HG changeset patch # HG changeset patch
# Parent 58ae98c85e39def96a90cb21c90e871f41a03a71 # Parent 21d0e194954e451f0f1935d0ed68ee9eae432ddf
# User Wolfgang Rosenauer <wr@rosenauer.org> # User Wolfgang Rosenauer <wr@rosenauer.org>
Bug 746112 - RegExp hang on ppc64 in execute. Bug 746112 - RegExp hang on ppc64 in execute.
Bug 750620 - Make double-conversion portable to exotic architectures. TM: mozilla15 Bug 750620 - Make double-conversion portable to exotic architectures. TM: mozilla15
@ -48,7 +48,7 @@ diff --git a/js/src/yarr/YarrInterpreter.h b/js/src/yarr/YarrInterpreter.h
diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h
--- a/js/src/yarr/YarrPattern.h --- a/js/src/yarr/YarrPattern.h
+++ b/js/src/yarr/YarrPattern.h +++ b/js/src/yarr/YarrPattern.h
@@ -166,17 +166,17 @@ struct PatternTerm { @@ -180,17 +180,17 @@ struct PatternTerm {
, m_capture(false) , m_capture(false)
, m_invert(invert) , m_invert(invert)
{ {
@ -70,7 +70,7 @@ diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c --- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c
@@ -1086,17 +1086,19 @@ struct arena_s { @@ -1099,17 +1099,17 @@ struct arena_s {
static unsigned ncpus; static unsigned ncpus;
#endif #endif
@ -79,17 +79,16 @@ diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
* controlling the malloc behavior are defined as compile-time constants * controlling the malloc behavior are defined as compile-time constants
* for best performance and cannot be altered at runtime. * for best performance and cannot be altered at runtime.
*/ */
+#if !(defined(__powerpc__)) -#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__)
+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__))
#define MALLOC_STATIC_SIZES 1 #define MALLOC_STATIC_SIZES 1
+#endif #endif
#ifdef MALLOC_STATIC_SIZES #ifdef MALLOC_STATIC_SIZES
/* /*
* VM page size. It must divide the runtime CPU page size or the code * VM page size. It must divide the runtime CPU page size or the code
* will abort. * will abort.
*/
#define pagesize_2pow ((size_t) 12)
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
--- a/mfbt/double-conversion/utils.h --- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h +++ b/mfbt/double-conversion/utils.h

View File

@ -7,7 +7,7 @@ References:
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
@@ -7987,16 +7987,31 @@ AC_SUBST(QCMS_LIBS) @@ -8330,16 +8330,31 @@ AC_SUBST(QCMS_LIBS)
dnl ======================================================== dnl ========================================================
dnl HarfBuzz dnl HarfBuzz
@ -33,41 +33,41 @@ diff --git a/configure.in b/configure.in
+dnl ======================================================== +dnl ========================================================
dnl SIL Graphite dnl SIL Graphite
dnl ======================================================== dnl ========================================================
if test "$MOZ_GRAPHITE"; then MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)'
MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)' AC_SUBST(MOZ_GRAPHITE_LIBS)
AC_DEFINE(MOZ_GRAPHITE)
else dnl ========================================================
MOZ_GRAPHITE_LIBS= dnl OTS
fi 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
@@ -90,12 +90,14 @@ DEFINES += \ @@ -18,10 +18,13 @@ LIBXUL_LIBRARY = 1
CSRCS += md4.c
DEFINES += \
-DNSS_ENABLE_ECC \
-DDLL_PREFIX=\"$(DLL_PREFIX)\" \
-DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
$(NULL) $(NULL)
EXPORTS += \ +LOCAL_INCLUDES += $(NSSHELPER_CFLAGS)
nsNSSShutDown.h \
$(NULL)
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
-LOCAL_INCLUDES += $(NSS_CFLAGS)
+LOCAL_INCLUDES += $(NSS_CFLAGS) $(NSSHELPER_CFLAGS)
+
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS) +EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
+
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
--- a/security/manager/ssl/src/nsNSSComponent.cpp --- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp +++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -1,14 +1,21 @@ @@ -3,16 +3,23 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifdef MOZ_LOGGING
#define FORCE_PR_LOG 1
#endif
+#ifdef MOZ_ENABLE_NSSHELPER +#ifdef MOZ_ENABLE_NSSHELPER
+#pragma GCC visibility push(default) +#pragma GCC visibility push(default)
+#include <nss-shared-helper.h> +#include <nss-shared-helper.h>
@ -76,14 +76,14 @@ diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/
+#endif +#endif
+ +
#include "nsNSSComponent.h" #include "nsNSSComponent.h"
#include "nsNSSCallbacks.h"
#include "nsNSSIOLayer.h"
#include "nsCertVerificationThread.h"
#include "nsNetUtil.h" #include "CertVerifier.h"
#include "nsCertVerificationThread.h"
#include "nsAppDirectoryServiceDefs.h" #include "nsAppDirectoryServiceDefs.h"
#include "nsDirectoryService.h" #include "nsComponentManagerUtils.h"
@@ -1731,18 +1738,34 @@ nsNSSComponent::InitializeNSS(bool showW #include "nsDirectoryServiceDefs.h"
#include "nsICertOverrideService.h"
@@ -1132,18 +1139,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
@ -123,12 +123,12 @@ 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
@@ -443,17 +443,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO @@ -490,17 +490,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
endif endif
endif endif
endif endif
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) EXTRA_DSO_LDOPTS += $(LIBS_DIR)
DEFINES += -DIMPL_XREAPI DEFINES += -DIMPL_XREAPI

View File

@ -1,71 +0,0 @@
Index: mozilla/js/src/gc/Heap.h
===================================================================
--- mozilla.orig/js/src/gc/Heap.h
+++ mozilla/js/src/gc/Heap.h
@@ -110,19 +110,22 @@ struct Cell
*/
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
const size_t PageShift = 13;
+const size_t ArenaShift = PageShift;
+#elif defined(__powerpc__)
+const size_t PageShift = 16;
+const size_t ArenaShift = 12;
#else
const size_t PageShift = 12;
+const size_t ArenaShift = PageShift;
#endif
const size_t PageSize = size_t(1) << PageShift;
+const size_t ArenaSize = size_t(1) << ArenaShift;
+const size_t ArenaMask = ArenaSize - 1;
const size_t ChunkShift = 20;
const size_t ChunkSize = size_t(1) << ChunkShift;
const size_t ChunkMask = ChunkSize - 1;
-const size_t ArenaShift = PageShift;
-const size_t ArenaSize = PageSize;
-const size_t ArenaMask = ArenaSize - 1;
-
/*
* This is the maximum number of arenas we allow in the FreeCommitted state
* before we trigger a GC_SHRINK to release free arenas to the OS.
Index: mozilla/js/src/gc/Memory.cpp
===================================================================
--- mozilla.orig/js/src/gc/Memory.cpp
+++ mozilla/js/src/gc/Memory.cpp
@@ -15,6 +15,15 @@
namespace js {
namespace gc {
+/* Unused memory decommiting requires the arena size match the page size. */
+extern const size_t PageSize;
+extern const size_t ArenaSize;
+static bool
+DecommitEnabled()
+{
+ return PageSize == ArenaSize;
+}
+
#if defined(XP_WIN)
#include "jswin.h"
#include <psapi.h>
@@ -83,6 +92,9 @@ UnmapPages(void *p, size_t size)
bool
MarkPagesUnused(void *p, size_t size)
{
+ if (!DecommitEnabled())
+ return false;
+
JS_ASSERT(uintptr_t(p) % PageSize == 0);
LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE);
return p2 == p;
@@ -352,6 +364,9 @@ UnmapPages(void *p, size_t size)
bool
MarkPagesUnused(void *p, size_t size)
{
+ if (!DecommitEnabled())
+ return false;
+
JS_ASSERT(uintptr_t(p) % PageSize == 0);
int result = madvise(p, size, MADV_DONTNEED);
return result != -1;

View File

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

View File

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

View File

@ -4,41 +4,6 @@ Subject: use libnsssharedhelper if available at compile time
(can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1) (can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1)
References: References:
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -6444,16 +6444,31 @@ AC_SUBST(QCMS_LIBS)
dnl ========================================================
dnl HarfBuzz
dnl ========================================================
MOZ_HARFBUZZ_LIBS='$(DEPTH)/mozilla/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
AC_SUBST(MOZ_HARFBUZZ_LIBS)
dnl ========================================================
+dnl Check for nss-shared-helper
+dnl ========================================================
+
+ PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper,
+ [MOZ_ENABLE_NSSHELPER=1],
+ [MOZ_ENABLE_NSSHELPER=])
+
+if test "$MOZ_ENABLE_NSSHELPER"; then
+ AC_DEFINE(MOZ_ENABLE_NSSHELPER)
+fi
+AC_SUBST(MOZ_ENABLE_NSSHELPER)
+AC_SUBST(NSSHELPER_CFLAGS)
+AC_SUBST(NSSHELPER_LIBS)
+
+dnl ========================================================
dnl disable xul
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xul,
[ --disable-xul Disable XUL],
MOZ_XUL= )
if test "$MOZ_XUL"; then
AC_DEFINE(MOZ_XUL)
fi
diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in
--- a/mail/app/Makefile.in --- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in +++ b/mail/app/Makefile.in