1
0

- update to Thunderbird 38.0.1

* includes Lightning as default extension
- rebased patches
- removed obsolete patches:
  * mozilla-ppc.patch
  * mozilla-nullptr-gcc45.patch
  * mozilla-bug1024492.patch
- dropped openSUSE specific patches
  * thunderbird-shared-nss-db.patch
  * mozilla-shared-nss-db.patch
  the provided feature seems not to be used and its maintenance
  is not worth the ongoing efforts

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaThunderbird?expand=0&rev=286
This commit is contained in:
Wolfgang Rosenauer 2015-06-21 11:26:59 +00:00 committed by Git OBS Bridge
parent c6fe02a4b9
commit c16dd81a2f
17 changed files with 387 additions and 903 deletions

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Fri Jun 19 17:00:11 UTC 2015 - wr@rosenauer.org
- update to Thunderbird 38.0.1
* includes Lightning as default extension
- rebased patches
- removed obsolete patches:
* mozilla-ppc.patch
* mozilla-nullptr-gcc45.patch
* mozilla-bug1024492.patch
- dropped openSUSE specific patches
* thunderbird-shared-nss-db.patch
* mozilla-shared-nss-db.patch
the provided feature seems not to be used and its maintenance
is not worth the ongoing efforts
-------------------------------------------------------------------
Thu May 28 10:28:13 UTC 2015 - dmueller@suse.com

View File

@ -17,7 +17,7 @@
#
%define mainversion 31.7.0
%define mainversion 38.0.1
%define update_channel release
%if %suse_version > 1210
@ -42,9 +42,8 @@ BuildRequires: libcurl-devel
BuildRequires: libgnomeui-devel
BuildRequires: libidl-devel
BuildRequires: libnotify-devel
BuildRequires: mozilla-nspr-devel >= 4.10.6
BuildRequires: mozilla-nss-devel >= 3.16.5
BuildRequires: nss-shared-helper-devel
BuildRequires: mozilla-nspr-devel >= 4.10.8
BuildRequires: mozilla-nss-devel >= 3.18.1
BuildRequires: python
BuildRequires: startup-notification-devel
BuildRequires: unzip
@ -70,7 +69,7 @@ Recommends: gstreamer-0_10-plugins-ffmpeg
%endif
Version: %{mainversion}
Release: 0
%define releasedate 2015050800
%define releasedate 2015061900
Provides: thunderbird = %{version}
%if %{with_kde}
# this is needed to match this package with the kde4 helper package without the main package
@ -95,19 +94,14 @@ Source10: create-tar.sh
Source11: compare-locales.tar.xz
Source12: kde.js
# Gecko/Toolkit
Patch1: mozilla-shared-nss-db.patch
Patch2: mozilla-language.patch
Patch3: mozilla-nongnome-proxies.patch
Patch4: mozilla-kde.patch
Patch5: mozilla-arm-disable-edsp.patch
Patch6: mozilla-ppc.patch
Patch7: mozilla-nullptr-gcc45.patch
Patch8: mozilla-icu-strncat.patch
Patch9: mozilla-bug1024492.patch
Patch1: mozilla-language.patch
Patch2: mozilla-nongnome-proxies.patch
Patch3: mozilla-kde.patch
Patch4: mozilla-arm-disable-edsp.patch
Patch5: mozilla-develdirs.patch
Patch6: mozilla-icu-strncat.patch
# Thunderbird/mail
Patch20: tb-ssldap.patch
Patch21: tb-develdirs.patch
Patch22: thunderbird-shared-nss-db.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: coreutils fileutils textutils /bin/sh
Recommends: libcanberra0
@ -196,20 +190,15 @@ symbols meant for upload to Mozilla's crash collector database.
pushd mozilla
%patch1 -p1
%patch2 -p1
%patch3 -p1
%if %{with_kde}
%patch4 -p1
%patch3 -p1
%endif
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p3
popd
# comm-central patches
%patch20 -p1
%patch21 -p1
%patch22 -p1
%build
# no need to add build time to binaries
@ -250,6 +239,7 @@ mk_add_options MOZ_MILESTONE_RELEASE=1
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs}
mk_add_options MOZ_OBJDIR=$RPM_BUILD_DIR/obj
ac_add_options --enable-application=mail
ac_add_options --enable-calendar
ac_add_options --prefix=%{_prefix}
ac_add_options --libdir=%{progdir}
ac_add_options --includedir=%{_includedir}
@ -273,10 +263,6 @@ ac_add_options --enable-update-channel=%{update_channel}
%if 0%{?gstreamer} == 1
ac_add_options --enable-gstreamer=1.0
%endif
%if %suse_version > 1130
ac_add_options --disable-gnomevfs
ac_add_options --enable-gio
%endif
%if %suse_version < 1220
ac_add_options --disable-gstreamer
%endif
@ -298,7 +284,7 @@ cd $RPM_BUILD_DIR/obj
make -C mail/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
# copy tree into RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{progdir}
cp -rf $RPM_BUILD_DIR/obj/mozilla/dist/thunderbird/* \
cp -rf $RPM_BUILD_DIR/obj/dist/thunderbird/* \
$RPM_BUILD_ROOT%{progdir}
%if %{with_kde}
# install kde.js
@ -327,7 +313,7 @@ for locale in $(awk '{ print $1; }' ../thunderbird/mail/locales/shipped-locales)
popd
LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
make -C mail/locales langpack-$locale || continue
cp -rL mozilla/dist/xpi-stage/locale-$locale \
cp -rL dist/xpi-stage/locale-$locale \
$RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@thunderbird.mozilla.org
# remove prefs and profile defaults from langpack
rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@thunderbird.mozilla.org/defaults
@ -372,11 +358,11 @@ EOF
# DEVEL
#
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{progname}
chmod a+x mozilla/dist/sdk/bin/*.py
cp -rL mozilla/dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{progname}/
cp -rL mozilla/dist/sdk/lib/*.a $RPM_BUILD_ROOT%{_libdir}/%{progname}/
cp -rL mozilla/dist/idl/* $RPM_BUILD_ROOT%{_includedir}/%{progname}/
cp -rL mozilla/dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{progname}/
chmod a+x dist/sdk/bin/*.py
cp -rL dist/sdk/bin/* $RPM_BUILD_ROOT%{_libdir}/%{progname}/
cp -rL dist/sdk/lib/*.a $RPM_BUILD_ROOT%{_libdir}/%{progname}/
cp -rL dist/idl/* $RPM_BUILD_ROOT%{_includedir}/%{progname}/
cp -rL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{progname}/
#mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
#install -m 755 $RPM_BUILD_DIR/thunderbird/mozilla/build/unix/thunderbird-*.pc \
# $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
@ -421,9 +407,9 @@ SYMBOLS_NAME="thunderbird-%{mainversion}-%{release}.%{_arch}-%{suse_version}-sym
make buildsymbols \
SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \
SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME"
if [ -e mozilla/dist/*symbols.zip ]; then
if [ -e dist/*symbols.zip ]; then
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/
cp mozilla/dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/
cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/
fi
%endif
@ -454,7 +440,6 @@ exit 0
%{progdir}/chrome.manifest
%{progdir}/dependentlibs.list
%{progdir}/*.so
%{progdir}/mozilla-xremote-client
%{progdir}/omni.ja
%{progdir}/platform.ini
%{progdir}/plugin-container
@ -470,6 +455,7 @@ exit 0
%dir %{progdir}/chrome/
%{progdir}/chrome/icons/
%dir %{progdir}/dictionaries/
%{progdir}/distribution/
%{progdir}/defaults/
%dir %{progdir}/extensions/
%{progdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:34590bb451fd54ad6a32eac894bfdf5bb4160f2e4efc912ac90f83065b812251
size 28460
oid sha256:d2e2c1c42bb7cb5ace5335714f1ac3e757079d93c5da1f9651b9ac48b6159799
size 28424

View File

@ -1,9 +1,9 @@
#!/bin/bash
CHANNEL="esr31"
CHANNEL="esr38"
BRANCH="releases/comm-$CHANNEL"
RELEASE_TAG="THUNDERBIRD_31_7_0_RELEASE"
VERSION="31.7.0"
RELEASE_TAG="THUNDERBIRD_38_0_1_RELEASE"
VERSION="38.0.1"
echo "cloning $BRANCH..."
hg clone http://hg.mozilla.org/$BRANCH thunderbird

View File

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

3
l10n-38.0.1.tar.xz Normal file
View File

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

View File

@ -1,239 +0,0 @@
Fixes build with GCC 5.x
https://bug1024492.bugzilla.mozilla.org/attachment.cgi?id=8439834&action=diff&context=patch&format=raw&headers=1
diff -ur a/thunderbird/mozilla/js/src/builtin/TypedObject.cpp b/thunderbird/mozilla/js/src/builtin/TypedObject.cpp
--- a/thunderbird/mozilla/js/src/builtin/TypedObject.cpp 2015-05-09 08:50:17.567803110 +0200
+++ b/thunderbird/mozilla/js/src/builtin/TypedObject.cpp 2015-05-28 11:25:07.771027783 +0200
@@ -710,12 +710,12 @@
contents.append(")");
RootedAtom stringRepr(cx, contents.finishAtom());
if (!stringRepr)
- return nullptr;
+ return false;
// Extract ArrayType.prototype
RootedObject arrayTypePrototype(cx, GetPrototype(cx, arrayTypeGlobal));
if (!arrayTypePrototype)
- return nullptr;
+ return false;
// Create the instance of ArrayType
Rooted<UnsizedArrayTypeDescr*> obj(cx);
@@ -728,7 +728,7 @@
if (!JSObject::defineProperty(cx, obj, cx->names().length,
UndefinedHandleValue, nullptr, nullptr,
JSPROP_READONLY | JSPROP_PERMANENT))
- return nullptr;
+ return false;
args.rval().setObject(*obj);
return true;
@@ -762,7 +762,7 @@
if (!size.isValid()) {
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
JSMSG_TYPEDOBJECT_TOO_BIG);
- return nullptr;
+ return false;
}
// Construct a canonical string `new ArrayType(<elementType>).dimension(N)`:
@@ -775,7 +775,7 @@
contents.append(")");
RootedAtom stringRepr(cx, contents.finishAtom());
if (!stringRepr)
- return nullptr;
+ return false;
// Create the sized type object.
Rooted<SizedArrayTypeDescr*> obj(cx);
@@ -793,7 +793,7 @@
if (!JSObject::defineProperty(cx, obj, cx->names().length,
lengthVal, nullptr, nullptr,
JSPROP_READONLY | JSPROP_PERMANENT))
- return nullptr;
+ return false;
// Add `unsized` property, which is a link from the sized
// array to the unsized array.
@@ -801,7 +801,7 @@
if (!JSObject::defineProperty(cx, obj, cx->names().unsized,
unsizedTypeDescrValue, nullptr, nullptr,
JSPROP_READONLY | JSPROP_PERMANENT))
- return nullptr;
+ return false;
args.rval().setObject(*obj);
return true;
@@ -1253,7 +1253,7 @@
Rooted<TypedProto*> proto(cx);
proto = NewObjectWithProto<TypedProto>(cx, objProto, nullptr, TenuredObject);
if (!proto)
- return nullptr;
+ return false;
proto->initTypeDescrSlot(*descr);
descr->initReservedSlot(JS_DESCR_SLOT_TYPROTO, ObjectValue(*proto));
@@ -1358,14 +1358,14 @@
#define BINARYDATA_SCALAR_DEFINE(constant_, type_, name_) \
if (!DefineSimpleTypeDescr<ScalarTypeDescr>(cx, global, module, constant_, \
cx->names().name_)) \
- return nullptr;
+ return false;
JS_FOR_EACH_SCALAR_TYPE_REPR(BINARYDATA_SCALAR_DEFINE)
#undef BINARYDATA_SCALAR_DEFINE
#define BINARYDATA_REFERENCE_DEFINE(constant_, type_, name_) \
if (!DefineSimpleTypeDescr<ReferenceTypeDescr>(cx, global, module, constant_, \
cx->names().name_)) \
- return nullptr;
+ return false;
JS_FOR_EACH_REFERENCE_TYPE_REPR(BINARYDATA_REFERENCE_DEFINE)
#undef BINARYDATA_REFERENCE_DEFINE
@@ -1375,14 +1375,14 @@
arrayType = DefineMetaTypeDescr<ArrayMetaTypeDescr>(
cx, global, module, TypedObjectModuleObject::ArrayTypePrototype);
if (!arrayType)
- return nullptr;
+ return false;
RootedValue arrayTypeValue(cx, ObjectValue(*arrayType));
if (!JSObject::defineProperty(cx, module, cx->names().ArrayType,
arrayTypeValue,
nullptr, nullptr,
JSPROP_READONLY | JSPROP_PERMANENT))
- return nullptr;
+ return false;
// StructType.
@@ -1390,14 +1390,14 @@
structType = DefineMetaTypeDescr<StructMetaTypeDescr>(
cx, global, module, TypedObjectModuleObject::StructTypePrototype);
if (!structType)
- return nullptr;
+ return false;
RootedValue structTypeValue(cx, ObjectValue(*structType));
if (!JSObject::defineProperty(cx, module, cx->names().StructType,
structTypeValue,
nullptr, nullptr,
JSPROP_READONLY | JSPROP_PERMANENT))
- return nullptr;
+ return false;
// Everything is setup, install module on the global object:
RootedValue moduleValue(cx, ObjectValue(*module));
@@ -1407,7 +1407,7 @@
nullptr, nullptr,
0))
{
- return nullptr;
+ return false;
}
return module;
@@ -2466,7 +2466,7 @@
if (length < 0) {
JS_ReportErrorNumber(cx, js_GetErrorMessage,
nullptr, JSMSG_TYPEDOBJECT_BAD_ARGS);
- return nullptr;
+ return false;
}
Rooted<TypedObject*> obj(cx, createZeroed(cx, callee, length));
if (!obj)
diff -ur a/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp b/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp
--- a/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp 2015-05-09 08:50:17.666800504 +0200
+++ b/thunderbird/mozilla/js/src/frontend/BytecodeCompiler.cpp 2015-05-28 11:25:07.771027783 +0200
@@ -544,7 +544,7 @@
RootedScriptSource sourceObject(cx, CreateScriptSourceObject(cx, options));
if (!sourceObject)
- return nullptr;
+ return false;
ScriptSource* ss = sourceObject->source();
SourceCompressionTask sct(cx);
diff -ur a/thunderbird/mozilla/js/src/vm/ScopeObject.h b/thunderbird/mozilla/js/src/vm/ScopeObject.h
--- a/thunderbird/mozilla/js/src/vm/ScopeObject.h 2015-05-09 08:50:19.900741697 +0200
+++ b/thunderbird/mozilla/js/src/vm/ScopeObject.h 2015-05-28 11:25:07.771027783 +0200
@@ -63,21 +63,9 @@
bool onNamedLambda;
public:
- StaticScopeIter(ExclusiveContext* cx, JSObject* obj)
- : obj(cx, obj), onNamedLambda(false)
- {
- JS_STATIC_ASSERT(allowGC == CanGC);
- JS_ASSERT_IF(obj, obj->is<StaticBlockObject>() || obj->is<StaticWithObject>() ||
- obj->is<JSFunction>());
- }
+ StaticScopeIter(ExclusiveContext *cx, JSObject *obj);
- StaticScopeIter(JSObject* obj)
- : obj((ExclusiveContext*) nullptr, obj), onNamedLambda(false)
- {
- JS_STATIC_ASSERT(allowGC == NoGC);
- JS_ASSERT_IF(obj, obj->is<StaticBlockObject>() || obj->is<StaticWithObject>() ||
- obj->is<JSFunction>());
- }
+ explicit StaticScopeIter(JSObject *obj);
bool done() const;
void operator++(int);
diff -ur a/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h b/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h
--- a/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h 2015-05-09 08:50:19.898741750 +0200
+++ b/thunderbird/mozilla/js/src/vm/ScopeObject-inl.h 2015-05-28 11:25:07.771027783 +0200
@@ -13,6 +13,26 @@
namespace js {
+template <AllowGC allowGC>
+inline
+StaticScopeIter<allowGC>::StaticScopeIter(ExclusiveContext *cx, JSObject *obj)
+ : obj(cx, obj), onNamedLambda(false)
+{
+ JS_STATIC_ASSERT(allowGC == CanGC);
+ JS_ASSERT_IF(obj, obj->is<StaticBlockObject>() || obj->is<StaticWithObject>() ||
+ obj->is<JSFunction>());
+}
+
+template <AllowGC allowGC>
+inline
+StaticScopeIter<allowGC>::StaticScopeIter(JSObject *obj)
+ : obj((ExclusiveContext *) nullptr, obj), onNamedLambda(false)
+{
+ JS_STATIC_ASSERT(allowGC == NoGC);
+ JS_ASSERT_IF(obj, obj->is<StaticBlockObject>() || obj->is<StaticWithObject>() ||
+ obj->is<JSFunction>());
+}
+
inline void
ScopeObject::setAliasedVar(JSContext* cx, ScopeCoordinate sc, PropertyName* name, const Value& v)
{
diff -ur a/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp b/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp
--- a/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp 2015-05-09 08:50:15.061869076 +0200
+++ b/thunderbird/mozilla/js/xpconnect/wrappers/XrayWrapper.cpp 2015-05-28 11:25:07.775027837 +0200
@@ -351,7 +351,7 @@
{
JSAutoCompartment ac(cx, target);
if (!JS_GetClassPrototype(cx, key, protop))
- return nullptr;
+ return false;
}
return JS_WrapObject(cx, protop);
}
Only in b/thunderbird/mozilla/js/xpconnect/wrappers: XrayWrapper.cpp.orig
diff -ur a/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp b/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp
--- a/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp 2015-05-09 08:50:16.383834276 +0200
+++ b/thunderbird/mozilla/netwerk/ipc/NeckoParent.cpp 2015-05-28 11:25:07.775027837 +0200
@@ -359,7 +359,7 @@
RtspChannelParent* p = static_cast<RtspChannelParent*>(aActor);
return p->Init(aConnectArgs);
#else
- return nullptr;
+ return false;
#endif
}

View File

@ -1,16 +1,20 @@
diff --git a/config/baseconfig.mk b/config/baseconfig.mk
--- a/config/baseconfig.mk
+++ b/config/baseconfig.mk
@@ -1,10 +1,10 @@
@@ -1,14 +1,14 @@
# This file is normally included by autoconf.mk, but it is also used
# directly in python/mozbuild/mozbuild/base.py for gmake validation.
# We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
# whether a normal build is happening or whether the check is running.
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+includedir := $(includedir)/$(MOZ_APP_NAME)
+idldir = $(datadir)/idl/$(MOZ_APP_NAME)
installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
MOZILLA_SRCDIR = $(topsrcdir)/mozilla
MOZDEPTH = $(DEPTH)/mozilla
DIST = $(MOZDEPTH)/dist
# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
# manually use it before config.mk inclusion
ifndef TOP_DIST
TOP_DIST = dist
endif
ifneq (,$(filter /%,$(TOP_DIST)))
DIST = $(TOP_DIST)
else

View File

@ -1,12 +1,14 @@
# HG changeset patch
# Parent 214f99f3ce4f1f8ae9b3d18da44e5d66b3105663
Description: Add KDE integration to Firefox (toolkit parts)
Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
Author: Lubos Lunak <lunak@suse.com>
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
https://bugzilla.novell.com/show_bug.cgi?id=170055
diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
--- a/modules/libpref/src/Makefile.in
+++ b/modules/libpref/src/Makefile.in
diff --git a/modules/libpref/Makefile.in b/modules/libpref/Makefile.in
--- a/modules/libpref/Makefile.in
+++ b/modules/libpref/Makefile.in
@@ -21,13 +21,15 @@ endif
ifdef MOZ_SERVICES_HEALTHREPORT
ifneq (android,$(MOZ_WIDGET_TOOLKIT))
@ -23,9 +25,9 @@ diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
libs:: greprefs.js
$(INSTALL) $^ $(DIST)/bin/
diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp
--- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp
diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -27,16 +27,17 @@
#include "nsIZipReader.h"
#include "nsPrefBranch.h"
@ -44,7 +46,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
#include "prefread.h"
#include "prefapi_private_data.h"
@@ -1134,16 +1135,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
@@ -1165,16 +1166,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char
static nsresult pref_LoadPrefsInDirList(const char *listId)
{
@ -79,13 +81,13 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
return NS_OK;
bool hasMore;
@@ -1159,17 +1178,17 @@ static nsresult pref_LoadPrefsInDirList(
@@ -1190,17 +1209,17 @@ static nsresult pref_LoadPrefsInDirList(
nsAutoCString leaf;
path->GetNativeLeafName(leaf);
// Do we care if a file provided by this process fails to load?
if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
if (Substring(leaf, leaf.Length() - 4).EqualsLiteral(".xpi"))
ReadExtensionPrefs(path);
else
- pref_LoadPrefsInDir(path, nullptr, 0);
@ -98,7 +100,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
{
nsZipItemPtr<char> manifest(jarReader, name, true);
NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
@@ -1263,26 +1282,38 @@ static nsresult pref_InitInitialObjects(
@@ -1294,26 +1313,38 @@ static nsresult pref_InitInitialObjects(
/* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
static const char* specialFiles[] = {
#if defined(XP_MACOSX)
@ -140,8 +142,7 @@ diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferenc
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,
@@ -209,16 +209,17 @@ class Flags(OrderedDict):
'contentaccessible': Flag,
'os': StringFlag,
'osversion': VersionFlag,
@ -149,6 +150,7 @@ diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/c
'platform': Flag,
'xpcnativewrappers': Flag,
'tablet': Flag,
'process': StringFlag,
+ 'desktop': StringFlag,
}
RE = re.compile(r'([!<>=]+)')
@ -161,8 +163,7 @@ diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/c
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 = [
@@ -31,16 +31,17 @@ class ManifestEntry(object):
'application',
'platformversion',
'os',
@ -170,6 +171,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpac
'abi',
'xpcnativewrappers',
'tablet',
'process',
+ 'desktop',
]
@ -179,24 +181,30 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpac
'''
self.base = base
self.flags = Flags(*flags)
diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
--- a/toolkit/components/downloads/Makefile.in
+++ b/toolkit/components/downloads/Makefile.in
@@ -1,9 +1,9 @@
#
# 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
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
--- a/toolkit/components/downloads/moz.build
+++ b/toolkit/components/downloads/moz.build
@@ -52,14 +52,15 @@ if not CONFIG['MOZ_SUITE']:
]
include $(topsrcdir)/config/rules.mk
FAIL_ON_WARNINGS = True
CXXFLAGS += $(TK_CFLAGS)
-
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../protobuf',
- '/ipc/chromium/src'
+ '/ipc/chromium/src',
+ '/toolkit/xre'
]
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
CXXFLAGS += CONFIG['TK_CFLAGS']
diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -43,16 +43,20 @@
@@ -46,16 +46,20 @@
#ifdef XP_WIN
#include <shlobj.h>
#include "nsWindowsHelpers.h"
@ -215,9 +223,9 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
using namespace mozilla::widget::android;
#endif
@@ -2722,16 +2726,25 @@ nsDownload::SetState(DownloadState aStat
@@ -2716,16 +2720,25 @@ nsDownload::SetState(DownloadState aStat
nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
// Master pref to control this function.
@ -243,17 +251,13 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
int64_t goat = PR_Now() - mStartTime;
showTaskbarAlert = goat > alertIntervalUSec;
@@ -2759,19 +2772,20 @@ nsDownload::SetState(DownloadState aStat
// because if it is, they'll click open the download manager and
// the items they downloaded will have been removed.
alerts->ShowAlertNotification(
@@ -2756,16 +2769,17 @@ nsDownload::SetState(DownloadState aStat
NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
message, !removeWhenDone,
mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"),
EmptyString(), nullptr);
- }
+ }
EmptyString(), EmptyString(), nullptr, mPrivate);
}
}
}
+ }
@ -268,7 +272,7 @@ diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/compon
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -58,29 +58,33 @@ toolkit.jar:
@@ -57,29 +57,33 @@ toolkit.jar:
content/global/viewZoomOverlay.js (viewZoomOverlay.js)
*+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml)
content/global/bindings/browser.xml (widgets/browser.xml)
@ -290,7 +294,7 @@ diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
content/global/bindings/menulist.xml (widgets/menulist.xml)
content/global/bindings/notification.xml (widgets/notification.xml)
content/global/bindings/numberbox.xml (widgets/numberbox.xml)
* content/global/bindings/popup.xml (widgets/popup.xml)
content/global/bindings/popup.xml (widgets/popup.xml)
*+ content/global/bindings/preferences.xml (widgets/preferences.xml)
+*+ content/global/bindings/preferences-kde.xml (widgets/preferences-kde.xml)
+% override chrome://global/content/bindings/preferences.xml chrome://global/content/bindings/preferences-kde.xml desktop=kde
@ -306,7 +310,7 @@ diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/di
new file mode 100644
--- /dev/null
+++ b/toolkit/content/widgets/dialog-kde.xml
@@ -0,0 +1,449 @@
@@ -0,0 +1,455 @@
+<?xml version="1.0"?>
+<!-- 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
@ -342,7 +346,7 @@ new file mode 100644
+ >
+ <xul:button dlgtype="help" class="dialog-button" hidden="true"/>
+ <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
+ <xul:spacer anonid="spacer" flex="1" hidden="true"/>
+ <xul:spacer anonid="spacer" flex="1"/>
+ <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
+ <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
+ <xul:button dlgtype="cancel" class="dialog-button"/>
@ -675,9 +679,15 @@ new file mode 100644
+ if (!button.disabled) {
+ var noCancel = this._fireButtonEvent(aDlgType);
+ if (noCancel) {
+ if (aDlgType == "accept" || aDlgType == "cancel")
+ if (aDlgType == "accept" || aDlgType == "cancel") {
+ var closingEvent = new CustomEvent("dialogclosing", {
+ bubbles: true,
+ detail: { button: aDlgType },
+ });
+ this.dispatchEvent(closingEvent);
+ window.close();
+ }
+ }
+ return noCancel;
+ }
+ return true;
@ -760,7 +770,7 @@ diff --git a/toolkit/content/widgets/preferences-kde.xml b/toolkit/content/widge
new file mode 100644
--- /dev/null
+++ b/toolkit/content/widgets/preferences-kde.xml
@@ -0,0 +1,1333 @@
@@ -0,0 +1,1350 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE bindings [
@ -793,6 +803,25 @@ new file mode 100644
+
+ <binding id="preferences">
+ <implementation implements="nsIObserver">
+ <method name="_constructAfterChildren">
+ <body>
+ <![CDATA[
+ // This method will be called after each one of the child
+ // <preference> elements is constructed. Its purpose is to propagate
+ // the values to the associated form elements
+
+ var elements = this.getElementsByTagName("preference");
+ for (let element of elements) {
+ if (!element._constructed) {
+ return;
+ }
+ }
+ for (let element of elements) {
+ element.updateElements();
+ }
+ ]]>
+ </body>
+ </method>
+ <method name="observe">
+ <parameter name="aSubject"/>
+ <parameter name="aTopic"/>
@ -864,6 +893,8 @@ new file mode 100644
+ <implementation>
+ <constructor>
+ <![CDATA[
+ this._constructed = true;
+
+ // if the element has been inserted without the name attribute set,
+ // we have nothing to do here
+ if (!this.name)
@ -874,8 +905,12 @@ new file mode 100644
+ // In non-instant apply mode, we must try and use the last saved state
+ // from any previous opens of a child dialog instead of the value from
+ // preferences, to pick up any edits a user may have made.
+
+ var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
+ .getService(Components.interfaces.nsIScriptSecurityManager);
+ if (this.preferences.type == "child" &&
+ !this.instantApply && window.opener) {
+ !this.instantApply && window.opener &&
+ secMan.isSystemPrincipal(window.opener.document.nodePrincipal)) {
+ var pdoc = window.opener.document;
+
+ // Try to find a preference element for the same preference.
@ -889,18 +924,20 @@ new file mode 100644
+ preference = parentPrefs[l];
+ }
+ }
+ this._setValue(preference ? preference.value
+ : this.valueFromPreferences, false);
+
+ // Don't use the value setter here, we don't want updateElements to be prematurely fired.
+ this._value = preference ? preference.value : this.valueFromPreferences;
+ }
+ else
+ this._setValue(this.valueFromPreferences, false);
+ this._value = this.valueFromPreferences;
+ this.preferences._constructAfterChildren();
+ ]]>
+ </constructor>
+ <destructor>
+ this.preferences.rootBranchInternal
+ .removeObserver(this.name, this.preferences);
+ </destructor>
+
+ <field name="_constructed">false</field>
+ <property name="instantApply">
+ <getter>
+ return this.getAttribute("instantApply") == "true" || this.preferences.instantApply;
@ -932,24 +969,19 @@ new file mode 100644
+ <field name="_value">null</field>
+ <method name="_setValue">
+ <parameter name="aValue"/>
+ <parameter name="aUpdate"/>
+ <body>
+ <![CDATA[
+ if (aUpdate && this.value !== aValue) {
+ if (this.value !== aValue) {
+ this._value = aValue;
+ if (this.instantApply)
+ this.valueFromPreferences = aValue;
+ this.preferences.fireChangedEvent(this);
+ }
+ else if (!aUpdate) {
+ this._value = aValue;
+ this.updateElements();
+ }
+ return aValue;
+ ]]>
+ </body>
+ </method>
+ <property name="value" onget="return this._value" onset="return this._setValue(val, true);"/>
+ <property name="value" onget="return this._value" onset="return this._setValue(val);"/>
+
+ <property name="locked">
+ <getter>
@ -1336,7 +1368,7 @@ new file mode 100644
+ </xul:deck>
+ </xul:hbox>
+ <xul:hbox anonid="dlg-buttons" class="prefWindow-dlgbuttons" pack="end">
+#ifdef XP_UNIX_GNOME
+#ifndef XP_UNIX
+ <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
+ <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/>
+ <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
@ -1344,14 +1376,6 @@ new file mode 100644
+ <xul:spacer anonid="spacer" flex="1"/>
+ <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
+ <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
+#elif XP_UNIX
+ <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
+ <xul:spacer anonid="spacer" flex="1"/>
+ <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
+ <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
+ <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
+ <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/>
+ <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
+#else
+ <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
+ <xul:spacer anonid="spacer" flex="1"/>
@ -1806,11 +1830,14 @@ new file mode 100644
+ return false;
+ }
+
+ if (this.type == "child" && window.opener) {
+ var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
+ .getService(Components.interfaces.nsIScriptSecurityManager);
+ if (this.type == "child" && window.opener &&
+ secMan.isSystemPrincipal(window.opener.document.nodePrincipal)) {
+ var psvc = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var instantApply = psvc.getBoolPref("browser.preferences.instantApply");
+ if (instantApply) {
+ var pdocEl = window.opener.document.documentElement;
+ if (pdocEl.instantApply) {
+ var panes = this.preferencePanes;
+ for (var i = 0; i < panes.length; ++i)
+ panes[i].writePreferences(true);
@ -2109,13 +2136,13 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
+#include "nsVoidArray.h"
+#include "nsKDEUtils.h"
class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
class nsUnixSystemProxySettings final : public nsISystemProxySettings {
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISYSTEMPROXYSETTINGS
nsUnixSystemProxySettings()
: mSchemeProxySettings(5)
: mSchemeProxySettings(4)
@@ -38,16 +40,17 @@ private:
nsCOMPtr<nsIGSettingsService> mGSettings;
nsCOMPtr<nsIGSettingsCollection> mProxySettings;
@ -2192,7 +2219,7 @@ diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/sy
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -43,17 +43,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
@@ -45,17 +45,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
GENERATED_SOURCES += [
'moc_nsNativeAppSupportQt.cpp',
]
@ -2211,7 +2238,7 @@ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
'nsNativeAppSupportDefault.cpp',
]
if CONFIG['MOZ_X11']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
new file mode 100644
--- /dev/null
@ -2609,26 +2636,12 @@ new file mode 100644
+ };
+
+#endif // nsKDEUtils
diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -6,9 +6,10 @@
ifdef MOZ_ENABLE_DBUS
OS_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
endif
include $(topsrcdir)/config/rules.mk
ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
endif
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -80,17 +80,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
@@ -68,17 +68,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
else:
# These files can't be built in unified mode because they force NSPR logging.
# These files can't be built in unified mode because they redefine LOG.
SOURCES += [
osdir + '/nsOSHelperAppService.cpp',
]
@ -2646,6 +2659,24 @@ diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
'android/nsExternalSharingAppService.cpp',
'android/nsExternalURLHandlerService.cpp',
'android/nsMIMEInfoAndroid.cpp',
@@ -123,16 +125,17 @@ include('/ipc/chromium/chromium-config.m
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/dom/base',
'/dom/ipc',
'/netwerk/base',
'/netwerk/protocol/http',
+ '/toolkit/xre',
]
if CONFIG['MOZ_ENABLE_DBUS']:
CXXFLAGS += CONFIG['TK_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'gtk3'):
CXXFLAGS += CONFIG['TK_CFLAGS']
diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp
new file mode 100644
--- /dev/null
@ -2709,11 +2740,14 @@ diff --git a/uriloader/exthandler/unix/nsCommonRegistry.h b/uriloader/exthandler
new file mode 100644
--- /dev/null
+++ b/uriloader/exthandler/unix/nsCommonRegistry.h
@@ -0,0 +1,23 @@
@@ -0,0 +1,28 @@
+/* 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
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsCommonRegistry_h__
+#define nsCommonRegistry_h__
+
+#include "nsIURI.h"
+#include "nsCOMPtr.h"
+
@ -2733,6 +2767,8 @@ new file mode 100644
+
+ static already_AddRefed<nsMIMEInfoBase> GetFromType(const nsACString& aMIMEType);
+};
+
+#endif
diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp
new file mode 100644
--- /dev/null
@ -2830,11 +2866,14 @@ diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/un
new file mode 100644
--- /dev/null
+++ b/uriloader/exthandler/unix/nsKDERegistry.h
@@ -0,0 +1,29 @@
@@ -0,0 +1,34 @@
+/* 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
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef nsKDERegistry_h__
+#define nsKDERegistry_h__
+
+#include "nsIURI.h"
+#include "nsCOMPtr.h"
+#include "nsTArray.h"
@ -2860,11 +2899,13 @@ new file mode 100644
+ static already_AddRefed<nsMIMEInfoBase> GetFromHelper(const nsTArray<nsCString>& command);
+
+};
+
+#endif //nsKDERegistry_h__
diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
+++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
@@ -10,30 +10,33 @@
#include <QString>
@@ -7,32 +7,35 @@
#ifdef MOZ_WIDGET_QT
#if (MOZ_ENABLE_CONTENTACTION)
#include <contentaction/contentaction.h>
#include "nsContentHandlerApp.h"
@ -2877,11 +2918,13 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
#include "nsIGIOService.h"
#include "nsNetCID.h"
#include "nsIIOService.h"
#include "nsIGnomeVFSService.h"
#include "nsAutoPtr.h"
#ifdef MOZ_ENABLE_DBUS
#include "nsDBusHandlerApp.h"
#endif
#ifdef MOZ_WIDGET_QT
#include "nsMIMEInfoQt.h"
#endif
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
+#include "nsKDEUtils.h"
+#endif
@ -2894,12 +2937,12 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
#ifdef MOZ_WIDGET_QT
if (NS_FAILED(rv)) {
nsAutoCString spec;
aURI->GetAsciiSpec(spec);
if (QDesktopServices::openUrl(QUrl(spec.get()))) {
rv = NS_OK;
rv = nsMIMEInfoQt::LoadUriInternal(aURI);
}
@@ -50,24 +53,24 @@ nsMIMEInfoUnix::GetHasDefaultHandler(boo
#endif
return rv;
@@ -45,24 +48,24 @@ nsMIMEInfoUnix::GetHasDefaultHandler(boo
// either /etc/mailcap or ${HOME}/.mailcap, in which case we don't want to
// give the GNOME answer.
if (mDefaultApplication)
@ -2927,7 +2970,7 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
if (*_retval)
return NS_OK;
@@ -102,16 +105,33 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
@@ -97,16 +100,33 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get()));
if (action.isValid()) {
action.trigger();
@ -2954,32 +2997,13 @@ diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler
+ }
+
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsAutoCString uriSpec;
if (giovfs) {
if (!giovfs) {
return NS_ERROR_FAILURE;
}
// nsGIOMimeApp->Launch wants a URI string instead of local file
nsresult rv;
nsCOMPtr<nsIIOService> ioservice = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIURI> uri;
@@ -129,17 +149,17 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
/* Fallback to GnomeVFS */
nsCOMPtr<nsIGnomeVFSMimeApp> app;
if (NS_SUCCEEDED(gnomevfs->GetAppForMimeType(mSchemeOrType, getter_AddRefs(app))) && app)
return app->Launch(nativePath);
}
// If we haven't got an app we try to get a valid one by searching for the
// extension mapped type
- nsRefPtr<nsMIMEInfoBase> mimeInfo = nsGNOMERegistry::GetFromExtension(nativePath);
+ nsRefPtr<nsMIMEInfoBase> mimeInfo = nsCommonRegistry::GetFromExtension(nativePath);
if (mimeInfo) {
nsAutoCString type;
mimeInfo->GetType(type);
if (giovfs) {
nsCOMPtr<nsIGIOMimeApp> app;
if (NS_SUCCEEDED(giovfs->GetAppForMimeType(type, getter_AddRefs(app))) && app)
return app->Launch(uriSpec);
} else if (gnomevfs) {
diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
@ -3010,7 +3034,7 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
#endif
#ifdef MOZ_WIDGET_GTK
// Check the GConf registry for a protocol handler
// Check the GNOME registry for a protocol handler
- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
+ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme);
#endif
@ -3050,52 +3074,56 @@ diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exth
rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
majorType,
@@ -1372,17 +1372,17 @@ nsOSHelperAppService::GetFromType(const
@@ -1373,17 +1373,17 @@ nsOSHelperAppService::GetFromType(const
nsAutoString extensions, mime_types_description;
LookUpExtensionsAndDescription(majorType,
minorType,
extensions,
mime_types_description);
#ifdef MOZ_WIDGET_GTK
nsRefPtr<nsMIMEInfoBase> gnomeInfo;
if (handler.IsEmpty()) {
// No useful data yet. Check the GNOME registry. Unfortunately, newer
// 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
// to look in our mime.types files for the extensions.
LOG(("Looking in GNOME registry\n"));
- gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType);
+ gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType);
if (gnomeInfo && gnomeInfo->HasExtensions()) {
LOG(("Got MIMEInfo from GNOME registry, and it has extensions set\n"));
- nsRefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType);
+ nsRefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType);
if (gnomeInfo) {
LOG(("Got MIMEInfo from GNOME registry without extensions; setting them "
"to %s\n", NS_LossyConvertUTF16toASCII(extensions).get()));
NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?");
gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions));
return gnomeInfo.forget();
}
}
#endif
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
--- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build
@@ -79,16 +79,17 @@ else:
include('/ipc/chromium/chromium-config.mozbuild')
// Now look up our extensions
diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
--- a/widget/gtk/Makefile.in
+++ b/widget/gtk/Makefile.in
@@ -3,11 +3,13 @@
# 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/.
FINAL_LIBRARY = 'xul'
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += [
'/layout/generic',
'/layout/xul',
'/other-licenses/atk-1.0',
+ '/toolkit/xre',
'/widget',
]
CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+
CFLAGS += $(TK_CFLAGS)
CXXFLAGS += $(TK_CFLAGS)
if CONFIG['MOZ_X11']:
LOCAL_INCLUDES += [
'/widget/x11',
]
diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
--- a/widget/gtk/nsFilePicker.cpp
+++ b/widget/gtk/nsFilePicker.cpp
@@ -1,32 +1,34 @@
/* -*- 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
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,32 +4,34 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/Types.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
@ -3124,7 +3152,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
nsIFile *nsFilePicker::mPrevDisplayDirectory = nullptr;
void
@@ -226,17 +228,19 @@ nsFilePicker::AppendFilters(int32_t aFil
@@ -238,17 +240,19 @@ nsFilePicker::AppendFilters(int32_t aFil
return nsBaseFilePicker::AppendFilters(aFilterMask);
}
@ -3145,7 +3173,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
mFilters.AppendElement(filter);
mFilterNames.AppendElement(name);
@@ -351,16 +355,32 @@ nsFilePicker::Show(int16_t *aReturn)
@@ -363,16 +367,32 @@ nsFilePicker::Show(int16_t *aReturn)
NS_IMETHODIMP
nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
@ -3178,7 +3206,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
@@ -539,8 +559,235 @@ nsFilePicker::Done(GtkWidget* file_choos
@@ -551,8 +571,235 @@ nsFilePicker::Done(GtkWidget* file_choos
if (mCallback) {
mCallback->Done(result);
mCallback = nullptr;
@ -3417,7 +3445,7 @@ diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h
--- a/widget/gtk/nsFilePicker.h
+++ b/widget/gtk/nsFilePicker.h
@@ -66,11 +66,17 @@ protected:
@@ -68,11 +68,17 @@ protected:
nsString mDefault;
nsString mDefaultExtension;
@ -3435,44 +3463,30 @@ diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h
};
#endif
diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
--- a/xpcom/components/Makefile.in
+++ b/xpcom/components/Makefile.in
@@ -2,9 +2,10 @@
# 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
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(topsrcdir)/config/rules.mk
ifdef MOZ_WIDGET_GTK
CXXFLAGS += $(TK_CFLAGS)
+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
endif
diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
--- a/xpcom/components/ManifestParser.cpp
+++ b/xpcom/components/ManifestParser.cpp
@@ -31,16 +31,17 @@
#include "nsTextFormatter.h"
#include "nsVersionComparator.h"
#include "nsXPCOMCIDInternal.h"
@@ -34,16 +34,17 @@
#include "nsIConsoleService.h"
#include "nsIScriptError.h"
#include "nsIXULAppInfo.h"
#include "nsIXULRuntime.h"
#ifdef MOZ_B2G_LOADER
#include "mozilla/XPTInterfaceInfoManager.h"
#endif
+#include "nsKDEUtils.h"
using namespace mozilla;
struct ManifestDirective
{
const char* directive;
int argc;
@@ -398,16 +399,17 @@ ParseManifest(NSLocationType type, FileL
NS_NAMED_LITERAL_STRING(kPlatform, "platform");
NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
#ifdef MOZ_B2G_LOADER
#define XPTONLY_MANIFEST &nsComponentManagerImpl::XPTOnlyManifestManifest
#define XPTONLY_XPT &nsComponentManagerImpl::XPTOnlyManifestXPT
#else
#define XPTONLY_MANIFEST nullptr
#define XPTONLY_XPT nullptr
#endif
@@ -489,16 +490,17 @@ ParseManifest(NSLocationType aType, File
NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
NS_NAMED_LITERAL_STRING(kApplication, "application");
NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
@ -3480,15 +3494,15 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
NS_NAMED_LITERAL_STRING(kOsVersion, "osversion");
NS_NAMED_LITERAL_STRING(kABI, "abi");
+ NS_NAMED_LITERAL_STRING(kDesktop, "desktop");
NS_NAMED_LITERAL_STRING(kProcess, "process");
#if defined(MOZ_WIDGET_ANDROID)
NS_NAMED_LITERAL_STRING(kTablet, "tablet");
#endif
// Obsolete
NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
NS_NAMED_LITERAL_STRING(kMain, "main");
NS_NAMED_LITERAL_STRING(kContent, "content");
nsAutoString appID;
@@ -445,42 +447,47 @@ ParseManifest(NSLocationType type, FileL
@@ -549,44 +551,49 @@ ParseManifest(NSLocationType aType, File
CopyUTF8toUTF16(s, abi);
abi.Insert(char16_t('_'), 0);
abi.Insert(osTarget, 0);
@ -3524,30 +3538,33 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
#elif defined(MOZ_WIDGET_ANDROID)
bool isTablet = false;
if (mozilla::AndroidBridge::Bridge()) {
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
isTablet = mozilla::widget::android::GeckoAppShell::IsTablet();
mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION",
"RELEASE",
osVersion);
isTablet = mozilla::widget::GeckoAppShell::IsTablet();
}
+ desktop = NS_LITERAL_STRING("android");
#endif
// Because contracts must be registered after CIDs, we save and process them
// at the end.
nsTArray<CachedDirective> contracts;
if (XRE_GetProcessType() == GeckoProcessType_Content) {
process = kContent;
} else {
process = kMain;
}
char *token;
char *newline = buf;
@@ -562,24 +569,26 @@ ParseManifest(NSLocationType type, FileL
@@ -681,25 +688,27 @@ ParseManifest(NSLocationType aType, File
TriState stOsVersion = eUnspecified;
TriState stOs = eUnspecified;
TriState stABI = eUnspecified;
TriState stProcess = eUnspecified;
#if defined(MOZ_WIDGET_ANDROID)
TriState stTablet = eUnspecified;
#endif
bool platform = false;
bool contentAccessible = false;
int flags = 0;
+ TriState stDesktop = eUnspecified;
while (nullptr != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) {
while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) &&
ok) {
ToLowerCase(token);
NS_ConvertASCIItoUTF16 wtoken(token);
@ -3555,15 +3572,15 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
CheckStringFlag(kOs, wtoken, osTarget, stOs) ||
CheckStringFlag(kABI, wtoken, abi, stABI) ||
+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) ||
CheckStringFlag(kProcess, wtoken, process, stProcess) ||
CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) ||
CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) ||
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion))
CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) {
continue;
}
#if defined(MOZ_WIDGET_ANDROID)
bool tablet = false;
if (CheckFlag(kTablet, wtoken, tablet)) {
@@ -608,16 +617,17 @@ ParseManifest(NSLocationType type, FileL
@@ -749,16 +758,17 @@ ParseManifest(NSLocationType aType, File
}
if (!ok ||
@ -3576,15 +3593,33 @@ diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestPars
#ifdef MOZ_WIDGET_ANDROID
stTablet == eBad ||
#endif
stABI == eBad)
stABI == eBad ||
stProcess == eBad) {
continue;
}
if (directive->regfunc) {
if (GeckoProcessType_Default != XRE_GetProcessType())
diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build
--- a/xpcom/components/moz.build
+++ b/xpcom/components/moz.build
@@ -48,12 +48,13 @@ FINAL_LIBRARY = 'xul'
GENERATED_INCLUDES += ['..']
LOCAL_INCLUDES += [
'../base',
'../build',
'../ds',
'../reflect/xptinfo',
'/chrome',
'/modules/libjar',
+ '/toolkit/xre'
]
if CONFIG['MOZ_WIDGET_GTK']:
CXXFLAGS += CONFIG['TK_CFLAGS']
diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -43,16 +43,17 @@
@@ -44,16 +44,17 @@
#include "prproces.h"
#include "nsIDirectoryEnumerator.h"
#include "nsISimpleEnumerator.h"
#include "private/pprio.h"
@ -3592,7 +3627,6 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
#ifdef MOZ_WIDGET_GTK
#include "nsIGIOService.h"
#include "nsIGnomeVFSService.h"
+#include "nsKDEUtils.h"
#endif
@ -3602,7 +3636,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
#include "prmem.h"
#include "plbase64.h"
@@ -1816,46 +1817,52 @@ nsLocalFile::SetPersistentDescriptor(con
@@ -1964,42 +1965,52 @@ nsLocalFile::SetPersistentDescriptor(con
return InitWithNativePath(aPersistentDescriptor);
#endif
}
@ -3612,37 +3646,33 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
{
#ifdef MOZ_WIDGET_GTK
- nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
- nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
- if (!giovfs && !gnomevfs)
- if (!giovfs) {
- return NS_ERROR_FAILURE;
-
- }
+ nsAutoCString url;
bool isDirectory;
if (NS_FAILED(IsDirectory(&isDirectory)))
if (NS_FAILED(IsDirectory(&isDirectory))) {
return NS_ERROR_FAILURE;
}
+ nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
if (isDirectory) {
- if (giovfs)
- return giovfs->ShowURIForInput(mPath);
- else
- /* Fallback to GnomeVFS */
- return gnomevfs->ShowURIForInput(mPath);
+ url = mPath;
} else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
} else if (NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
return NS_OK;
} else {
nsCOMPtr<nsIFile> parentDir;
nsAutoCString dirPath;
if (NS_FAILED(GetParent(getter_AddRefs(parentDir))))
if (NS_FAILED(GetParent(getter_AddRefs(parentDir)))) {
return NS_ERROR_FAILURE;
if (NS_FAILED(parentDir->GetNativePath(dirPath)))
}
if (NS_FAILED(parentDir->GetNativePath(dirPath))) {
return NS_ERROR_FAILURE;
}
- if (giovfs)
- return giovfs->ShowURIForInput(dirPath);
- else
- return gnomevfs->ShowURIForInput(dirPath);
+ url = dirPath;
}
+
@ -3653,14 +3683,10 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
+
+ nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
+ if (!giovfs && !gnomevfs)
+ if (!giovfs)
+ return NS_ERROR_FAILURE;
+
+ if (giovfs)
+ return giovfs->ShowURIForInput(url);
+ else
+ return gnomevfs->ShowURIForInput(url);
#elif defined(MOZ_WIDGET_COCOA)
CFURLRef url;
if (NS_SUCCEEDED(GetCFURL(&url))) {
@ -3669,7 +3695,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
return rv;
}
return NS_ERROR_FAILURE;
@@ -1863,16 +1870,23 @@ nsLocalFile::Reveal()
@@ -2007,16 +2018,22 @@ nsLocalFile::Reveal()
return NS_ERROR_FAILURE;
#endif
}
@ -3684,12 +3710,11 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
+ command.AppendElement( mPath );
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
+ }
+
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
if (giovfs) {
return giovfs->ShowURIForInput(mPath);
} else if (gnomevfs) {
/* GnomeVFS fallback */
return gnomevfs->ShowURIForInput(mPath);
if (!giovfs) {
return NS_ERROR_FAILURE;
}
return giovfs->ShowURIForInput(mPath);
#elif defined(MOZ_ENABLE_CONTENTACTION)
QUrl uri = QUrl::fromLocalFile(QString::fromUtf8(mPath.get()));

View File

@ -1,11 +1,11 @@
# HG changeset patch
# User Wolfgang Rosenauer <wr@rosenauer.org>
# Parent 13eb644c1216aed92b29dbc63fc26ce66f98c66c
# Parent 5a29924228527f8882c83cf62d470963ea1ce62e
Bug 583793 - Firefox interface language set to LANG, ignores LANGUAGE
diff --git a/intl/locale/src/nsLocaleService.cpp b/intl/locale/src/nsLocaleService.cpp
--- a/intl/locale/src/nsLocaleService.cpp
+++ b/intl/locale/src/nsLocaleService.cpp
diff --git a/intl/locale/nsLocaleService.cpp b/intl/locale/nsLocaleService.cpp
--- a/intl/locale/nsLocaleService.cpp
+++ b/intl/locale/nsLocaleService.cpp
@@ -122,16 +122,17 @@ nsLocaleService::nsLocaleService(void)
nsRefPtr<nsLocale> resultLocale(new nsLocale());
NS_ENSURE_TRUE_VOID(resultLocale);

View File

@ -1,55 +0,0 @@
# HG changeset patch
# Parent c7f2d830f66744f9da21b93f80017d28b5fba9a0
# User Wolfgang Rosenauer <wr@rosenauer.org>
Bug 1044581 - compilation error: bit_reader.cc:12:3: error: 'nullptr' was not declared in this scope
diff --git a/content/media/fmp4/demuxer/bit_reader.cc b/content/media/fmp4/demuxer/bit_reader.cc
--- a/content/media/fmp4/demuxer/bit_reader.cc
+++ b/content/media/fmp4/demuxer/bit_reader.cc
@@ -1,12 +1,13 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "nullptr.h"
#include "mp4_demuxer/bit_reader.h"
#include <algorithm>
namespace mp4_demuxer {
BitReader::BitReader(const uint8_t* data, off_t size)
: data_(data), bytes_left_(size), num_remaining_bits_in_curr_byte_(0) {
DCHECK(data_ != nullptr && bytes_left_ > 0);
diff --git a/content/media/fmp4/moz.build b/content/media/fmp4/moz.build
--- a/content/media/fmp4/moz.build
+++ b/content/media/fmp4/moz.build
@@ -2,16 +2,17 @@
# vim: set filetype=python:
# 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
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS += [
'MP4Decoder.h',
'MP4Reader.h',
+ 'nullptr.h',
'PlatformDecoderModule.h',
]
EXPORTS.mp4_demuxer += [
'demuxer/aac.h',
'demuxer/audio_decoder_config.h',
'demuxer/avc.h',
'demuxer/basictypes.h',
diff --git a/content/media/fmp4/nullptr.h b/content/media/fmp4/nullptr.h
new file mode 100644
--- /dev/null
+++ b/content/media/fmp4/nullptr.h
@@ -0,0 +1,7 @@
+
+// GCC does not understand nullptr until 4.6
+#if defined(__GNUC__) && !defined(__clang__)
+#if __GNUC__ * 100 + __GNUC_MINOR__ < 406
+#define nullptr __null
+#endif
+#endif

View File

@ -1,90 +0,0 @@
# HG changeset patch
# Parent 21d0e194954e451f0f1935d0ed68ee9eae432ddf
# User Wolfgang Rosenauer <wr@rosenauer.org>
Bug 746112 - RegExp hang on ppc64 in execute.
diff --git a/js/src/yarr/YarrInterpreter.h b/js/src/yarr/YarrInterpreter.h
--- a/js/src/yarr/YarrInterpreter.h
+++ b/js/src/yarr/YarrInterpreter.h
@@ -162,17 +162,17 @@ struct ByteTerm {
, m_invert(invert)
{
atom.characterClass = characterClass;
atom.quantityType = QuantifierFixedCount;
atom.quantityCount = 1;
inputPosition = inputPos;
}
- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos)
+ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline))
: type(type)
, m_capture(capture)
, m_invert(false)
{
atom.subpatternId = subpatternId;
atom.parenthesesDisjunction = parenthesesInfo;
atom.quantityType = QuantifierFixedCount;
atom.quantityCount = 1;
@@ -183,17 +183,17 @@ struct ByteTerm {
: type(type)
, m_capture(false)
, m_invert(invert)
{
atom.quantityType = QuantifierFixedCount;
atom.quantityCount = 1;
}
- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos)
+ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline))
: type(type)
, m_capture(capture)
, m_invert(invert)
{
atom.subpatternId = subpatternId;
atom.quantityType = QuantifierFixedCount;
atom.quantityCount = 1;
inputPosition = inputPos;
diff --git a/js/src/yarr/YarrPattern.h b/js/src/yarr/YarrPattern.h
--- a/js/src/yarr/YarrPattern.h
+++ b/js/src/yarr/YarrPattern.h
@@ -180,17 +180,17 @@ struct PatternTerm {
, m_capture(false)
, m_invert(invert)
{
characterClass = charClass;
quantityType = QuantifierFixedCount;
quantityCount = 1;
}
- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false)
+ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline))
: type(type)
, m_capture(capture)
, m_invert(invert)
{
parentheses.disjunction = disjunction;
parentheses.subpatternId = subpatternId;
parentheses.isCopy = false;
parentheses.isTerminal = false;
diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -1099,17 +1099,17 @@ struct arena_s {
static unsigned ncpus;
#endif
/*
* When MALLOC_STATIC_SIZES is defined most of the parameters
* controlling the malloc behavior are defined as compile-time constants
* for best performance and cannot be altered at runtime.
*/
-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__)
+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__))
#define MALLOC_STATIC_SIZES 1
#endif
#ifdef MALLOC_STATIC_SIZES
/*
* VM page size. It must divide the runtime CPU page size or the code
* will abort.

View File

@ -1,136 +0,0 @@
From: Hans Petter Jansson <hpj@copyleft.no>
Wolfgang Rosenauer <wr@rosenauer.org>
Subject: use libnsssharedhelper if available at compile time
(can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1)
References:
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -8231,16 +8231,31 @@ if test "$MOZ_ENABLE_SKIA"; then
MOZ_ENABLE_SKIA_GPU=1
AC_DEFINE(USE_SKIA_GPU)
AC_SUBST(MOZ_ENABLE_SKIA_GPU)
fi
fi
AC_SUBST(MOZ_ENABLE_SKIA)
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)
else
diff --git a/security/manager/ssl/src/Makefile.in b/security/manager/ssl/src/Makefile.in
new file mode 100644
--- /dev/null
+++ b/security/manager/ssl/src/Makefile.in
@@ -0,0 +1,8 @@
+#! gmake
+#
+# 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
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+LOCAL_INCLUDES += $(NSSHELPER_CFLAGS)
+EXTRA_DSO_LDOPTS += $(NSSHELPER_LIBS)
diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp
--- a/security/manager/ssl/src/nsNSSComponent.cpp
+++ b/security/manager/ssl/src/nsNSSComponent.cpp
@@ -3,16 +3,23 @@
* 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
* 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
+#pragma GCC visibility push(default)
+#include <nss-shared-helper.h>
+#pragma GCC visibility pop
+#include "prenv.h"
+#endif
+
#include "nsNSSComponent.h"
#include "ExtendedValidation.h"
#include "NSSCertDBTrustDomain.h"
#include "mozilla/Telemetry.h"
#include "nsCertVerificationThread.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsComponentManagerUtils.h"
@@ -1141,17 +1148,31 @@ nsNSSComponent::InitializeNSS()
if (NS_FAILED(rv)) {
nsPSMInitPanic::SetPanic();
return NS_ERROR_NOT_AVAILABLE;
}
SECStatus init_rv = SECFailure;
if (!profileStr.IsEmpty()) {
// First try to initialize the NSS DB in read/write mode.
- SECStatus init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
+#ifdef MOZ_ENABLE_NSSHELPER
+ if (PR_GetEnv("MOZ_TB_NO_NSSHELPER")) {
+ init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
+ } else {
+ uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
+ init_rv = ::nsshelp_open_db ("Thunderbird", profileStr.get(), flags);
+
+ if (init_rv != SECSuccess) {
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get()));
+ init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
+ }
+ }
+#else
+ init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
+#endif
// If that fails, attempt read-only mode.
if (init_rv != SECSuccess) {
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("could not init NSS r/w in %s\n", profileStr.get()));
init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), true);
}
if (init_rv != SECSuccess) {
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("could not init in r/o either\n"));
}
diff --git a/toolkit/library/libxul.mk b/toolkit/library/libxul.mk
--- a/toolkit/library/libxul.mk
+++ b/toolkit/library/libxul.mk
@@ -146,17 +146,17 @@ OS_LIBS += $(call EXPAND_LIBNAME,mfuuid
endif
ifdef MOZ_DIRECTSHOW
OS_LIBS += $(call EXPAND_LIBNAME,dmoguids wmcodecdspuuid strmiids msdmo)
endif
EXTRA_DSO_LDOPTS += $(LIBS_DIR)
-EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
+EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB) $(NSSHELPER_LIBS)
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
OS_LIBS += \
$(TK_LIBS) \
$(NULL)
endif
ifeq (OpenBSD,$(OS_ARCH))

View File

@ -1,7 +1,7 @@
diff --git a/mail/installer/package-manifest.in b/mail/installer/package-manifest.in
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -268,16 +268,17 @@
@@ -358,16 +358,17 @@
#ifdef XP_WIN32
@BINPATH@/nsldap32v60@DLL_SUFFIX@
@BINPATH@/nsldappr32v60@DLL_SUFFIX@
@ -14,8 +14,8 @@ diff --git a/mail/installer/package-manifest.in b/mail/installer/package-manifes
#endif
; login manager
@BINPATH@/components/loginmgr.xpt
@BINPATH@/components/nsLoginInfo.js
@BINPATH@/components/nsLoginManager.js
@BINPATH@/components/nsLoginManagerPrompter.js
@BINPATH@/components/passwordmgr.manifest
@RESPATH@/components/loginmgr.xpt
@RESPATH@/components/nsLoginInfo.js
@RESPATH@/components/nsLoginManager.js
@RESPATH@/components/nsLoginManagerPrompter.js
@RESPATH@/components/passwordmgr.manifest

View File

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

View File

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

View File

@ -1,27 +0,0 @@
From: Hans Petter Jansson <hpj@copyleft.no>
Wolfgang Rosenauer <wr@rosenauer.org>
Subject: use libnsssharedhelper if available at compile time
(can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1)
References:
diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -54,16 +54,17 @@ LOCAL_INCLUDES += \
-I$(MOZILLA_SRCDIR)/xpcom/build \
$(NULL)
DEFINES += -DXPCOM_GLUE
STL_FLAGS=
LIBS += \
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
+ $(NSSHELPER_LIBS) \
$(NULL)
ifdef MOZ_LINKER
LIBS += $(MOZ_ZLIB_LIBS)
endif
ifndef MOZ_WINCONSOLE
ifdef MOZ_DEBUG