diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2015-07-16 06:05:59 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2015-07-16 06:05:59 +0000 |
commit | ef0a0c91f153782cd38b84d14147dfa8cef8337f (patch) | |
tree | caa550e9c6de6d456de3b7c58dd8a734b5352b71 /www/libxul | |
parent | 0f6380feb102214049ed4d6947dbd85a02b35d19 (diff) | |
download | ports-ef0a0c91f153782cd38b84d14147dfa8cef8337f.tar.gz ports-ef0a0c91f153782cd38b84d14147dfa8cef8337f.zip |
Notes
Diffstat (limited to 'www/libxul')
34 files changed, 1990 insertions, 1859 deletions
diff --git a/www/libxul/Makefile b/www/libxul/Makefile index abff4c6b7677..fc9b90ce6154 100644 --- a/www/libxul/Makefile +++ b/www/libxul/Makefile @@ -2,37 +2,36 @@ # $FreeBSD$ PORTNAME= libxul -DISTVERSION= 31.7.0 -PORTREVISION= 1 +DISTVERSION= 38.1.0 CATEGORIES?= www devel MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \ - MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build2/source + MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build1/source DISTNAME= firefox-${DISTVERSION}esr.source MAINTAINER?= gecko@FreeBSD.org COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps -BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \ - nss>=3.16.2.3:${PORTSDIR}/security/nss \ +BUILD_DEPENDS= nspr>=4.10.8:${PORTSDIR}/devel/nspr \ + nss>=3.19.2:${PORTSDIR}/security/nss \ libevent2>=2.0.21_2:${PORTSDIR}/devel/libevent2 \ cairo>=1.12.16_1,2:${PORTSDIR}/graphics/cairo \ soundtouch>=1.8.0:${PORTSDIR}/audio/soundtouch \ harfbuzz>=0.9.25:${PORTSDIR}/print/harfbuzz \ graphite2>=1.2.4:${PORTSDIR}/graphics/graphite2 \ - libvorbis>=1.3.5:${PORTSDIR}/audio/libvorbis \ - opus>=1.1:${PORTSDIR}/audio/opus \ + libvorbis>=1.3.4:${PORTSDIR}/audio/libvorbis \ libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \ - sqlite3>=3.8.4.2:${PORTSDIR}/databases/sqlite3 \ + sqlite3>=3.8.9:${PORTSDIR}/databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \ v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \ autoconf-2.13:${PORTSDIR}/devel/autoconf213 \ zip:${PORTSDIR}/archivers/zip \ unzip:${PORTSDIR}/archivers/unzip +# opus>=1.1:${PORTSDIR}/audio/opus \ LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l -WRKSRC= ${WRKDIR}/mozilla-esr31 -CONFLICTS= libxul-1.9.* +WRKSRC= ${WRKDIR}/mozilla-esr38 +CONFLICTS_INSTALL= libxul-1.9.* USE_QT5= # empty QT_NONSTANDARD= yes @@ -47,11 +46,16 @@ MOZ_OPTIONS?= --enable-application=xulrunner USE_GECKO= gecko CPE_PRODUCT= firefox_esr MOZILLA_EXEC_NAME=xulrunner -USE_MOZILLA= # empty +USE_MOZILLA= -opus MOZILLA_PLIST_DIRS= bin include lib share/idl libdata MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-js \ mozilla-plugin +OPTIONS_DEFAULT= GTK2 + +OPTIONS_SINGLE+= TOOLKIT +OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3 + .include "${.CURDIR}/../../www/firefox/Makefile.options" .include <bsd.port.pre.mk> @@ -67,6 +71,10 @@ RUN_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib RUN_DEPENDS+= gstreamer1-libav>=1.2.4_1:${PORTSDIR}/multimedia/gstreamer1-libav .endif +.if ${PORT_OPTIONS:MGTK3} +BUILD_DEPENDS+= gtk3>=3.14.6:${PORTSDIR}/x11-toolkits/gtk30 +.endif + .if ${PORT_OPTIONS:MTEST} BROKEN= stage-package fails with ValueError: no path specified .endif diff --git a/www/libxul/distinfo b/www/libxul/distinfo index cdd6c531f1e3..d7587fa34ae9 100644 --- a/www/libxul/distinfo +++ b/www/libxul/distinfo @@ -1,2 +1,2 @@ -SHA256 (firefox-31.7.0esr.source.tar.bz2) = 8523c10ecb318f278a251d90e2161c07c7431796d4387fe9091dfa4e633474b6 -SIZE (firefox-31.7.0esr.source.tar.bz2) = 147772244 +SHA256 (firefox-38.1.0esr.source.tar.bz2) = 85eb5f916aa47a92cf50803dcb35e7fa3a9da29abf5fc91cbb6a70bbbc2618ff +SIZE (firefox-38.1.0esr.source.tar.bz2) = 180392775 diff --git a/www/libxul/files/patch-bug1013675 b/www/libxul/files/patch-bug1013675 deleted file mode 100644 index eac435acf3d0..000000000000 --- a/www/libxul/files/patch-bug1013675 +++ /dev/null @@ -1,88 +0,0 @@ -diff --git xpcom/base/nsDebugImpl.cpp xpcom/base/nsDebugImpl.cpp -index 13a286f..293bd73 100644 ---- xpcom/base/nsDebugImpl.cpp -+++ xpcom/base/nsDebugImpl.cpp -@@ -45,12 +45,43 @@ - #endif - #endif - --#if defined(XP_MACOSX) -+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \ -+ || defined(__NetBSD__) || defined(__OpenBSD__) - #include <stdbool.h> - #include <unistd.h> -+#include <sys/param.h> - #include <sys/sysctl.h> - #endif - -+#if defined(__OpenBSD__) -+#include <sys/proc.h> -+#endif -+ -+#if defined(__DragonFly__) || defined(__FreeBSD__) -+#include <sys/user.h> -+#endif -+ -+#if defined(__NetBSD__) -+#undef KERN_PROC -+#define KERN_PROC KERN_PROC2 -+#define KINFO_PROC struct kinfo_proc2 -+#else -+#define KINFO_PROC struct kinfo_proc -+#endif -+ -+#if defined(XP_MACOSX) -+#define KP_FLAGS kp_proc.p_flag -+#elif defined(__DragonFly__) -+#define KP_FLAGS kp_flags -+#elif defined(__FreeBSD__) -+#define KP_FLAGS ki_flag -+#elif defined(__OpenBSD__) && !defined(_P_TRACED) -+#define KP_FLAGS p_psflags -+#define P_TRACED PS_TRACED -+#else -+#define KP_FLAGS p_flag -+#endif -+ - #include "mozilla/mozalloc_abort.h" - - static void -@@ -144,16 +175,22 @@ nsDebugImpl::GetIsDebuggerAttached(bool* aResult) - - #if defined(XP_WIN) - *aResult = ::IsDebuggerPresent(); --#elif defined(XP_MACOSX) -+#elif defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \ -+ || defined(__NetBSD__) || defined(__OpenBSD__) - // Specify the info we're looking for -- int mib[4]; -- mib[0] = CTL_KERN; -- mib[1] = KERN_PROC; -- mib[2] = KERN_PROC_PID; -- mib[3] = getpid(); -+ int mib[] = { -+ CTL_KERN, -+ KERN_PROC, -+ KERN_PROC_PID, -+ getpid(), -+#if defined(__NetBSD__) || defined(__OpenBSD__) -+ sizeof(KINFO_PROC), -+ 1, -+#endif -+ }; - size_t mibSize = sizeof(mib) / sizeof(int); - -- struct kinfo_proc info; -+ KINFO_PROC info; - size_t infoSize = sizeof(info); - memset(&info, 0, infoSize); - -@@ -163,7 +200,7 @@ nsDebugImpl::GetIsDebuggerAttached(bool* aResult) - return NS_OK; - } - -- if (info.kp_proc.p_flag & P_TRACED) { -+ if (info.KP_FLAGS & P_TRACED) { - *aResult = true; - } - #endif diff --git a/www/libxul/files/patch-bug1013882 b/www/libxul/files/patch-bug1013882 index 86dc379fe50f..b3177989a39e 100644 --- a/www/libxul/files/patch-bug1013882 +++ b/www/libxul/files/patch-bug1013882 @@ -30,14 +30,14 @@ diff --git browser/installer/package-manifest.in browser/installer/package-manif index b509fd4..195345c 100644 --- browser/installer/package-manifest.in +++ browser/installer/package-manifest.in -@@ -583,7 +583,7 @@ - @BINPATH@/components/MozKeyboard.js - @BINPATH@/components/InputMethod.manifest +@@ -608,7 +608,7 @@ + @RESPATH@/components/MozKeyboard.js + @RESPATH@/components/InputMethod.manifest -#ifdef MOZ_DEBUG +#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG) - @BINPATH@/components/TestInterfaceJS.js - @BINPATH@/components/TestInterfaceJS.manifest + @RESPATH@/components/TestInterfaceJS.js + @RESPATH@/components/TestInterfaceJS.manifest #endif diff --git mobile/android/installer/Makefile.in mobile/android/installer/Makefile.in index 96dceab..3528ad6 100644 diff --git a/www/libxul/files/patch-bug1015547 b/www/libxul/files/patch-bug1015547 deleted file mode 100644 index ecb488c36e7f..000000000000 --- a/www/libxul/files/patch-bug1015547 +++ /dev/null @@ -1,95 +0,0 @@ -diff --git configure.in configure.in -index 7bed45f..053de17 100644 ---- configure.in -+++ configure.in -@@ -2950,7 +2950,7 @@ dnl Checks for library functions. - dnl ======================================================== - AC_PROG_GCC_TRADITIONAL - AC_FUNC_MEMCMP --AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r) -+AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r arc4random arc4random_buf) - - dnl check for clock_gettime(), the CLOCK_MONOTONIC clock - AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), -diff --git xpcom/base/nsUUIDGenerator.cpp xpcom/base/nsUUIDGenerator.cpp -index 0687344..ca3ff8b 100644 ---- xpcom/base/nsUUIDGenerator.cpp -+++ xpcom/base/nsUUIDGenerator.cpp -@@ -15,6 +15,10 @@ - - #include "nsUUIDGenerator.h" - -+#ifdef ANDROID -+extern "C" NS_EXPORT void arc4random_buf(void *, size_t); -+#endif -+ - using namespace mozilla; - - NS_IMPL_ISUPPORTS1(nsUUIDGenerator, nsIUUIDGenerator) -@@ -34,7 +38,7 @@ nsUUIDGenerator::Init() - // We're a service, so we're guaranteed that Init() is not going - // to be reentered while we're inside Init(). - --#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID) -+#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM) - /* initialize random number generator using NSPR random noise */ - unsigned int seed; - -@@ -67,7 +71,7 @@ nsUUIDGenerator::Init() - return NS_ERROR_FAILURE; - #endif - --#endif /* non XP_WIN and non XP_MACOSX */ -+#endif /* non XP_WIN and non XP_MACOSX and non ARC4RANDOM */ - - return NS_OK; - } -@@ -114,13 +118,16 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id) - * back to it; instead, we use the value returned when we called - * initstate, since older glibc's have broken setstate() return values - */ --#ifndef ANDROID -+#ifndef HAVE_ARC4RANDOM - setstate(mState); - #endif - -+#ifdef HAVE_ARC4RANDOM_BUF -+ arc4random_buf(id, sizeof(nsID)); -+#else /* HAVE_ARC4RANDOM_BUF */ - size_t bytesLeft = sizeof(nsID); - while (bytesLeft > 0) { --#ifdef ANDROID -+#ifdef HAVE_ARC4RANDOM - long rval = arc4random(); - const size_t mRBytes = 4; - #else -@@ -141,6 +148,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id) - - bytesLeft -= toWrite; - } -+#endif /* HAVE_ARC4RANDOM_BUF */ - - /* Put in the version */ - id->m2 &= 0x0fff; -@@ -150,7 +158,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id) - id->m3[0] &= 0x3f; - id->m3[0] |= 0x80; - --#ifndef ANDROID -+#ifndef HAVE_ARC4RANDOM - /* Restore the previous RNG state */ - setstate(mSavedState); - #endif -diff --git xpcom/base/nsUUIDGenerator.h xpcom/base/nsUUIDGenerator.h -index 6a24212..68ed6f2 100644 ---- xpcom/base/nsUUIDGenerator.h -+++ xpcom/base/nsUUIDGenerator.h -@@ -27,7 +27,7 @@ private: - protected: - - mozilla::Mutex mLock; --#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID) -+#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM) - char mState[128]; - char *mSavedState; - uint8_t mRBytes; diff --git a/www/libxul/files/patch-bug1021171 b/www/libxul/files/patch-bug1021171 deleted file mode 100644 index 9e663a6779e0..000000000000 --- a/www/libxul/files/patch-bug1021171 +++ /dev/null @@ -1,193 +0,0 @@ -commit dd19f59 -Author: Trevor Saunders <trev.saunders@gmail.com> -Date: Fri Jun 6 15:31:30 2014 -0400 - - bug 1021171 - don't return nulllptr in functions returning bool r=bz,waldo ---- - js/src/builtin/TypedObject.cpp | 32 ++++++++++++++++---------------- - js/src/frontend/BytecodeCompiler.cpp | 2 +- - js/xpconnect/wrappers/XrayWrapper.cpp | 2 +- - netwerk/ipc/NeckoParent.cpp | 2 +- - 4 files changed, 19 insertions(+), 19 deletions(-) - -diff --git js/src/builtin/TypedObject.cpp js/src/builtin/TypedObject.cpp -index 9e284b9..7a0a7fc 100644 ---- js/src/builtin/TypedObject.cpp -+++ js/src/builtin/TypedObject.cpp -@@ -710,12 +710,12 @@ ArrayMetaTypeDescr::construct(JSContext *cx, unsigned argc, Value *vp) - 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 @@ ArrayMetaTypeDescr::construct(JSContext *cx, unsigned argc, Value *vp) - 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 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp) - 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 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp) - 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 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp) - 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 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp) - 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 @@ DefineSimpleTypeDescr(JSContext *cx, - 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 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global) - #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 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global) - 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 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global) - 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 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global) - nullptr, nullptr, - 0)) - { -- return nullptr; -+ return false; - } - - return module; -@@ -2449,7 +2449,7 @@ TypedObject::constructUnsized(JSContext *cx, unsigned int argc, Value *vp) - 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 --git js/src/frontend/BytecodeCompiler.cpp js/src/frontend/BytecodeCompiler.cpp -index 5aacc23..aed45ca 100644 ---- js/src/frontend/BytecodeCompiler.cpp -+++ js/src/frontend/BytecodeCompiler.cpp -@@ -544,7 +544,7 @@ CompileFunctionBody(JSContext *cx, MutableHandleFunction fun, const ReadOnlyComp - - RootedScriptSource sourceObject(cx, CreateScriptSourceObject(cx, options)); - if (!sourceObject) -- return nullptr; -+ return false; - ScriptSource* ss = sourceObject->source(); - - SourceCompressionTask sct(cx); -diff --git js/xpconnect/wrappers/XrayWrapper.cpp js/xpconnect/wrappers/XrayWrapper.cpp -index fd6458b..ab48770 100644 ---- js/xpconnect/wrappers/XrayWrapper.cpp -+++ js/xpconnect/wrappers/XrayWrapper.cpp -@@ -363,7 +363,7 @@ public: - { - JSAutoCompartment ac(cx, target); - if (!JS_GetClassPrototype(cx, key, protop)) -- return nullptr; -+ return false; - } - return JS_WrapObject(cx, protop); - } -diff --git netwerk/ipc/NeckoParent.cpp netwerk/ipc/NeckoParent.cpp -index 96dbb1d..ef3293b 100644 ---- netwerk/ipc/NeckoParent.cpp -+++ netwerk/ipc/NeckoParent.cpp -@@ -365,7 +365,7 @@ NeckoParent::RecvPRtspChannelConstructor( - RtspChannelParent* p = static_cast<RtspChannelParent*>(aActor); - return p->Init(aConnectArgs); - #else -- return nullptr; -+ return false; - #endif - } - diff --git a/www/libxul/files/patch-bug1021761 b/www/libxul/files/patch-bug1021761 index 1d0cde369c34..253327b733a7 100644 --- a/www/libxul/files/patch-bug1021761 +++ b/www/libxul/files/patch-bug1021761 @@ -218,12 +218,12 @@ index a962553..1f780f4 100644 assert(p); pthread_mutex_unlock(&stm->mutex); -@@ -313,10 +360,10 @@ alsa_refill_stream(cubeb_stream * stm) - return ERROR; - } - if (got > 0) { -- snd_pcm_sframes_t wrote = snd_pcm_writei(stm->pcm, p, got); -+ snd_pcm_sframes_t wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); +@@ -327,10 +374,10 @@ alsa_refill_stream(cubeb_stream * stm) + b[i] *= stm->volume; + } + } +- wrote = snd_pcm_writei(stm->pcm, p, got); ++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); if (wrote == -EPIPE) { - snd_pcm_recover(stm->pcm, wrote, 1); - wrote = snd_pcm_writei(stm->pcm, p, got); @@ -533,42 +533,51 @@ index a962553..1f780f4 100644 assert((nfds_t) r == stm->nfds); r = pthread_cond_init(&stm->cond, NULL); -@@ -937,12 +1043,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) +@@ -895,7 +1001,7 @@ alsa_stream_destroy(cubeb_stream * stm) + pthread_mutex_lock(&stm->mutex); + if (stm->pcm) { + if (stm->state == DRAINING) { +- snd_pcm_drain(stm->pcm); ++ WRAP(snd_pcm_drain)(stm->pcm); + } + alsa_locked_pcm_close(stm->pcm); + stm->pcm = NULL; +@@ -938,12 +1044,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels) return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_any(stm->pcm, hw_params); -+ rv = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); - if (rv < 0) { +- r = snd_pcm_hw_params_any(stm->pcm, hw_params); ++ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params); + if (r < 0) { return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_get_channels_max(hw_params, max_channels); -+ rv = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels); - if (rv < 0) { +- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels); ++ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels); + if (r < 0) { return CUBEB_ERROR; } -@@ -962,34 +1068,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { +@@ -963,34 +1069,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) { /* get a pcm, disabling resampling, so we get a rate the * hardware/dmix/pulse/etc. supports. */ -- rv = snd_pcm_open(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); -+ rv = WRAP(snd_pcm_open)(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); - if (rv < 0) { +- r = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); ++ r = WRAP(snd_pcm_open)(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0); + if (r < 0) { return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_any(pcm, hw_params); -+ rv = WRAP(snd_pcm_hw_params_any)(pcm, hw_params); - if (rv < 0) { +- r = snd_pcm_hw_params_any(pcm, hw_params); ++ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params); + if (r < 0) { - snd_pcm_close(pcm); + WRAP(snd_pcm_close)(pcm); return CUBEB_ERROR; } -- rv = snd_pcm_hw_params_get_rate(hw_params, rate, &dir); -+ rv = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir); - if (rv >= 0) { +- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir); ++ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir); + if (r >= 0) { /* There is a default rate: use it. */ - snd_pcm_close(pcm); + WRAP(snd_pcm_close)(pcm); @@ -578,9 +587,9 @@ index a962553..1f780f4 100644 /* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */ *rate = 44100; -- rv = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL); -+ rv = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL); - if (rv < 0) { +- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL); ++ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL); + if (r < 0) { - snd_pcm_close(pcm); + WRAP(snd_pcm_close)(pcm); return CUBEB_ERROR; @@ -634,7 +643,7 @@ new file mode 100644 index 0000000..5e38e27 --- /dev/null +++ media/libcubeb/src/cubeb_oss.c -@@ -0,0 +1,397 @@ +@@ -0,0 +1,402 @@ +/* + * Copyright © 2014 Mozilla Foundation + * @@ -1030,7 +1039,12 @@ index 0000000..5e38e27 + .stream_start = oss_stream_start, + .stream_stop = oss_stream_stop, + .stream_get_position = oss_stream_get_position, -+ .stream_get_latency = oss_stream_get_latency ++ .stream_get_latency = oss_stream_get_latency, ++ .stream_set_volume = oss_stream_set_volume, ++ .stream_set_panning = oss_stream_set_panning, ++ .stream_get_current_device = NULL, ++ .stream_device_destroy = NULL, ++ .stream_register_device_changed_callback = NULL +}; diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build index 8b7a0dd..31212ce 100644 @@ -1056,36 +1070,33 @@ index 8b7a0dd..31212ce 100644 +CFLAGS += CONFIG['MOZ_OSS_CFLAGS'] CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS'] -diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in +diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build index 991f03f..3d99eb5 100644 ---- media/webrtc/signaling/test/Makefile.in -+++ media/webrtc/signaling/test/Makefile.in -@@ -26,9 +26,9 @@ ifdef JS_SHARED_LIBRARY - LIBS += $(MOZ_JS_LIBS) - endif - --ifdef MOZ_ALSA -+ifdef MOZ_OSS - LIBS += \ -- $(MOZ_ALSA_LIBS) \ -+ $(MOZ_OSS_LIBS) \ - $(NULL) - endif - -diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk +--- media/webrtc/signaling/test/moz.build ++++ media/webrtc/signaling/test/moz.build +@@ -112,8 +112,8 @@ if CONFIG['JS_SHARED_LIBRARY']: + OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS'] + OS_LIBS += CONFIG['REALTIME_LIBS'] + +-if CONFIG['MOZ_ALSA']: +- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] ++if CONFIG['MOZ_OSS']: ++ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] + + if CONFIG['MOZ_NATIVE_JPEG']: + OS_LIBS += CONFIG['MOZ_JPEG_LIBS'] +diff --git toolkit/library/moz.build toolkit/library/moz.build index e191f13..4fb268a 100644 ---- toolkit/library/libxul.mk -+++ toolkit/library/libxul.mk -@@ -146,9 +146,9 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32 - endif - endif - --ifdef MOZ_ALSA --EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) --endif -+ifdef MOZ_OSS -+EXTRA_DSO_LDOPTS += $(MOZ_OSS_LIBS) -+endif - - ifdef HAVE_CLOCK_MONOTONIC - EXTRA_DSO_LDOPTS += $(REALTIME_LIBS) +--- toolkit/library/moz.build ++++ toolkit/library/moz.build +@@ -234,8 +234,8 @@ if CONFIG['MOZ_NATIVE_LIBVPX']: + if not CONFIG['MOZ_TREE_PIXMAN']: + OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] + +-if CONFIG['MOZ_ALSA']: +- OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] ++if CONFIG['MOZ_OSS']: ++ OS_LIBS += CONFIG['MOZ_OSS_LIBS'] + + if CONFIG['HAVE_CLOCK_MONOTONIC']: + OS_LIBS += CONFIG['REALTIME_LIBS'] diff --git a/www/libxul/files/patch-bug1026828 b/www/libxul/files/patch-bug1026828 deleted file mode 100644 index 69e79f5ac560..000000000000 --- a/www/libxul/files/patch-bug1026828 +++ /dev/null @@ -1,20 +0,0 @@ -diff --git storage/src/moz.build storage/src/moz.build -index 4cd2551..5c40536 100644 ---- storage/src/moz.build -+++ storage/src/moz.build -@@ -50,11 +50,14 @@ FINAL_LIBRARY = 'storagecomps' - # (such as NSS) might trigger an initialization of sqlite and allocation - # of memory using the default allocator, prior to the storage service - # registering its allocator, causing memory management failures (bug 938730). -+# However, this is not an issue if both the jemalloc allocator and the default -+# allocator are the same thing. - # - # Note: On Windows our sqlite build assumes we use jemalloc. If you disable - # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef - # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in. --if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_NATIVE_SQLITE']: -+if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE'] -+ or CONFIG['MOZ_NATIVE_JEMALLOC']): - if CONFIG['OS_TARGET'] != 'Android': - DEFINES['MOZ_STORAGE_MEMORY'] = True - diff --git a/www/libxul/files/patch-bug1041268 b/www/libxul/files/patch-bug1041268 new file mode 100644 index 000000000000..d4ab1a91395e --- /dev/null +++ b/www/libxul/files/patch-bug1041268 @@ -0,0 +1,26 @@ +diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc +index 97f69d3..77a50b3 100644 +--- media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc ++++ media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc +@@ -18,7 +18,7 @@ ScreenCapturer* ScreenCapturer::Create() { + return Create(DesktopCaptureOptions::CreateDefault()); + } + +-#if defined(WEBRTC_LINUX) ++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + ScreenCapturer* ScreenCapturer::CreateWithXDamage( + bool use_update_notifications) { + DesktopCaptureOptions options; +diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h +index a8d40a7..177a6c1 100644 +--- media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h ++++ media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h +@@ -74,7 +74,7 @@ class ScreenCapturer : public DesktopCapturer { + static ScreenCapturer* Create(const DesktopCaptureOptions& options); + static ScreenCapturer* Create(); + +-#if defined(WEBRTC_LINUX) ++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) + // Creates platform-specific capturer and instructs it whether it should use + // X DAMAGE support. + static ScreenCapturer* CreateWithXDamage(bool use_x_damage); diff --git a/www/libxul/files/patch-bug1041381 b/www/libxul/files/patch-bug1041381 deleted file mode 100644 index ef90b7b00c3f..000000000000 --- a/www/libxul/files/patch-bug1041381 +++ /dev/null @@ -1,12 +0,0 @@ -diff --git config/rules.mk config/rules.mk -index 1dee8c3..4d67eda 100644 ---- config/rules.mk -+++ config/rules.mk -@@ -822,6 +822,7 @@ endif - ifdef DTRACE_PROBE_OBJ - EXTRA_DEPS += $(DTRACE_PROBE_OBJ) - OBJS += $(DTRACE_PROBE_OBJ) -+EXCLUDED_OBJS += $(DTRACE_PROBE_OBJ) - endif - - $(filter %.$(LIB_SUFFIX),$(LIBRARY)): $(OBJS) $(EXTRA_DEPS) $(GLOBAL_DEPS) diff --git a/www/libxul/files/patch-bug1041795 b/www/libxul/files/patch-bug1041795 deleted file mode 100644 index 3e92884412fb..000000000000 --- a/www/libxul/files/patch-bug1041795 +++ /dev/null @@ -1,48 +0,0 @@ -diff --git config/rules.mk config/rules.mk -index 4d67eda..783942f 100644 ---- config/rules.mk -+++ config/rules.mk -@@ -858,7 +858,7 @@ ifdef DTRACE_PROBE_OBJ - ifndef DTRACE_LIB_DEPENDENT - NON_DTRACE_OBJS := $(filter-out $(DTRACE_PROBE_OBJ),$(OBJS)) - $(DTRACE_PROBE_OBJ): $(NON_DTRACE_OBJS) -- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS) -+ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS) - endif - endif - endif -@@ -876,7 +876,7 @@ ifndef INCREMENTAL_LINKER - endif - ifdef DTRACE_LIB_DEPENDENT - ifndef XP_MACOSX -- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS)) -+ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS)) - endif - $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS)) - @$(RM) $(DTRACE_PROBE_OBJ) -diff --git js/src/Makefile.in js/src/Makefile.in -index 28ca5e8..96793d7 100644 ---- js/src/Makefile.in -+++ js/src/Makefile.in -@@ -342,7 +342,7 @@ endif - - ifdef HAVE_DTRACE - $(CURDIR)/javascript-trace.h: $(srcdir)/devtools/javascript-trace.d -- dtrace -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in -+ dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in - sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \ - -e '/const/!s/char \*/const char */g' \ - javascript-trace.h.in > javascript-trace.h -diff --git probes/Makefile.in probes/Makefile.in -index 6d18f34..deec83f 100644 ---- probes/Makefile.in -+++ probes/Makefile.in -@@ -7,7 +7,7 @@ export:: $(DIST)/include/mozilla-trace.h - - # Replace _DTRACE_VERSION with INCLUDE_MOZILLA_DTRACE - $(DIST)/include/mozilla-trace.h: mozilla-trace.d Makefile -- dtrace -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp -+ dtrace -x nolibs -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp - sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \ - mozilla-trace.h.tmp > $(DIST)/include/mozilla-trace.h - rm mozilla-trace.h.tmp diff --git a/www/libxul/files/patch-bug1046224 b/www/libxul/files/patch-bug1046224 deleted file mode 100644 index 50d268f8fabe..000000000000 --- a/www/libxul/files/patch-bug1046224 +++ /dev/null @@ -1,26 +0,0 @@ -diff --git configure.in configure.in -index 1853029..559bd45 100644 ---- configure.in -+++ configure.in -@@ -2651,7 +2651,7 @@ if test "$ac_cv_sockaddr_sa_len" = true ; then - AC_DEFINE(HAVE_SA_LEN) - fi - --AC_ARG_ENABLE(dtrace, -+MOZ_ARG_ENABLE_BOOL(dtrace, - [ --enable-dtrace build with dtrace support if available (default=no)], - [enable_dtrace="yes"],) - if test "x$enable_dtrace" = "xyes"; then -diff --git js/src/configure.in js/src/configure.in -index 134dfd3..682c1fb 100644 ---- js/src/configure.in -+++ js/src/configure.in -@@ -2153,7 +2153,7 @@ dnl Quota support - MOZ_CHECK_HEADERS(sys/quota.h) - MOZ_CHECK_HEADERS(linux/quota.h) - --AC_ARG_ENABLE(dtrace, -+MOZ_ARG_ENABLE_BOOL(dtrace, - [ --enable-dtrace build with dtrace support if available (default=no)], - [enable_dtrace="yes"],) - if test "x$enable_dtrace" = "xyes"; then diff --git a/www/libxul/files/patch-bug1061736 b/www/libxul/files/patch-bug1061736 deleted file mode 100644 index 08f361b449bd..000000000000 --- a/www/libxul/files/patch-bug1061736 +++ /dev/null @@ -1,50 +0,0 @@ -commit a7add79 -Author: Gavin Sharp <gavin@gavinsharp.com> -Date: Mon Oct 27 18:43:51 2014 -0700 - - Bug 1061736: add DuckDuckGo as a search engine option in Firefox. r=dolske ---- - browser/locales/Makefile.in | 2 +- - browser/locales/en-US/searchplugins/ddg.xml | 21 +++++++++++++++++++++ - 2 files changed, 22 insertions(+), 1 deletion(-) - -diff --git browser/locales/Makefile.in browser/locales/Makefile.in -index eb3c30b..b172876 100644 ---- browser/locales/Makefile.in -+++ browser/locales/Makefile.in -@@ -71,7 +71,7 @@ endif - ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro) - SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt)) - else --SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) -+SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg - endif - SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins - SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES)) -diff --git browser/locales/en-US/searchplugins/ddg.xml browser/locales/en-US/searchplugins/ddg.xml -new file mode 100644 -index 0000000..d68deb4 ---- /dev/null -+++ browser/locales/en-US/searchplugins/ddg.xml -@@ -0,0 +1,21 @@ -+<?xml version="1.0" encoding="utf-8"?> -+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> -+ <ShortName>DuckDuckGo</ShortName> -+ <Description>Search DuckDuckGo</Description> -+ <InputEncoding>UTF-8</InputEncoding> -+ <Image height="16" width="16">data:image/icon;base64,AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAEAAATCwAAEwsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA11RgALs6oACbQ9wAj0v8AI9L/ACfQ9wAu0agANdUYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzzN4CNdL/oK/z//////////////////////+jsPv/BDXX/wAz0t4AAAAAAAAAAAAAAAAAAAAAAAAAAAAyzvNSduD//////8jK/v+P+Lf/IbQL/17RPP+J3Y//wOKX//////9YeuX/ADLO8wAAAAAAAAAAAAAAAAAw091piOX/8/X9/1Fx5P9xhu//WOWZ/0W9Lv9Lwjn/J8BB/xyDAP9bdfL/9fP//2mI5v8AMNPdAAAAAAc610YRQ9f//////0Zr4P8AGdD/sb32////////////wrv//wAh1/8MPab/ACPc/05r4///////EkPX/wc610YANtWkrr/y/6S48P8AJ9L/AB3R/+/w/v///////////3+D7f8AQeL/AYTw/wFr5/8AMNb/p7Tv/6698v8AM9WkADLW//////8yXt//AC3V/wAw1/////////////z///8A0P7/AKb1/wWI7P8AuPf/AJ3w/zZW3P//////ADHV/wAx2P//////AzrZ/wAu1/84ZOL////////////e////AND//wC1+f8Atff/AZbv/wY62f8ELNf//////wAw1/8AMtn//////wAw2f8ALNn/kKrz////+//cwbH////////////R////Rcb8/wDO/f8A/P//AHzo//////8AMNj/ADXa//////8vXuL/ACna/4yq9///79T/jUkg/9i+r///////r2Q0/7Cozv8BKdr/AirY/zdZ4P//////ADTa/wI72tOuv/T/prr0/wAl2v+JqPb//7yW/+bUxv/9+/n////u//W+n/+Op/L/ADPd/wAv2v+ru/T/r7/0/wI72tMLQd1DEEjg//////9Cbef/ADng///////////////////////R3///AC3g/wAy3v9SeOn//////xFI4P8LQd1DAAAAAAM64PNmiuz/9/j//2mN7f/m7P3///////////9Cb+n/ACXd/wAt3v9rju3//////2iL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/P8J0vz/ELDz/xt85v8mSdj/JknY/yZJ2P8lStowJUjXYCZJ2P8nSdhwJErZryZK2f8oSNcgJUnajyZK2f8mStn/JkrZ/yZK2f8mStn/iJPA////////////////////////////0ff+/xjV/P8J0vz/Drn1/xiO6/8Yjuv/GI7r/xCw8/8Lyvr/CdL8/xmF6P8mStn/JkrZ/yVJ2o8oSNcgJkrZ/yRK2a8jStrfI0rZ3wAAAAAlSdq/Jkra/yZK2v8mStr/Jkra/yZK2v+xtsf///////////////////////////8o2Pz/CdL8/wvK+v8mStr/Jkra/yZK2v8mStr/Jkra/yZK2v8iW97/Jkra/yZK2v8mStr/JUnavwAAAAAjStnfI0ra3yZK2v8lSdq/AAAAACZH2O8mStr/Jkra/yZK2v8mStr/L1HY/9HR0f///////////////////////////yjY/P8J0vz/CdL8/xCw9P8QsPT/ELD0/xSf7/8ddeX/Jkra/yZK2v8mStr/Jkra/yZK2v8mR9jvAAAAACVJ2r8mStr/Jkvb/yVJ2r8AAAAAJkvb/yZL2/8mS9v/Jkvb/yZL2/9KZtL/4+Pj////////////////////////////4Pn//0fd/f8J0vz/CdL8/wnS/P8J0vz/CdL8/wnS/P8Lyvr/Fpfu/yJc3/8mS9v/Jkvb/yZL2/8AAAAAJUnavyZL2/8mS9z/JUncvwAAAAAmS9z/Jkvc/yZL3P8mS9z/Jkvc/26AyP/x8fH//////////////////////////////////////9H3/v/C9P7/o+7+/2fa+/8Oufb/CdL8/wnS/P8J0vz/CdL8/xiP7P8mS9z/Jkvc/wAAAAAlSdy/Jkvc/yZM3P8lTNy/AAAAACZJ2e8mTNz/Jkzc/yZM3P8mTNz/iJTB////////////qnth/5VaOf/x6eX///////////////////////Hp5f/x6eX/ydL2/yZM3P8kVN7/G37o/xKo8v8QsfT/HXbm/yZM3P8mSdnvAAAAACVM3L8mTNz/I0vc3yZJ2u8AAAAAJUzevyZM3f8mTN3/Jkzd/yZM3f+fqc3///////////+VWjn/v5yI/+re1///////////////////////jk8s/7iRe//J0vb/Jkzd/yZM3f8mTN3/Jkzd/yZM3f8mTN3/Jkzd/yVM3r8AAAAAI0vc3yNL3N8kTd2vJk3d/yhQ3yAlTd2PJk3d/yZN3f8mTd3/Jk3d/6St0v////////////Hp5f/q3tf///////////////////////////+xhm7/49PK/6Cx8P8mTd3/Jk3d/yZN3f8mTd3/Jk3d/yZN3f8mTd3/JU3djyhQ3yAmTd3/JE3drydN33AmTd7/J03fcCVK3zAmTd7/Jk3e/yZN3v8mTd7/pK7S///////Sp5r/////////////////////////////////////////////////T27k/yZN3v8mTd7/Jk3e/yZN3v8mTd7/Jk3e/yZN3v8lSt8wJ03fcCZN3v8nTd9wKFDfICZO3/8mTt3PAAAAACVN3r8mTt//Jk7f/yZO3/+EltX//////+fRyv/SqaD/59LO///////////////////////at63/vIBy/7Glxf8mTt//Jk7f/yZO3/8mTt//Jk7f/yZO3/8mTt//JU3evwAAAAAmTt3PJk7f/yhQ3yAAAAAAJE/dryZO3/8oUN9AKFDfQCZO3/8mTt//Jk7f/zhb2v/o6/T/////////////////////////////////////////////////XHrn/yZO3/8mTt//Jk7f/yZO3/8mTt//Jk7f/yZO3/8oUN9AKFDfQCZO3/8kT92vAAAAAAAAAAAoUN9AJk7g/yZO4M8AAAAAJk/hnyZO4P8mTuD/Jk7g/05v5v/k6fv//////////////////////////////////////3eR7P8mTuD/Jk7g/yZO4P8mTuD/Jk7g/yZO4P8mTuD/Jk/hnwAAAAAmTuDPJk7g/yhQ30AAAAAAAAAAAAAAAAAjT+GfJU/h/yVO4Y8gUN8QIk7gzyVP4f8lT+H/SWnW/0lp1v+bq+H/8fHx/////////////////6Cy8v9OcOb/JU/h/yVP4f8lT+H/JU/h/yVP4f8lT+H/JU/h/yJO4M8gUN8QJU7hjyVP4f8jT+GfAAAAAAAAAAAAAAAAAAAAACBQ3xAlTOHvJU/h/yVQ4mAgUN8QIk7hzyVP4f+ktOv///////////////////////H0/f9phur/JU/h/yVP4f8lT+H/JU/h/yVP4f8lT+H/JU/h/yVP4f8iTuHPIFDfECVQ4mAlT+H/JUzh7yBQ3xAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ3zAlUOLvJVDi/yVQ4mAgUN8QI1Din4mb2//J0/j/ydP4/6299P93ku3/M1vk/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/I1DinyBQ3xAlUOJgJVDi/yVQ4u8lUN8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ5DAlUOLvJVDi/yVQ4o8AAAAAJFDjQCVQ4r8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDi/yVQ4v8lUOL/JVDivyRQ40AAAAAAJVDijyVQ4v8lUOLvJVDkMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVQ5DAjUeTfJVHj/yNR5N8kUONAAAAAACVQ5DAmUuOAJVHivyNR5N8lUeP/JVHj/yNR5N8lUeK/JlLjgCVQ5DAAAAAAJFDjQCNR5N8lUeP/I1Hk3yVQ5DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBQ3xAjUuSfJVHk/yVR5P8jUeTfJFLkcChQ5yAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoUOcgJFLkcCNR5N8lUeT/JVHk/yNS5J8gUN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkUONAI1LknyVS5P8lUuT/JVLk/yVS5O8lUeS/JVHkvyVR5L8lUeS/JVLk7yVS5P8lUuT/JVLk/yRS468kUONAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIFDfECVS5GAjUuWfIlPlzyVS5f8lUuX/JVLl/yVS5f8iU+XPI1LlnyVS5GAgUN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/AA///AAD//AAAP/ggBB/wgAEP4AAAB8AAAAPAAAADiAAAEYAAAAEQAAAIAAAAAAAAAAAgAAAEIAAABCAAAAQgAAAEIAAABCAAAAQAAAAAAAAAABAAAAiAAAABiAAAEcAAAAPAAAAD4AAAB/CAAQ/4IAQf/AfgP/8AAP//wAP/</Image> -+ <Image height="26" width="65">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAAAaCAYAAADovjFxAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoxNTg5QTM3RjNCMjA2ODExODIyQUVEOUNBRDIxQzhDMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxRTYyNzYzMzFBQUUxMUU0ODc3NTg3NjMyNDFCNzExQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxRTYyNzYzMjFBQUUxMUU0ODc3NTg3NjMyNDFCNzExQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDE4MDExNzQwNzIwNjgxMTg3MUZCQUIxMEI4RjU1NzYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTU4OUEzN0YzQjIwNjgxMTgyMkFFRDlDQUQyMUM4QzMiLz4gPC9yZGY6RGVzY3Jp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</Image> -+ <Image height="52" width="130">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAA0CAYAAABGkOCVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoxNTg5QTM3RjNCMjA2ODExODIyQUVEOUNBRDIxQzhDMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4RTdBNDY4ODFBQUQxMUU0ODc3NTg3NjMyNDFCNzExQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4RTdBNDY4NzFBQUQxMUU0ODc3NTg3NjMyNDFCNzExQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTE3MzgzQ0I2QjIwNjgxMTgyMkFFRDlDQUQyMUM4QzMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTU4OUEzN0YzQjIwNjgxMTgyMkFFRDlDQUQyMUM4QzMiLz4gPC9yZGY6RGVzY3Jp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</Image> -+ <Url type="text/html" method="get" template="https://duckduckgo.com/"> -+ <Param name="q" value="{searchTerms}"/> -+ <MozParam name="t" condition="purpose" purpose="contextmenu" value="ffcm"/> -+ <MozParam name="t" condition="purpose" purpose="keyword" value="ffab"/> -+ <MozParam name="t" condition="purpose" purpose="searchbar" value="ffsb"/> -+ <MozParam name="t" condition="purpose" purpose="homepage" value="ffhp"/> -+ <MozParam name="t" condition="purpose" purpose="newtab" value="ffnt"/> -+ </Url> -+ <Url type="application/x-suggestions+json" template="https://ac.duckduckgo.com/ac/"> -+ <Param name="q" value="{searchTerms}"/> -+ <Param name="type" value="list"/> -+ </Url> -+</OpenSearchDescription> diff --git a/www/libxul/files/patch-bug1067377 b/www/libxul/files/patch-bug1067377 deleted file mode 100644 index 898af08b7cab..000000000000 --- a/www/libxul/files/patch-bug1067377 +++ /dev/null @@ -1,78 +0,0 @@ -diff --git content/media/encoder/VP8TrackEncoder.cpp content/media/encoder/VP8TrackEncoder.cpp -index 452821c..ede21c5 100644 ---- content/media/encoder/VP8TrackEncoder.cpp -+++ content/media/encoder/VP8TrackEncoder.cpp -@@ -84,7 +84,7 @@ VP8TrackEncoder::Init(int32_t aWidth, int32_t aHeight, int32_t aDisplayWidth, - // Creating a wrapper to the image - setting image data to NULL. Actual - // pointer will be set in encode. Setting align to 1, as it is meaningless - // (actual memory is not allocated). -- vpx_img_wrap(mVPXImageWrapper, IMG_FMT_I420, -+ vpx_img_wrap(mVPXImageWrapper, VPX_IMG_FMT_I420, - mFrameWidth, mFrameHeight, 1, nullptr); - - config.g_w = mFrameWidth; -@@ -239,9 +239,9 @@ void VP8TrackEncoder::PrepareMutedFrame() - uint8_t *cb = mMuteFrame.Elements() + yPlaneSize; - uint8_t *cr = mMuteFrame.Elements() + yPlaneSize + uvPlaneSize; - -- mVPXImageWrapper->planes[PLANE_Y] = y; -- mVPXImageWrapper->planes[PLANE_U] = cb; -- mVPXImageWrapper->planes[PLANE_V] = cr; -+ mVPXImageWrapper->planes[VPX_PLANE_Y] = y; -+ mVPXImageWrapper->planes[VPX_PLANE_U] = cb; -+ mVPXImageWrapper->planes[VPX_PLANE_V] = cr; - mVPXImageWrapper->stride[VPX_PLANE_Y] = mFrameWidth; - mVPXImageWrapper->stride[VPX_PLANE_U] = halfWidth; - mVPXImageWrapper->stride[VPX_PLANE_V] = halfWidth; -@@ -297,9 +297,9 @@ nsresult VP8TrackEncoder::PrepareRawFrame(VideoChunk &aChunk) - const PlanarYCbCrImage::Data *data = yuv->GetData(); - - if (isYUV420(data) && !data->mCbSkip) { // 420 planar -- mVPXImageWrapper->planes[PLANE_Y] = data->mYChannel; -- mVPXImageWrapper->planes[PLANE_U] = data->mCbChannel; -- mVPXImageWrapper->planes[PLANE_V] = data->mCrChannel; -+ mVPXImageWrapper->planes[VPX_PLANE_Y] = data->mYChannel; -+ mVPXImageWrapper->planes[VPX_PLANE_U] = data->mCbChannel; -+ mVPXImageWrapper->planes[VPX_PLANE_V] = data->mCrChannel; - mVPXImageWrapper->stride[VPX_PLANE_Y] = data->mYStride; - mVPXImageWrapper->stride[VPX_PLANE_U] = data->mCbCrStride; - mVPXImageWrapper->stride[VPX_PLANE_V] = data->mCbCrStride; -@@ -355,9 +355,9 @@ nsresult VP8TrackEncoder::PrepareRawFrame(VideoChunk &aChunk) - return NS_ERROR_NOT_IMPLEMENTED; - } - -- mVPXImageWrapper->planes[PLANE_Y] = y; -- mVPXImageWrapper->planes[PLANE_U] = cb; -- mVPXImageWrapper->planes[PLANE_V] = cr; -+ mVPXImageWrapper->planes[VPX_PLANE_Y] = y; -+ mVPXImageWrapper->planes[VPX_PLANE_U] = cb; -+ mVPXImageWrapper->planes[VPX_PLANE_V] = cr; - mVPXImageWrapper->stride[VPX_PLANE_Y] = mFrameWidth; - mVPXImageWrapper->stride[VPX_PLANE_U] = halfWidth; - mVPXImageWrapper->stride[VPX_PLANE_V] = halfWidth; -diff --git media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc -index d9c3a22..75195ae 100644 ---- media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc -+++ media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc -@@ -180,7 +180,7 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst, - // Creating a wrapper to the image - setting image data to NULL. Actual - // pointer will be set in encode. Setting align to 1, as it is meaningless - // (actual memory is not allocated). -- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height, -+ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, - 1, NULL); - // populate encoder configuration with default values - if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) { -@@ -349,9 +349,9 @@ int VP8EncoderImpl::Encode(const I420VideoFrame& input_image, - } - // Image in vpx_image_t format. - // Input image is const. VP8's raw image is not defined as const. -- raw_->planes[PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane)); -- raw_->planes[PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane)); -- raw_->planes[PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane)); -+ raw_->planes[VPX_PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane)); -+ raw_->planes[VPX_PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane)); -+ raw_->planes[VPX_PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane)); - // TODO(mikhal): Stride should be set in initialization. - raw_->stride[VPX_PLANE_Y] = input_image.stride(kYPlane); - raw_->stride[VPX_PLANE_U] = input_image.stride(kUPlane); diff --git a/www/libxul/files/patch-bug1073117 b/www/libxul/files/patch-bug1073117 new file mode 100644 index 000000000000..7708023aee70 --- /dev/null +++ b/www/libxul/files/patch-bug1073117 @@ -0,0 +1,877 @@ +diff --git widget/gtk/gtk2drawing.c widget/gtk/gtk2drawing.c +index 34f22af..1b950ab 100644 +--- widget/gtk/gtk2drawing.c ++++ widget/gtk/gtk2drawing.c +@@ -831,7 +831,7 @@ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) + return MOZ_GTK_SUCCESS; + } + +-gint ++static gint + moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, + gint* focus_width, gint* focus_pad) + { +@@ -928,7 +928,7 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size) + return MOZ_GTK_SUCCESS; + } + +-gint ++static gint + moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border) + { + static const GtkBorder default_inner_border = { 1, 1, 1, 1 }; +diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c +index 08a58d6..7fef6fa 100644 +--- widget/gtk/gtk3drawing.c ++++ widget/gtk/gtk3drawing.c +@@ -65,6 +65,7 @@ static GtkWidget* gScrolledWindowWidget; + static style_prop_t style_prop_func; + static gboolean have_arrow_scaling; + static gboolean checkbox_check_state; ++static gboolean notebook_has_tab_gap; + static gboolean is_initialized; + + #define ARROW_UP 0 +@@ -725,6 +726,14 @@ moz_gtk_init() + else + checkbox_check_state = GTK_STATE_FLAG_ACTIVE; + ++ if(!gtk_check_version(3, 12, 0)) { ++ ensure_tab_widget(); ++ gtk_widget_style_get(gTabWidget, "has-tab-gap", ¬ebook_has_tab_gap, NULL); ++ } ++ else { ++ notebook_has_tab_gap = TRUE; ++ } ++ + /* Add style property to GtkEntry. + * Adding the style property to the normal GtkEntry class means that it + * will work without issues inside GtkComboBox and for Spinbuttons. */ +@@ -762,37 +771,17 @@ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing) + gint + moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) + { +- gboolean interior_focus; +- gint focus_width = 0; ++ GtkBorder border; ++ GtkBorder padding; ++ GtkStyleContext *style; + + ensure_entry_widget(); +- gtk_widget_style_get(gEntryWidget, +- "interior-focus", &interior_focus, +- "focus-line-width", &focus_width, +- NULL); +- if (interior_focus) { +- GtkBorder border; +- GtkStyleContext *style = gtk_widget_get_style_context(gEntryWidget); +- gtk_style_context_get_border(style, 0, &border); +- *focus_h_width = border.left + focus_width; +- *focus_v_width = border.top + focus_width; +- } else { +- *focus_h_width = focus_width; +- *focus_v_width = focus_width; +- } +- return MOZ_GTK_SUCCESS; +-} +- +-gint +-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, +- gint* focus_width, gint* focus_pad) +-{ +- gtk_widget_style_get (widget, +- "interior-focus", interior_focus, +- "focus-line-width", focus_width, +- "focus-padding", focus_pad, +- NULL); ++ style = gtk_widget_get_style_context(gEntryWidget); + ++ gtk_style_context_get_border(style, 0, &border); ++ gtk_style_context_get_padding(style, 0, &padding); ++ *focus_h_width = border.left + padding.left; ++ *focus_v_width = border.top + padding.top; + return MOZ_GTK_SUCCESS; + } + +@@ -880,24 +860,6 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size) + return MOZ_GTK_SUCCESS; + } + +-gint +-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border) +-{ +- static const GtkBorder default_inner_border = { 1, 1, 1, 1 }; +- GtkBorder *tmp_border; +- +- gtk_widget_style_get (widget, "inner-border", &tmp_border, NULL); +- +- if (tmp_border) { +- *inner_border = *tmp_border; +- gtk_border_free(tmp_border); +- } +- else +- *inner_border = default_inner_border; +- +- return MOZ_GTK_SUCCESS; +-} +- + static gint + moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, + GtkWidgetState* state, +@@ -908,19 +870,8 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, + GtkStyleContext* style = gtk_widget_get_style_context(widget); + gint x = rect->x, y=rect->y, width=rect->width, height=rect->height; + +- gboolean interior_focus; +- gint focus_width, focus_pad; +- +- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad); + gtk_widget_set_direction(widget, direction); +- +- if (!interior_focus && state->focused) { +- x += focus_width + focus_pad; +- y += focus_width + focus_pad; +- width -= 2 * (focus_width + focus_pad); +- height -= 2 * (focus_width + focus_pad); +- } +- ++ + gtk_style_context_save(style); + gtk_style_context_set_state(style, state_flags); + +@@ -953,20 +904,12 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, + } + + if (state->focused) { +- if (interior_focus) { +- GtkBorder border; +- gtk_style_context_get_border(style, state_flags, &border); +- x += border.left + focus_pad; +- y += border.top + focus_pad; +- width -= 2 * (border.left + focus_pad); +- height -= 2 * (border.top + focus_pad); +- } else { +- x -= focus_width + focus_pad; +- y -= focus_width + focus_pad; +- width += 2 * (focus_width + focus_pad); +- height += 2 * (focus_width + focus_pad); +- } +- ++ GtkBorder border; ++ gtk_style_context_get_border(style, state_flags, &border); ++ x += border.left; ++ y += border.top; ++ width -= (border.left + border.right); ++ height -= (border.top + border.bottom); + gtk_render_focus(style, cr, x, y, width, height); + } + gtk_style_context_restore(style); +@@ -1056,33 +999,23 @@ calculate_button_inner_rect(GtkWidget* button, GdkRectangle* rect, + GtkTextDirection direction, + gboolean ignore_focus) + { +- GtkBorder inner_border; +- gboolean interior_focus; +- gint focus_width, focus_pad; + GtkStyleContext* style; + GtkBorder border; ++ GtkBorder padding = {0, 0, 0, 0}; + + style = gtk_widget_get_style_context(button); + + /* This mirrors gtkbutton's child positioning */ +- moz_gtk_button_get_inner_border(button, &inner_border); +- moz_gtk_widget_get_focus(button, &interior_focus, +- &focus_width, &focus_pad); +- +- if (ignore_focus) +- focus_width = focus_pad = 0; +- + gtk_style_context_get_border(style, 0, &border); ++ if (!ignore_focus) ++ gtk_style_context_get_padding(style, 0, &padding); + +- inner_rect->x = rect->x + border.left + focus_width + focus_pad; +- inner_rect->x += direction == GTK_TEXT_DIR_LTR ? +- inner_border.left : inner_border.right; +- inner_rect->y = rect->y + inner_border.top + border.top + +- focus_width + focus_pad; +- inner_rect->width = MAX(1, rect->width - inner_border.left - +- inner_border.right - (border.left + focus_pad + focus_width) * 2); +- inner_rect->height = MAX(1, rect->height - inner_border.top - +- inner_border.bottom - (border.top + focus_pad + focus_width) * 2); ++ inner_rect->x = rect->x + border.left + padding.left; ++ inner_rect->y = rect->y + padding.top + border.top; ++ inner_rect->width = MAX(1, rect->width - padding.left - ++ padding.right - border.left * 2); ++ inner_rect->height = MAX(1, rect->height - padding.top - ++ padding.bottom - border.top * 2); + + return MOZ_GTK_SUCCESS; + } +@@ -1457,19 +1390,12 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, + { + gint x = rect->x, y = rect->y, width = rect->width, height = rect->height; + GtkStyleContext* style; +- gboolean interior_focus; +- gint focus_width; + int draw_focus_outline_only = state->depressed; // NS_THEME_FOCUS_OUTLINE + + gtk_widget_set_direction(widget, direction); + + style = gtk_widget_get_style_context(widget); + +- gtk_widget_style_get(widget, +- "interior-focus", &interior_focus, +- "focus-line-width", &focus_width, +- NULL); +- + if (draw_focus_outline_only) { + // Inflate the given 'rect' with the focus outline size. + gint h, v; +@@ -1501,14 +1427,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, + /* This will get us the lit borders that focused textboxes enjoy on + * some themes. */ + gtk_style_context_set_state(style, GTK_STATE_FLAG_FOCUSED); +- if (!interior_focus) { +- /* Indent the border a little bit if we have exterior focus +- (this is what GTK does to draw native entries) */ +- x += focus_width; +- y += focus_width; +- width -= 2 * focus_width; +- height -= 2 * focus_width; +- } + } + + if (state->disabled) { +@@ -1520,11 +1438,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect, + } + gtk_render_frame(style, cr, x, y, width, height); + +- if (state->focused && !state->disabled) { +- if (!interior_focus) { +- gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height); +- } +- } + gtk_style_context_restore(style); + + return MOZ_GTK_SUCCESS; +@@ -1829,8 +1742,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, + GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); + GtkStyleContext* style; + GtkWidget *widget; +- gboolean interior_focus; +- gint focus_width, focus_pad; + + if (isradio) { + ensure_radiobutton_widget(); +@@ -1843,7 +1754,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, + + style = gtk_widget_get_style_context(widget); + gtk_style_context_save(style); +- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad); + gtk_style_context_set_state(style, state_flags); + + /* this is for drawing a prelight box */ +@@ -1852,10 +1762,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect, + rect->x, rect->y, rect->width, rect->height); + } + +- if (state->focused && !interior_focus) { +- gtk_render_focus(style, cr, +- rect->x, rect->y, rect->width, rect->height); +- } + gtk_style_context_restore(style); + + return MOZ_GTK_SUCCESS; +@@ -1868,7 +1774,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect, + { + GtkStyleContext *style; + GtkWidget *widget; +- gboolean interior_focus; + + if (!state->focused) + return MOZ_GTK_SUCCESS; +@@ -1889,10 +1794,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect, + } + gtk_widget_set_direction(widget, direction); + +- gtk_widget_style_get(widget, "interior-focus", &interior_focus, NULL); +- if (!interior_focus) +- return MOZ_GTK_SUCCESS; +- + gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state)); + gtk_render_focus(style, cr, + rect->x, rect->y, rect->width, rect->height); +@@ -2105,6 +2015,9 @@ moz_gtk_get_tab_thickness(void) + GtkStyleContext * style; + + ensure_tab_widget(); ++ if (!notebook_has_tab_gap) ++ return 0; /* tabs do not overdraw the tabpanel border with "no gap" style */ ++ + style = gtk_widget_get_style_context(gTabWidget); + gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK); + gtk_style_context_get_border(style, 0, &border); +@@ -2150,7 +2063,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect, + ensure_tab_widget(); + gtk_widget_set_direction(gTabWidget, direction); + +- style = gtk_widget_get_style_context(gTabWidget); ++ style = gtk_widget_get_style_context(gTabWidget); + gtk_style_context_save(style); + moz_gtk_tab_prepare_style_context(style, flags); + +@@ -2167,143 +2080,155 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect, + + focusRect = backRect = tabRect; + +- if ((flags & MOZ_GTK_TAB_SELECTED) == 0) { +- /* Only draw the tab */ +- gtk_render_extension(style, cr, +- tabRect.x, tabRect.y, tabRect.width, tabRect.height, +- (flags & MOZ_GTK_TAB_BOTTOM) ? +- GTK_POS_TOP : GTK_POS_BOTTOM ); +- } else { +- /* Draw the tab and the gap +- * We want the gap to be positioned exactly on the tabpanel top +- * border; since tabbox.css may set a negative margin so that the tab +- * frame rect already overlaps the tabpanel frame rect, we need to take +- * that into account when drawing. To that effect, nsNativeThemeGTK +- * passes us this negative margin (bmargin in the graphic below) in the +- * lowest bits of |flags|. We use it to set gap_voffset, the distance +- * between the top of the gap and the bottom of the tab (resp. the +- * bottom of the gap and the top of the tab when we draw a bottom tab), +- * while ensuring that the gap always touches the border of the tab, +- * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results +- * with big negative or positive margins. +- * Here is a graphical explanation in the case of top tabs: +- * ___________________________ +- * / \ +- * | T A B | +- * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel +- * : ^ bmargin : ^ +- * : | (-negative margin, : | +- * bottom : v passed in flags) : | gap_height +- * of -> :.............................: | (the size of the +- * the tab . part of the gap . | tabpanel top border) +- * . outside of the tab . v +- * ---------------------------------------------- +- * +- * To draw the gap, we use gtk_paint_box_gap(), see comment in +- * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall, +- * which should suffice to ensure that the only visible border is the +- * pierced one. If the tab is in the middle, we make the box_gap begin +- * a bit to the left of the tab and end a bit to the right, adjusting +- * the gap position so it still is under the tab, because we want the +- * rendering of a gap in the middle of a tabpanel. This is the role of +- * the gints gap_{l,r}_offset. On the contrary, if the tab is the +- * first, we align the start border of the box_gap with the start +- * border of the tab (left if LTR, right if RTL), by setting the +- * appropriate offset to 0.*/ +- gint gap_loffset, gap_roffset, gap_voffset, gap_height; +- +- /* Get height needed by the gap */ +- gap_height = moz_gtk_get_tab_thickness(); +- +- /* Extract gap_voffset from the first bits of flags */ +- gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK; +- if (gap_voffset > gap_height) +- gap_voffset = gap_height; +- +- /* Set gap_{l,r}_offset to appropriate values */ +- gap_loffset = gap_roffset = 20; /* should be enough */ +- if (flags & MOZ_GTK_TAB_FIRST) { +- if (direction == GTK_TEXT_DIR_RTL) +- gap_roffset = initial_gap; +- else +- gap_loffset = initial_gap; +- } +- +- if (flags & MOZ_GTK_TAB_BOTTOM) { +- /* Draw the tab on bottom */ +- focusRect.y += gap_voffset; +- focusRect.height -= gap_voffset; +- ++ if (notebook_has_tab_gap) { ++ if ((flags & MOZ_GTK_TAB_SELECTED) == 0) { ++ /* Only draw the tab */ + gtk_render_extension(style, cr, +- tabRect.x, tabRect.y + gap_voffset, tabRect.width, +- tabRect.height - gap_voffset, GTK_POS_TOP); +- +- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB); +- +- backRect.y += (gap_voffset - gap_height); +- backRect.height = gap_height; +- +- /* Draw the gap; erase with background color before painting in +- * case theme does not */ +- gtk_render_background(style, cr, backRect.x, backRect.y, +- backRect.width, backRect.height); +- cairo_save(cr); +- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height); +- cairo_clip(cr); +- +- gtk_render_frame_gap(style, cr, +- tabRect.x - gap_loffset, +- tabRect.y + gap_voffset - 3 * gap_height, +- tabRect.width + gap_loffset + gap_roffset, +- 3 * gap_height, GTK_POS_BOTTOM, +- gap_loffset, gap_loffset + tabRect.width); +- cairo_restore(cr); ++ tabRect.x, tabRect.y, tabRect.width, tabRect.height, ++ (flags & MOZ_GTK_TAB_BOTTOM) ? ++ GTK_POS_TOP : GTK_POS_BOTTOM ); + } else { +- /* Draw the tab on top */ +- focusRect.height -= gap_voffset; +- gtk_render_extension(style, cr, +- tabRect.x, tabRect.y, tabRect.width, +- tabRect.height - gap_voffset, GTK_POS_BOTTOM); +- +- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB); +- +- backRect.y += (tabRect.height - gap_voffset); +- backRect.height = gap_height; +- +- /* Draw the gap; erase with background color before painting in +- * case theme does not */ +- gtk_render_background(style, cr, backRect.x, backRect.y, +- backRect.width, backRect.height); +- +- cairo_save(cr); +- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height); +- cairo_clip(cr); +- +- gtk_render_frame_gap(style, cr, +- tabRect.x - gap_loffset, +- tabRect.y + tabRect.height - gap_voffset, +- tabRect.width + gap_loffset + gap_roffset, +- 3 * gap_height, GTK_POS_TOP, +- gap_loffset, gap_loffset + tabRect.width); +- cairo_restore(cr); ++ /* Draw the tab and the gap ++ * We want the gap to be positioned exactly on the tabpanel top ++ * border; since tabbox.css may set a negative margin so that the tab ++ * frame rect already overlaps the tabpanel frame rect, we need to take ++ * that into account when drawing. To that effect, nsNativeThemeGTK ++ * passes us this negative margin (bmargin in the graphic below) in the ++ * lowest bits of |flags|. We use it to set gap_voffset, the distance ++ * between the top of the gap and the bottom of the tab (resp. the ++ * bottom of the gap and the top of the tab when we draw a bottom tab), ++ * while ensuring that the gap always touches the border of the tab, ++ * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results ++ * with big negative or positive margins. ++ * Here is a graphical explanation in the case of top tabs: ++ * ___________________________ ++ * / \ ++ * | T A B | ++ * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel ++ * : ^ bmargin : ^ ++ * : | (-negative margin, : | ++ * bottom : v passed in flags) : | gap_height ++ * of -> :.............................: | (the size of the ++ * the tab . part of the gap . | tabpanel top border) ++ * . outside of the tab . v ++ * ---------------------------------------------- ++ * ++ * To draw the gap, we use gtk_paint_box_gap(), see comment in ++ * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall, ++ * which should suffice to ensure that the only visible border is the ++ * pierced one. If the tab is in the middle, we make the box_gap begin ++ * a bit to the left of the tab and end a bit to the right, adjusting ++ * the gap position so it still is under the tab, because we want the ++ * rendering of a gap in the middle of a tabpanel. This is the role of ++ * the gints gap_{l,r}_offset. On the contrary, if the tab is the ++ * first, we align the start border of the box_gap with the start ++ * border of the tab (left if LTR, right if RTL), by setting the ++ * appropriate offset to 0.*/ ++ gint gap_loffset, gap_roffset, gap_voffset, gap_height; ++ ++ /* Get height needed by the gap */ ++ gap_height = moz_gtk_get_tab_thickness(); ++ ++ /* Extract gap_voffset from the first bits of flags */ ++ gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK; ++ if (gap_voffset > gap_height) ++ gap_voffset = gap_height; ++ ++ /* Set gap_{l,r}_offset to appropriate values */ ++ gap_loffset = gap_roffset = 20; /* should be enough */ ++ if (flags & MOZ_GTK_TAB_FIRST) { ++ if (direction == GTK_TEXT_DIR_RTL) ++ gap_roffset = initial_gap; ++ else ++ gap_loffset = initial_gap; ++ } ++ ++ if (flags & MOZ_GTK_TAB_BOTTOM) { ++ /* Draw the tab on bottom */ ++ focusRect.y += gap_voffset; ++ focusRect.height -= gap_voffset; ++ ++ gtk_render_extension(style, cr, ++ tabRect.x, tabRect.y + gap_voffset, tabRect.width, ++ tabRect.height - gap_voffset, GTK_POS_TOP); ++ ++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB); ++ ++ backRect.y += (gap_voffset - gap_height); ++ backRect.height = gap_height; ++ ++ /* Draw the gap; erase with background color before painting in ++ * case theme does not */ ++ gtk_render_background(style, cr, backRect.x, backRect.y, ++ backRect.width, backRect.height); ++ cairo_save(cr); ++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height); ++ cairo_clip(cr); ++ ++ gtk_render_frame_gap(style, cr, ++ tabRect.x - gap_loffset, ++ tabRect.y + gap_voffset - 3 * gap_height, ++ tabRect.width + gap_loffset + gap_roffset, ++ 3 * gap_height, GTK_POS_BOTTOM, ++ gap_loffset, gap_loffset + tabRect.width); ++ cairo_restore(cr); ++ } else { ++ /* Draw the tab on top */ ++ focusRect.height -= gap_voffset; ++ gtk_render_extension(style, cr, ++ tabRect.x, tabRect.y, tabRect.width, ++ tabRect.height - gap_voffset, GTK_POS_BOTTOM); ++ ++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB); ++ ++ backRect.y += (tabRect.height - gap_voffset); ++ backRect.height = gap_height; ++ ++ /* Draw the gap; erase with background color before painting in ++ * case theme does not */ ++ gtk_render_background(style, cr, backRect.x, backRect.y, ++ backRect.width, backRect.height); ++ ++ cairo_save(cr); ++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height); ++ cairo_clip(cr); ++ ++ gtk_render_frame_gap(style, cr, ++ tabRect.x - gap_loffset, ++ tabRect.y + tabRect.height - gap_voffset, ++ tabRect.width + gap_loffset + gap_roffset, ++ 3 * gap_height, GTK_POS_TOP, ++ gap_loffset, gap_loffset + tabRect.width); ++ cairo_restore(cr); ++ } + } ++ } else { ++ gtk_render_background(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height); ++ gtk_render_frame(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height); + } + ++ gtk_style_context_restore(style); ++ + if (state->focused) { + /* Paint the focus ring */ +- GtkBorder border; +- gtk_style_context_get_border(style, GetStateFlagsFromGtkWidgetState(state), &border); ++ GtkBorder padding; ++ ++ gtk_style_context_save(style); ++ moz_gtk_tab_prepare_style_context(style, flags); + +- focusRect.x += border.left; +- focusRect.width -= (border.left + border.right); +- focusRect.y += border.top; +- focusRect.height -= (border.top + border.bottom); ++ gtk_style_context_get_padding(style, GetStateFlagsFromGtkWidgetState(state), &padding); ++ ++ focusRect.x += padding.left; ++ focusRect.width -= (padding.left + padding.right); ++ focusRect.y += padding.top; ++ focusRect.height -= (padding.top + padding.bottom); + + gtk_render_focus(style, cr, + focusRect.x, focusRect.y, focusRect.width, focusRect.height); ++ ++ gtk_style_context_restore(style); + } + +- gtk_style_context_restore(style); + + return MOZ_GTK_SUCCESS; + } +@@ -2684,26 +2609,18 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + switch (widget) { + case MOZ_GTK_BUTTON: + { +- GtkBorder inner_border; +- gboolean interior_focus; +- gint focus_width, focus_pad; +- + ensure_button_widget(); ++ style = gtk_widget_get_style_context(gButtonWidget); ++ + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget)); + + /* Don't add this padding in HTML, otherwise the buttons will + become too big and stuff the layout. */ + if (!inhtml) { +- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad); +- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border); +- *left += focus_width + focus_pad + inner_border.left; +- *right += focus_width + focus_pad + inner_border.right; +- *top += focus_width + focus_pad + inner_border.top; +- *bottom += focus_width + focus_pad + inner_border.bottom; ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + } + +- moz_gtk_add_style_border(gtk_widget_get_style_context(gButtonWidget), +- left, top, right, bottom); ++ moz_gtk_add_style_border(style, left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_ENTRY: +@@ -2717,7 +2610,13 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + ensure_entry_widget(); + style = gtk_widget_get_style_context(gEntryWidget); + moz_gtk_add_style_border(style, left, top, right, bottom); +- moz_gtk_add_style_padding(style, left, top, right, bottom); ++ ++ /* Use the document padding in HTML ++ and GTK style padding in XUL. */ ++ if (!inhtml) { ++ moz_gtk_add_style_padding(style, left, top, right, bottom); ++ } ++ + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_TREEVIEW: +@@ -2737,23 +2636,15 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + * assigned. + * That is why the following code is the same as for MOZ_GTK_BUTTON. + * */ +- +- GtkBorder inner_border; +- gboolean interior_focus; +- gint focus_width, focus_pad; ++ GtkStyleContext *style; + + ensure_tree_header_cell_widget(); + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gTreeHeaderCellWidget)); + +- moz_gtk_widget_get_focus(gTreeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad); +- moz_gtk_button_get_inner_border(gTreeHeaderCellWidget, &inner_border); +- *left += focus_width + focus_pad + inner_border.left; +- *right += focus_width + focus_pad + inner_border.right; +- *top += focus_width + focus_pad + inner_border.top; +- *bottom += focus_width + focus_pad + inner_border.bottom; +- +- moz_gtk_add_style_border(gtk_widget_get_style_context(gTreeHeaderCellWidget), +- left, top, right, bottom); ++ style = gtk_widget_get_style_context(gTreeHeaderCellWidget); ++ ++ moz_gtk_add_style_border(style, left, top, right, bottom); ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_TREE_HEADER_SORTARROW: +@@ -2773,29 +2664,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + /* We need to account for the arrow on the dropdown, so text + * doesn't come too close to the arrow, or in some cases spill + * into the arrow. */ +- gboolean ignored_interior_focus, wide_separators; +- gint focus_width, focus_pad, separator_width; ++ gboolean wide_separators; ++ gint separator_width; + GtkRequisition arrow_req; + GtkBorder border; + + ensure_combo_box_widgets(); + +- *left = gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget)); ++ *left = *top = *right = *bottom = ++ gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget)); ++ ++ style = gtk_widget_get_style_context(gComboBoxButtonWidget); + + if (!inhtml) { +- moz_gtk_widget_get_focus(gComboBoxButtonWidget, +- &ignored_interior_focus, +- &focus_width, &focus_pad); +- *left += focus_width + focus_pad; ++ moz_gtk_add_style_padding(style, left, top, right, bottom); + } + +- style = gtk_widget_get_style_context(gComboBoxButtonWidget); +- gtk_style_context_get_border(style, 0, &border); +- +- *top = *left + border.top; +- *left += border.left; +- +- *right = *left; *bottom = *top; ++ moz_gtk_add_style_border(style, left, top, right, bottom); + + /* If there is no separator, don't try to count its width. */ + separator_width = 0; +@@ -2847,60 +2732,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + ensure_frame_widget(); + w = gFrameWidget; + break; +- case MOZ_GTK_CHECKBUTTON_LABEL: +- case MOZ_GTK_RADIOBUTTON_LABEL: +- { +- gboolean interior_focus; +- gint focus_width, focus_pad; +- +- /* If the focus is interior, then the label has a border of +- (focus_width + focus_pad). */ +- if (widget == MOZ_GTK_CHECKBUTTON_LABEL) { +- ensure_checkbox_widget(); +- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus, +- &focus_width, &focus_pad); +- } +- else { +- ensure_radiobutton_widget(); +- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus, +- &focus_width, &focus_pad); +- } +- +- if (interior_focus) +- *left = *top = *right = *bottom = (focus_width + focus_pad); +- +- return MOZ_GTK_SUCCESS; +- } +- + case MOZ_GTK_CHECKBUTTON_CONTAINER: + case MOZ_GTK_RADIOBUTTON_CONTAINER: + { +- gboolean interior_focus; +- gint focus_width, focus_pad; +- +- /* If the focus is _not_ interior, then the container has a border +- of (focus_width + focus_pad). */ + if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) { + ensure_checkbox_widget(); +- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus, +- &focus_width, &focus_pad); + w = gCheckboxWidget; + } else { + ensure_radiobutton_widget(); +- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus, +- &focus_width, &focus_pad); + w = gRadiobuttonWidget; + } ++ style = gtk_widget_get_style_context(w); + + *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w)); +- +- if (!interior_focus) { +- *left += (focus_width + focus_pad); +- *right += (focus_width + focus_pad); +- *top += (focus_width + focus_pad); +- *bottom += (focus_width + focus_pad); +- } +- ++ moz_gtk_add_style_border(style, ++ left, top, right, bottom); ++ moz_gtk_add_style_padding(style, ++ left, top, right, bottom); + return MOZ_GTK_SUCCESS; + } + case MOZ_GTK_MENUPOPUP: +@@ -2927,6 +2775,8 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, + return MOZ_GTK_SUCCESS; + } + /* These widgets have no borders, since they are not containers. */ ++ case MOZ_GTK_CHECKBUTTON_LABEL: ++ case MOZ_GTK_RADIOBUTTON_LABEL: + case MOZ_GTK_SPLITTER_HORIZONTAL: + case MOZ_GTK_SPLITTER_VERTICAL: + case MOZ_GTK_CHECKBUTTON: +@@ -2975,11 +2849,7 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom, + gtk_style_context_save(style); + moz_gtk_tab_prepare_style_context(style, flags); + +- // TODO add_style_border() should be replaced +- // with focus-line-width and focus-padding +- // see Bug 877605 + *left = *top = *right = *bottom = 0; +- moz_gtk_add_style_border(style, left, top, right, bottom); + moz_gtk_add_style_padding(style, left, top, right, bottom); + + gtk_widget_style_get (gTabWidget, "tab-curvature", &tab_curvature, NULL); +@@ -2990,16 +2860,9 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom, + int initial_gap; + gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL); + if (direction == GTK_TEXT_DIR_RTL) +- *right += initial_gap; ++ *right += initial_gap; + else +- *left += initial_gap; +- } +- +- // Top tabs have no bottom border, bottom tabs have no top border +- if (flags & MOZ_GTK_TAB_BOTTOM) { +- *top = 0; +- } else { +- *bottom = 0; ++ *left += initial_gap; + } + + gtk_style_context_restore(style); +diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h +index 1938e8f..5f71cfd 100644 +--- widget/gtk/gtkdrawing.h ++++ widget/gtk/gtkdrawing.h +@@ -293,16 +293,6 @@ moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing); + gint + moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing); + +-/** +- * Get the inner-border value for a GtkButton widget (button or tree header) +- * widget: [IN] the widget to get the border value for +- * inner_border: [OUT] the inner border +- * +- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise +- */ +-gint +-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border); +- + /** Get the extra size for the focus ring for outline:auto. + * widget: [IN] the widget to get the focus metrics for + * focus_h_width: [OUT] the horizontal width +@@ -313,19 +303,6 @@ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border); + gint + moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width); + +-/** Get the focus metrics for a treeheadercell, button, checkbox, or radio button. +- * widget: [IN] the widget to get the focus metrics for +- * interior_focus: [OUT] whether the focus is drawn around the +- * label (TRUE) or around the whole container (FALSE) +- * focus_width: [OUT] the width of the focus line +- * focus_pad: [OUT] the padding between the focus line and children +- * +- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise +- */ +-gint +-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, +- gint* focus_width, gint* focus_pad); +- + /** Get the horizontal padding for the menuitem widget or checkmenuitem widget. + * horizontal_padding: [OUT] The left and right padding of the menuitem or checkmenuitem + * +diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp +index e5e1867..76d28e3 100644 +--- widget/gtk/nsNativeThemeGTK.cpp ++++ widget/gtk/nsNativeThemeGTK.cpp +@@ -761,6 +761,8 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType, + return false; + + gint gap_height = moz_gtk_get_tab_thickness(); ++ if (!gap_height) ++ return false; + + int32_t extra = gap_height - GetTabMarginPixels(aFrame); + if (extra <= 0) diff --git a/www/libxul/files/patch-bug1073709 b/www/libxul/files/patch-bug1073709 deleted file mode 100644 index f011d7438ad0..000000000000 --- a/www/libxul/files/patch-bug1073709 +++ /dev/null @@ -1,18 +0,0 @@ -diff --git mfbt/Atomics.h mfbt/Atomics.h -index 495a9d3..c7f7601 100644 ---- mfbt/Atomics.h -+++ mfbt/Atomics.h -@@ -34,10 +34,12 @@ - * loose typing of the atomic builtins. GCC 4.5 and 4.6 lacks inline - * definitions for unspecialized std::atomic and causes linking errors. - * Therefore, we require at least 4.7.0 for using libstdc++. -+ * -+ * libc++ <atomic> is only functional with clang. - */ - # if MOZ_USING_LIBSTDCXX && MOZ_LIBSTDCXX_VERSION_AT_LEAST(4, 7, 0) - # define MOZ_HAVE_CXX11_ATOMICS --# elif MOZ_USING_LIBCXX -+# elif MOZ_USING_LIBCXX && defined(__clang__) - # define MOZ_HAVE_CXX11_ATOMICS - # endif - /* diff --git a/www/libxul/files/patch-bug1082199 b/www/libxul/files/patch-bug1082199 deleted file mode 100644 index a10356adaa5b..000000000000 --- a/www/libxul/files/patch-bug1082199 +++ /dev/null @@ -1,26 +0,0 @@ -commit 258ec90 -Author: Guilherme Goncalves <guilherme.p.gonc@gmail.com> -Date: Fri Oct 17 15:55:00 2014 +0200 - - Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium ---- - memory/build/mozjemalloc_compat.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c -index 78bb13a..70265a7 100644 ---- memory/build/mozjemalloc_compat.c -+++ memory/build/mozjemalloc_compat.c -@@ -68,6 +68,12 @@ jemalloc_stats_impl(jemalloc_stats_t *stats) - size_t active, allocated, mapped, page, pdirty; - size_t lg_chunk; - -+ // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in -+ // src/ctl.c -+ uint64_t epoch = 0; -+ size_t esz = sizeof(epoch); -+ int ret = je_(mallctl)("epoch", &epoch, &esz, &epoch, esz); -+ - CTL_GET("arenas.narenas", narenas); - CTL_GET("arenas.page", page); - CTL_GET("stats.active", active); diff --git a/www/libxul/files/patch-bug1103858 b/www/libxul/files/patch-bug1103858 deleted file mode 100644 index 16cfd9973a86..000000000000 --- a/www/libxul/files/patch-bug1103858 +++ /dev/null @@ -1,42 +0,0 @@ -diff --git configure.in configure.in -index b2b45e7..dcfdfb7 100644 ---- configure.in -+++ configure.in -@@ -8346,7 +8346,7 @@ case "$OS_TARGET" in - NECKO_WIFI=1 - fi - ;; -- Darwin|FreeBSD|SunOS|WINNT) -+ Darwin|DragonFly|FreeBSD|SunOS|WINNT) - NECKO_WIFI=1 - ;; - Linux) -diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build -index d4de063..3949380 100644 ---- netwerk/wifi/moz.build -+++ netwerk/wifi/moz.build -@@ -35,7 +35,7 @@ if CONFIG['OS_ARCH'] == 'Darwin': - UNIFIED_SOURCES += [ - 'osx_corewlan.mm', - ] --elif CONFIG['OS_ARCH'] == 'FreeBSD': -+elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'): - UNIFIED_SOURCES += [ - 'nsWifiScannerFreeBSD.cpp', - ] -diff --git netwerk/wifi/nsWifiScannerFreeBSD.cpp netwerk/wifi/nsWifiScannerFreeBSD.cpp -index bdf171e..4185d69 100644 ---- netwerk/wifi/nsWifiScannerFreeBSD.cpp -+++ netwerk/wifi/nsWifiScannerFreeBSD.cpp -@@ -13,7 +13,11 @@ - #include <sys/socket.h> - #include <net/if.h> - #include <net/if_media.h> -+#ifdef __DragonFly__ -+#include <netproto/802_11/ieee80211_ioctl.h> -+#else - #include <net80211/ieee80211_ioctl.h> -+#endif - - #include <ifaddrs.h> - #include <string.h> diff --git a/www/libxul/files/patch-bug1125579 b/www/libxul/files/patch-bug1125579 deleted file mode 100644 index 710e76fa1025..000000000000 --- a/www/libxul/files/patch-bug1125579 +++ /dev/null @@ -1,14 +0,0 @@ ---- js/src/assembler/jit/ExecutableAllocator.h~ -+++ js/src/assembler/jit/ExecutableAllocator.h -@@ -454,6 +454,11 @@ public: - { - User::IMB_Range(code, static_cast<char*>(code) + size); - } -+#elif WTF_CPU_ARM_TRADITIONAL && (WTF_OS_FREEBSD || WTF_OS_NETBSD) -+ static void cacheFlush(void* code, size_t size) -+ { -+ __clear_cache(code, reinterpret_cast<char*>(code) + size); -+ } - #elif WTF_CPU_ARM_TRADITIONAL && WTF_OS_LINUX && WTF_COMPILER_RVCT - static __asm void cacheFlush(void* code, size_t size); - #elif WTF_CPU_ARM_TRADITIONAL && (WTF_OS_LINUX || WTF_OS_ANDROID) && WTF_COMPILER_GCC diff --git a/www/libxul/files/patch-bug1125580 b/www/libxul/files/patch-bug1125580 deleted file mode 100644 index d07ff7782f23..000000000000 --- a/www/libxul/files/patch-bug1125580 +++ /dev/null @@ -1,11 +0,0 @@ ---- js/src/jit/arm/Architecture-arm.cpp~ -+++ js/src/jit/arm/Architecture-arm.cpp -@@ -17,7 +17,7 @@ - - #define HWCAP_USE_HARDFP_ABI (1 << 28) - --#if !(defined(ANDROID) || defined(MOZ_B2G)) && !defined(JS_ARM_SIMULATOR) -+#if defined(__linux__) && !defined(ANDROID) && !defined(MOZ_B2G) && !defined(JS_ARM_SIMULATOR) - #define HWCAP_ARMv7 (1 << 29) - #include <asm/hwcap.h> - #else diff --git a/www/libxul/files/patch-bug1130155 b/www/libxul/files/patch-bug1130155 index 65864eed71c3..34584d42823f 100644 --- a/www/libxul/files/patch-bug1130155 +++ b/www/libxul/files/patch-bug1130155 @@ -82,7 +82,7 @@ index 9bbc129..e72944a 100644 /* This should never happen. */ if ((unsigned int) avail > stm->buffer_size) { -@@ -355,17 +361,67 @@ alsa_refill_stream(cubeb_stream * stm) +@@ -359,10 +365,11 @@ alsa_refill_stream(cubeb_stream * stm) if (got < 0) { pthread_mutex_unlock(&stm->mutex); stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR); @@ -90,15 +90,19 @@ index 9bbc129..e72944a 100644 return ERROR; } if (got > 0) { -- snd_pcm_sframes_t wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); +- snd_pcm_sframes_t wrote; ++ snd_pcm_sframes_t wrote, towrite = got; + + if (stm->params.format == CUBEB_SAMPLE_FLOAT32NE) { + float * b = (float *) p; +@@ -375,14 +382,62 @@ alsa_refill_stream(cubeb_stream * stm) + b[i] *= stm->volume; + } + } +- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); - if (wrote == -EPIPE) { - WRAP(snd_pcm_recover)(stm->pcm, wrote, 1); - wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got); -- } -- assert(wrote >= 0 && wrote == got); -- stm->write_position += wrote; -- gettimeofday(&stm->last_activity, NULL); -+ snd_pcm_sframes_t wrote, towrite = got; + for (;;) { + wrote = WRAP(snd_pcm_writei)(stm->pcm, p, + towrite > avail ? avail : towrite); @@ -154,7 +158,10 @@ index 9bbc129..e72944a 100644 + if (towrite == wrote) + break; + towrite -= wrote; -+ } + } +- assert(wrote >= 0 && wrote == got); +- stm->write_position += wrote; +- gettimeofday(&stm->last_activity, NULL); } if (got != avail) { long buffer_fill = stm->buffer_size - (avail - got); diff --git a/www/libxul/files/patch-bug1138845 b/www/libxul/files/patch-bug1138845 new file mode 100644 index 000000000000..12a9542f538f --- /dev/null +++ b/www/libxul/files/patch-bug1138845 @@ -0,0 +1,134 @@ +commit 4b5b332 +Author: Mike Hommey <mh+mozilla@glandium.org> +Date: Tue Mar 3 18:41:13 2015 +0900 + + Bug 1138845 - Don't require atk-bridge for gtk+3 builds. r=tbsaunde +--- + accessible/atk/Platform.cpp | 29 +++++++++++++++++++---------- + config/system-headers | 1 - + configure.in | 2 +- + 3 files changed, 20 insertions(+), 12 deletions(-) + +diff --git accessible/atk/Platform.cpp accessible/atk/Platform.cpp +index a2afd96..2ed5e0b 100644 +--- accessible/atk/Platform.cpp ++++ accessible/atk/Platform.cpp +@@ -18,8 +18,9 @@ + #include <dbus/dbus.h> + #endif + #include <gtk/gtk.h> ++ + #if (MOZ_WIDGET_GTK == 3) +-#include <atk-bridge.h> ++extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]); + #endif + + using namespace mozilla; +@@ -46,7 +47,6 @@ static gulong sToplevel_hide_hook = 0; + + GType g_atk_hyperlink_impl_type = G_TYPE_INVALID; + +-#if (MOZ_WIDGET_GTK == 2) + struct GnomeAccessibilityModule + { + const char *libName; +@@ -67,11 +67,13 @@ static GnomeAccessibilityModule sAtkBridge = { + "gnome_accessibility_module_shutdown", nullptr + }; + ++#if (MOZ_WIDGET_GTK == 2) + static GnomeAccessibilityModule sGail = { + "libgail.so", nullptr, + "gnome_accessibility_module_init", nullptr, + "gnome_accessibility_module_shutdown", nullptr + }; ++#endif + + static nsresult + LoadGtkModule(GnomeAccessibilityModule& aModule) +@@ -98,7 +100,11 @@ LoadGtkModule(GnomeAccessibilityModule& aModule) + else + subLen = loc2 - loc1; + nsAutoCString sub(Substring(libPath, loc1, subLen)); ++#if (MOZ_WIDGET_GTK == 2) + sub.AppendLiteral("/gtk-2.0/modules/"); ++#else ++ sub.AppendLiteral("/gtk-3.0/modules/"); ++#endif + sub.Append(aModule.libName); + aModule.lib = PR_LoadLibrary(sub.get()); + if (aModule.lib) +@@ -123,7 +129,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule) + } + return NS_OK; + } +-#endif // (MOZ_WIDGET_GTK == 2) + + void + a11y::PlatformInit() +@@ -175,14 +180,17 @@ a11y::PlatformInit() + + // Init atk-bridge now + PR_SetEnv("NO_AT_BRIDGE=0"); +-#if (MOZ_WIDGET_GTK == 2) +- rv = LoadGtkModule(sAtkBridge); +- if (NS_SUCCEEDED(rv)) { +- (*sAtkBridge.init)(); +- } +-#else +- atk_bridge_adaptor_init(nullptr, nullptr); ++#if (MOZ_WIDGET_GTK == 3) ++ if (atk_bridge_adaptor_init) { ++ atk_bridge_adaptor_init(nullptr, nullptr); ++ } else + #endif ++ { ++ nsresult rv = LoadGtkModule(sAtkBridge); ++ if (NS_SUCCEEDED(rv)) { ++ (*sAtkBridge.init)(); ++ } ++ } + + if (!sToplevel_event_hook_added) { + sToplevel_event_hook_added = true; +@@ -210,7 +218,6 @@ a11y::PlatformShutdown() + sToplevel_hide_hook); + } + +-#if (MOZ_WIDGET_GTK == 2) + if (sAtkBridge.lib) { + // Do not shutdown/unload atk-bridge, + // an exit function registered will take care of it +@@ -221,6 +228,7 @@ a11y::PlatformShutdown() + sAtkBridge.init = nullptr; + sAtkBridge.shutdown = nullptr; + } ++#if (MOZ_WIDGET_GTK == 2) + if (sGail.lib) { + // Do not shutdown gail because + // 1) Maybe it's not init-ed by us. e.g. GtkEmbed +diff --git config/system-headers config/system-headers +index 2c94a7d..cf01775 100644 +--- config/system-headers ++++ config/system-headers +@@ -189,7 +189,6 @@ asm/signal.h + ASRegistry.h + assert.h + atk/atk.h +-atk-bridge.h + atlcom.h + atlconv.h + atlctl.cpp +diff --git configure.in configure.in +index 0bd1eb7..f3b3365 100644 +--- configure.in ++++ configure.in +@@ -4408,7 +4408,7 @@ fi + + if test "$COMPILE_ENVIRONMENT"; then + if test "$MOZ_ENABLE_GTK3"; then +- PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 atk-bridge-2.0 $GDK_PACKAGES) ++ PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) + MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS" + dnl Contrary to MOZ_GTK2_LIBS, MOZ_GTK3_LIBS needs to be literally added to TK_LIBS instead + dnl of a make reference because of how TK_LIBS is mangled in toolkit/library/moz.build diff --git a/www/libxul/files/patch-bug1143686 b/www/libxul/files/patch-bug1143686 new file mode 100644 index 000000000000..d4cc2834d67e --- /dev/null +++ b/www/libxul/files/patch-bug1143686 @@ -0,0 +1,46 @@ +commit e50e738 +Author: Martin Stransky <stransky@redhat.com> +Date: Mon Mar 16 08:00:00 2015 -0400 + + Bug 1143686 - Gtk3 - Render scrollbar thumb with margin. r=karlt +--- + widget/gtk/gtk3drawing.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c +index 17f46ab..08a58d6 100644 +--- widget/gtk/gtk3drawing.c ++++ widget/gtk/gtk3drawing.c +@@ -1230,6 +1230,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, + GtkStyleContext* style; + GtkScrollbar *scrollbar; + GtkAdjustment *adj; ++ GtkBorder margin; + + ensure_scrollbar_widget(); + +@@ -1239,15 +1240,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget, + scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget); + + gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction); +- ++ + style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar)); + gtk_style_context_save(style); +- ++ + gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER); + gtk_style_context_set_state(style, state_flags); + +- gtk_render_slider(style, cr, rect->x, rect->y, +- rect->width, rect->height, ++ gtk_style_context_get_margin (style, state_flags, &margin); ++ ++ gtk_render_slider(style, cr, ++ rect->x + margin.left, ++ rect->y + margin.top, ++ rect->width - margin.left - margin.right, ++ rect->height - margin.top - margin.bottom, + (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ? + GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); + diff --git a/www/libxul/files/patch-bug1144643 b/www/libxul/files/patch-bug1144643 new file mode 100644 index 000000000000..fe8150ba182c --- /dev/null +++ b/www/libxul/files/patch-bug1144643 @@ -0,0 +1,33 @@ +commit a0ccc19 +Author: Martin Stransky <stransky@redhat.com> +Date: Wed Mar 18 07:14:00 2015 -0400 + + Bug 1144643 - Render tooltips as transparent on Gtk3. r=karlt + + --HG-- + extra : rebase_source : 23085532b27350ca71cbe18db071628388003f33 +--- + widget/gtk/nsNativeThemeGTK.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp +index e5e1867..26d13a5 100644 +--- widget/gtk/nsNativeThemeGTK.cpp ++++ widget/gtk/nsNativeThemeGTK.cpp +@@ -1528,9 +1528,15 @@ nsNativeThemeGTK::GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType) + case NS_THEME_MENUPOPUP: + case NS_THEME_WINDOW: + case NS_THEME_DIALOG: +- // Tooltips use gtk_paint_flat_box(). ++ return eOpaque; ++ // Tooltips use gtk_paint_flat_box() on Gtk2 ++ // but are shaped on Gtk3 + case NS_THEME_TOOLTIP: ++#if (MOZ_WIDGET_GTK == 2) + return eOpaque; ++#else ++ return eTransparent; ++#endif + } + + return eUnknownTransparency; diff --git a/www/libxul/files/patch-bug702179 b/www/libxul/files/patch-bug702179 index d7b90a082519..d1aa293d2237 100644 --- a/www/libxul/files/patch-bug702179 +++ b/www/libxul/files/patch-bug702179 @@ -4,33 +4,21 @@ Date: Wed Nov 30 07:23:46 2011 +0800 Bug 702179 dtrace probes are not installed on Solaris with static js lib r=glandium --- - configure.in | 2 +- - js/src/Makefile.in | 2 -- - 2 files changed, 1 insertion(+), 3 deletions(-) + js/src/Makefile.in | 3 --- + toolkit/library/moz.build | 5 ----- + 2 files changed, 8 deletions(-) -diff --git configure.in configure.in -index 66549c1..75b848d 100644 ---- configure.in -+++ configure.in -@@ -966,7 +966,7 @@ MOZ_BZ2_LIBS='$(call EXPAND_LIBNAME_PATH,bz2,$(DEPTH)/modules/libbz2/src)' - MOZ_PNG_CFLAGS="-I$_objdir/dist/include" # needed for freetype compilation - MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)' - --MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)' -+MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(DEPTH)/js/src)' - MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)' - MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib' - XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/bin)' diff --git js/src/Makefile.in js/src/Makefile.in -index e28160a..28ca5e8 100644 +index 62bbfa0..90400cb 100644 --- js/src/Makefile.in +++ js/src/Makefile.in -@@ -18,8 +18,6 @@ run_for_side_effects := $(shell echo 'MAKE: $(MAKE)') - STATIC_LIBRARY_NAME = js_static - LIBS = $(NSPR_LIBS) +@@ -17,9 +17,6 @@ TOPLEVEL_BUILD := 1 + run_for_side_effects := $(shell echo 'MAKE: $(MAKE)') + EXTRA_LIBS += $(NSPR_LIBS) -DIST_INSTALL = 1 +-NO_EXPAND_LIBS = 1 - - ifdef JS_STANDALONE - SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt) - ifndef MOZ_NATIVE_ZLIB + ifdef JS_HAS_CTYPES + ifdef MOZ_NATIVE_FFI + LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS) diff --git a/www/libxul/files/patch-bug779713 b/www/libxul/files/patch-bug779713 index e4643f4422cb..cbf73d463db0 100644 --- a/www/libxul/files/patch-bug779713 +++ b/www/libxul/files/patch-bug779713 @@ -47,7 +47,15 @@ diff --git mfbt/Attributes.h mfbt/Attributes.h index d317766..ddb13da 100644 --- mfbt/Attributes.h +++ mfbt/Attributes.h -@@ -54,6 +54,9 @@ +@@ -50,6 +50,7 @@ + * don't indicate support for them here, due to + * http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug + */ ++# define MOZ_HAVE_CXX11_ALIGNAS + # define MOZ_HAVE_NEVER_INLINE __declspec(noinline) + # define MOZ_HAVE_NORETURN __declspec(noreturn) + # ifdef __clang__ +@@ -70,6 +71,9 @@ # ifndef __has_extension # define __has_extension __has_feature /* compatibility, for older versions of clang */ # endif @@ -57,21 +65,13 @@ index d317766..ddb13da 100644 # if __has_extension(cxx_constexpr) # define MOZ_HAVE_CXX11_CONSTEXPR # endif -@@ -75,6 +78,9 @@ +@@ -84,6 +88,9 @@ # endif #elif defined(__GNUC__) # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0) +# define MOZ_HAVE_CXX11_ALIGNAS +# endif - # if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0) - # define MOZ_HAVE_CXX11_OVERRIDE - # define MOZ_HAVE_CXX11_FINAL final -@@ -96,6 +102,7 @@ - # define MOZ_HAVE_NORETURN __attribute__((noreturn)) - #elif defined(_MSC_VER) - # if _MSC_VER >= 1800 -+# define MOZ_HAVE_CXX11_ALIGNAS - # define MOZ_HAVE_CXX11_DELETE + # define MOZ_HAVE_CXX11_CONSTEXPR + # define MOZ_HAVE_EXPLICIT_CONVERSION # endif - # if _MSC_VER >= 1700 diff --git a/www/libxul/files/patch-bug826985 b/www/libxul/files/patch-bug826985 index 5f44e78051e2..4fb4dde7bd4d 100644 --- a/www/libxul/files/patch-bug826985 +++ b/www/libxul/files/patch-bug826985 @@ -51,18 +51,18 @@ index b483cd1..f1dd1f0 100644 # basic stuff for everything 'include_internal_video_render': 0, 'clang_use_chrome_plugins': 0, -diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in +diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build index b483cd1..f1dd1f0 100644 ---- media/webrtc/signaling/test/Makefile.in -+++ media/webrtc/signaling/test/Makefile.in -@@ -7,6 +7,7 @@ LIBS = \ - $(NSPR_LIBS) \ - $(NSS_LIBS) \ - $(REALTIME_LIBS) \ -+ $(MOZ_LIBV4L2_LIBS) \ - $(DEPTH)/xpcom/glue/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ - $(DEPTH)/media/mtransport/standalone/$(LIB_PREFIX)mtransport_s.$(LIB_SUFFIX) \ - $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \ +--- media/webrtc/signaling/test/moz.build ++++ media/webrtc/signaling/test/moz.build +@@ -122,6 +122,7 @@ if CONFIG['JS_SHARED_LIBRARY']: + 'js', + ] + ++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS'] + OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS'] + OS_LIBS += CONFIG['REALTIME_LIBS'] + diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc index 239a292..bab496c 100644 --- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc @@ -145,35 +145,35 @@ index d46b5aa..e452223 100644 'targets': [ { 'target_name': 'video_capture_module', -@@ -49,6 +52,16 @@ - }, { # include_internal_video_capture == 1 - 'conditions': [ - ['include_v4l2_video_capture==1', { -+ 'conditions': [ -+ ['use_libv4l2==1', { -+ 'defines': [ -+ 'HAVE_LIBV4L2', -+ ], -+ 'libraries': [ -+ '-lv4l2', -+ ], -+ }], +@@ -69,6 +72,19 @@ + 'linux/video_capture_linux.cc', + 'linux/video_capture_linux.h', + ], ++ 'conditions': [ ++ ['use_libv4l2==1', { ++ 'defines': [ ++ 'HAVE_LIBV4L2', ++ ], ++ 'cflags_mozilla': [ ++ '$(MOZ_LIBV4L2_CFLAGS)', + ], - 'include_dirs': [ - 'linux', - ], -diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in ++ 'libraries': [ ++ '-lv4l2', ++ ], ++ }], ++ ], + }], # linux + ['OS=="mac"', { + 'sources': [ +diff --git toolkit/library/moz.build toolkit/library/moz.build index 9c16ffa..1db3794 100644 ---- toolkit/library/libxul.mk -+++ toolkit/library/libxul.mk -@@ -182,6 +182,10 @@ endif +--- toolkit/library/moz.build ++++ toolkit/library/moz.build +@@ -163,6 +163,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF + ] - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) + OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS'] ++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS'] + OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS'] + OS_LIBS += CONFIG['MOZ_APP_EXTRA_LIBS'] -+ifdef MOZ_LIBV4L2_LIBS -+EXTRA_DSO_LDOPTS += $(MOZ_LIBV4L2_LIBS) -+endif -+ - ifdef MOZ_WEBRTC - ifeq (WINNT,$(OS_TARGET)) - EXTRA_DSO_LDOPTS += \ diff --git a/www/libxul/files/patch-bug847568 b/www/libxul/files/patch-bug847568 index 1504654a4341..59bef6d9651a 100644 --- a/www/libxul/files/patch-bug847568 +++ b/www/libxul/files/patch-bug847568 @@ -4,7 +4,7 @@ diff --git config/Makefile.in config/Makefile.in index 14bfc0d..5383399 100644 --- config/Makefile.in +++ config/Makefile.in -@@ -77,6 +77,8 @@ export:: $(export-preqs) +@@ -75,6 +75,8 @@ export:: $(export-preqs) -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \ -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ @@ -17,7 +17,7 @@ diff --git config/system-headers config/system-headers index 18e8703..bdc5f82 100644 --- config/system-headers +++ config/system-headers -@@ -1145,3 +1145,11 @@ unicode/utypes.h +@@ -1357,3 +1357,11 @@ unicode/utypes.h #endif libutil.h unwind.h @@ -33,7 +33,7 @@ diff --git configure.in configure.in index ac38f40..87536b7 100644 --- configure.in +++ configure.in -@@ -8032,6 +8032,52 @@ if test "$USE_FC_FREETYPE"; then +@@ -7986,6 +7986,49 @@ if test "$USE_FC_FREETYPE"; then fi dnl ======================================================== @@ -46,16 +46,15 @@ index ac38f40..87536b7 100644 +MOZ_NATIVE_HARFBUZZ=) + +if test -n "$MOZ_NATIVE_HARFBUZZ"; then -+ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.25) ++ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34) +fi + +AC_SUBST(MOZ_NATIVE_HARFBUZZ) -+AC_SUBST(MOZ_HARFBUZZ_CFLAGS) -+AC_SUBST(MOZ_HARFBUZZ_LIBS) + +dnl ======================================================== +dnl Check for graphite2 +dnl ======================================================== ++ +MOZ_ARG_WITH_BOOL(system-graphite2, +[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)], +MOZ_NATIVE_GRAPHITE2=1, @@ -79,27 +78,58 @@ index ac38f40..87536b7 100644 +fi + +AC_SUBST(MOZ_NATIVE_GRAPHITE2) -+AC_SUBST(MOZ_GRAPHITE2_CFLAGS) -+AC_SUBST(MOZ_GRAPHITE2_LIBS) + +dnl ======================================================== dnl Check for pixman and cairo dnl ======================================================== -diff --git content/base/src/moz.build content/base/src/moz.build -index d4f6380..0ee55df 100644 ---- content/base/src/moz.build -+++ content/base/src/moz.build -@@ -179,6 +179,9 @@ SOURCES += [ +diff --git dom/base/moz.build dom/base/moz.build +index a660ba4..6b2f602 100644 +--- dom/base/moz.build ++++ dom/base/moz.build +@@ -196,6 +196,9 @@ SOURCES += [ 'nsObjectLoadingContent.cpp', ] +if CONFIG['MOZ_NATIVE_HARFBUZZ']: -+ SOURCES['nsContentUtils.cpp'].flags += [CONFIG['MOZ_HARFBUZZ_CFLAGS']] ++ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + EXTRA_COMPONENTS += [ 'contentAreaDropListener.js', 'contentAreaDropListener.manifest', +diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh +index f3d76ea..a9e7fb6 100644 +--- gfx/graphite2/moz-gr-update.sh ++++ gfx/graphite2/moz-gr-update.sh +@@ -23,8 +23,14 @@ echo "\nSee" $0 "for update procedure.\n" >> gfx/graphite2/README.mozilla + find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \; + find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \; + ++# closest tag/release to require for system version ++TAG=$(cd ../graphitedev/ && hg parents --template {latesttag}) ++ ++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$TAG/ and tr/./,/ \ ++ if /GR2_VERSION_REQUIRE/" configure.in ++ + # summarize what's been touched +-echo Updated to $CHANGESET. ++echo Updated to $CHANGESET \($TAG for --with-system-graphite2\) + echo Here is what changed in the gfx/graphite2 directory: + echo + +diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla +index ca57d16..1ce21fe 100644 +--- gfx/harfbuzz/README-mozilla ++++ gfx/harfbuzz/README-mozilla +@@ -21,3 +21,8 @@ In addition, the src/Makefile.in file here is NOT from upstream, nor is it + generated from src/Makefile.am (the original harfbuzz version); it is a mozilla- + specific makefile that is maintained by hand. It should only need updating when + new source files or exported headers are added in harfbuzz. ++ ++The in-tree copy may be omitted during build by --with-system-harfbuzz. ++Make sure to keep pkg-config version check within configure.in in sync ++with checkout version or increment latest tag by one if it's not based ++on upstream release. diff --git gfx/moz.build gfx/moz.build index 519aa46..6929751 100644 --- gfx/moz.build @@ -126,83 +156,87 @@ index 519aa46..6929751 100644 'ots/src', 'thebes', 'ipc', -diff --git gfx/skia/Makefile.in gfx/skia/Makefile.in -index ee0efb2..98e169d6f 100644 ---- gfx/skia/Makefile.in -+++ gfx/skia/Makefile.in -@@ -15,6 +15,10 @@ ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) - OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PANGO_CFLAGS) $(CAIRO_FT_CFLAGS) - endif +diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py +index 28fa6b5..240dced 100755 +--- gfx/skia/generate_mozbuild.py ++++ gfx/skia/generate_mozbuild.py +@@ -140,6 +140,9 @@ if CONFIG['GNU_CXX']: + if not CONFIG['CLANG_CXX']: + CXXFLAGS += ['-Wno-logical-op'] -+ifdef MOZ_NATIVE_HARFBUZZ -+OS_CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS) -+endif -+ - include $(topsrcdir)/config/rules.mk ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'): + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] +diff --git gfx/skia/moz.build gfx/skia/moz.build +index 1d0c2f9..adb8941 100644 +--- gfx/skia/moz.build ++++ gfx/skia/moz.build +@@ -968,6 +968,9 @@ if CONFIG['GNU_CXX']: + if not CONFIG['CLANG_CXX']: + CXXFLAGS += ['-Wno-logical-op'] - ifeq ($(CPU_ARCH)_$(GNU_CC),arm_1) -diff --git gfx/thebes/Makefile.in gfx/thebes/Makefile.in -index 45c36ae..79d32cf 100644 ---- gfx/thebes/Makefile.in -+++ gfx/thebes/Makefile.in -@@ -13,6 +13,14 @@ DEFINES := $(filter-out -DUNICODE,$(DEFINES)) - CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS) - CFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS) ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'): + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] +diff --git gfx/thebes/moz.build gfx/thebes/moz.build +index d5852fa..aeeab25 100644 +--- gfx/thebes/moz.build ++++ gfx/thebes/moz.build +@@ -278,6 +278,12 @@ CXXFLAGS += CONFIG['TK_CFLAGS'] + CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CFLAGS += CONFIG['TK_CFLAGS'] -+ifdef MOZ_NATIVE_GRAPHITE2 -+CXXFLAGS += $(MOZ_GRAPHITE2_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_HARFBUZZ -+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS) -+endif -+ - ifeq ($(MOZ_WIDGET_TOOLKIT),android) - CXXFLAGS += $(CAIRO_FT_CFLAGS) - endif -diff --git intl/unicharutil/util/Makefile.in intl/unicharutil/util/Makefile.in -index f6b9f7c..60863f4 100644 ---- intl/unicharutil/util/Makefile.in -+++ intl/unicharutil/util/Makefile.in -@@ -21,3 +21,7 @@ ifdef _MSC_VER - OS_COMPILE_CXXFLAGS += -Zl - OS_COMPILE_CFLAGS += -Zl - endif -+ -+ifdef MOZ_NATIVE_HARFBUZZ -+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS) -+endif -diff --git netwerk/dns/Makefile.in netwerk/dns/Makefile.in -index 1cacbd7..f5d72bb 100644 ---- netwerk/dns/Makefile.in -+++ netwerk/dns/Makefile.in -@@ -5,6 +5,10 @@ ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_GRAPHITE2']: ++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk', 'qt'): + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] - include $(topsrcdir)/config/rules.mk +diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build +index d736943..41a931f 100644 +--- intl/unicharutil/util/moz.build ++++ intl/unicharutil/util/moz.build +@@ -37,3 +37,6 @@ if CONFIG['_MSC_VER']: -+ifdef MOZ_NATIVE_HARFBUZZ -+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS) -+endif -+ - # Generate the include file containing compact, static definitions - # for effective TLD data. - etld_data.inc: $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat -diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk + if CONFIG['ENABLE_INTL_API']: + CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] +diff --git netwerk/dns/moz.build netwerk/dns/moz.build +index 0b0717a..2e665c9 100644 +--- netwerk/dns/moz.build ++++ netwerk/dns/moz.build +@@ -64,3 +64,6 @@ GENERATED_FILES = [ + LOCAL_INCLUDES += [ + '/netwerk/base', + ] ++ ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] +diff --git toolkit/library/moz.build toolkit/library/moz.build index 67f0db9..d42137a 100644 ---- toolkit/library/libxul.mk -+++ toolkit/library/libxul.mk -@@ -89,6 +89,14 @@ ifndef MOZ_TREE_PIXMAN - EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS) - endif +--- toolkit/library/moz.build ++++ toolkit/library/moz.build +@@ -187,6 +187,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']: + if not CONFIG['MOZ_TREE_PIXMAN']: + OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] -+ifdef MOZ_NATIVE_GRAPHITE2 -+EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE2_LIBS) -+endif ++if CONFIG['MOZ_NATIVE_GRAPHITE2']: ++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] + -+ifdef MOZ_NATIVE_HARFBUZZ -+EXTRA_DSO_LDOPTS += $(MOZ_HARFBUZZ_LIBS) -+endif ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS'] + - ifdef MOZ_DMD - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,dmd,$(DIST)/lib) - endif + if CONFIG['MOZ_OSS']: + OS_LIBS += CONFIG['MOZ_OSS_LIBS'] + diff --git a/www/libxul/files/patch-bug858919 b/www/libxul/files/patch-bug858919 deleted file mode 100644 index 2354cd340145..000000000000 --- a/www/libxul/files/patch-bug858919 +++ /dev/null @@ -1,391 +0,0 @@ -commit a33d4f7 -Author: Martin Stransky <stransky@redhat.com> -Date: Fri Nov 14 04:04:00 2014 +0100 - - Bug 858919 - Add support for libnotify calls which was removed for new notification API. r=karlt ---- - toolkit/components/alerts/nsAlertsService.cpp | 10 +-- - toolkit/system/gnome/moz.build | 2 + - toolkit/system/gnome/nsAlertsIconListener.cpp | 64 ++++++++++++------ - toolkit/system/gnome/nsAlertsIconListener.h | 89 ++++++++++++++++++++++++++ - toolkit/system/gnome/nsGnomeModule.cpp | 5 ++ - toolkit/system/gnome/nsSystemAlertsService.cpp | 54 ++++++++++++++++ - toolkit/system/gnome/nsSystemAlertsService.h | 27 ++++++++ - 7 files changed, 226 insertions(+), 25 deletions(-) - -diff --git toolkit/components/alerts/nsAlertsService.cpp toolkit/components/alerts/nsAlertsService.cpp -index 93f4536..f8b5e07 100644 ---- toolkit/components/alerts/nsAlertsService.cpp -+++ toolkit/components/alerts/nsAlertsService.cpp -@@ -100,9 +100,11 @@ NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl - nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID)); - nsresult rv; - if (sysAlerts) { -- return sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, -- aAlertCookie, aAlertListener, aAlertName, -- aBidi, aLang, IPC::Principal(aPrincipal)); -+ rv = sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, -+ aAlertCookie, aAlertListener, aAlertName, -+ aBidi, aLang, IPC::Principal(aPrincipal)); -+ if (NS_SUCCEEDED(rv)) -+ return NS_OK; - } - - if (!ShouldShowAlert()) { -diff --git toolkit/system/gnome/moz.build toolkit/system/gnome/moz.build -index c033f8b..9242209 100644 ---- toolkit/system/gnome/moz.build -+++ toolkit/system/gnome/moz.build -@@ -5,7 +5,9 @@ - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - - SOURCES += [ -+ 'nsAlertsIconListener.cpp', - 'nsGnomeModule.cpp', -+ 'nsSystemAlertsService.cpp', - ] - - if CONFIG['MOZ_ENABLE_GCONF']: -diff --git toolkit/system/gnome/nsAlertsIconListener.cpp toolkit/system/gnome/nsAlertsIconListener.cpp -index f39335e..55f4356 100644 ---- toolkit/system/gnome/nsAlertsIconListener.cpp -+++ toolkit/system/gnome/nsAlertsIconListener.cpp -@@ -51,6 +51,21 @@ static void notify_closed_marshal(GClosure* closure, - NS_RELEASE(alert); - } - -+static GdkPixbuf* -+GetPixbufFromImgRequest(imgIRequest* aRequest) -+{ -+ nsCOMPtr<imgIContainer> image; -+ nsresult rv = aRequest->GetImage(getter_AddRefs(image)); -+ if (NS_FAILED(rv)) { -+ return nullptr; -+ } -+ -+ nsCOMPtr<nsIImageToPixbuf> imgToPixbuf = -+ do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1"); -+ -+ return imgToPixbuf->ConvertImageToPixbuf(image); -+} -+ - NS_IMPL_ISUPPORTS(nsAlertsIconListener, imgINotificationObserver, - nsIObserver, nsISupportsWeakReference) - -@@ -106,47 +121,45 @@ nsAlertsIconListener::Notify(imgIRequest *aRequest, int32_t aType, const nsIntRe - nsresult - nsAlertsIconListener::OnStopRequest(imgIRequest* aRequest) - { -+ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!"); -+ - uint32_t imgStatus = imgIRequest::STATUS_ERROR; - nsresult rv = aRequest->GetImageStatus(&imgStatus); - NS_ENSURE_SUCCESS(rv, rv); - if (imgStatus == imgIRequest::STATUS_ERROR && !mLoadedFrame) { - // We have an error getting the image. Display the notification with no icon. - ShowAlert(nullptr); -- } - -- if (mIconRequest) { -+ // Cancel any pending request - mIconRequest->Cancel(NS_BINDING_ABORTED); - mIconRequest = nullptr; - } -+ - return NS_OK; - } - - nsresult - nsAlertsIconListener::OnStopFrame(imgIRequest* aRequest) - { -- if (aRequest != mIconRequest) -- return NS_ERROR_FAILURE; -+ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!"); - - if (mLoadedFrame) - return NS_OK; // only use one frame - -- nsCOMPtr<imgIContainer> image; -- nsresult rv = aRequest->GetImage(getter_AddRefs(image)); -- if (NS_FAILED(rv)) -- return rv; -- -- nsCOMPtr<nsIImageToPixbuf> imgToPixbuf = -- do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1"); -- -- GdkPixbuf* imagePixbuf = imgToPixbuf->ConvertImageToPixbuf(image); -- if (!imagePixbuf) -- return NS_ERROR_FAILURE; -+ GdkPixbuf* imagePixbuf = GetPixbufFromImgRequest(aRequest); -+ if (!imagePixbuf) { -+ ShowAlert(nullptr); -+ } else { -+ ShowAlert(imagePixbuf); -+ g_object_unref(imagePixbuf); -+ } - -- ShowAlert(imagePixbuf); -+ mLoadedFrame = true; - -- g_object_unref(imagePixbuf); -+ // Cancel any pending request (multipart image loading/decoding for instance) -+ mIconRequest->Cancel(NS_BINDING_ABORTED); -+ mIconRequest = nullptr; - -- mLoadedFrame = true; - return NS_OK; - } - -@@ -180,6 +193,9 @@ nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf) - mClosureHandler = g_signal_connect_closure(mNotification, "closed", closure, FALSE); - gboolean result = notify_notification_show(mNotification, nullptr); - -+ if (result && mAlertListener) -+ mAlertListener->Observe(nullptr, "alertshow", mAlertCookie.get()); -+ - return result ? NS_OK : NS_ERROR_FAILURE; - } - -@@ -201,9 +217,15 @@ nsAlertsIconListener::StartRequest(const nsAString & aImageUrl) - if (!il) - return ShowAlert(nullptr); - -- return il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr, -- this, nullptr, nsIRequest::LOAD_NORMAL, nullptr, -- nullptr, getter_AddRefs(mIconRequest)); -+ nsresult rv = il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr, -+ this, nullptr, nsIRequest::LOAD_NORMAL, nullptr, -+ 0 /* use default */, getter_AddRefs(mIconRequest)); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ mIconRequest->StartDecoding(); -+ -+ return NS_OK; - } - - void -diff --git toolkit/system/gnome/nsAlertsIconListener.h toolkit/system/gnome/nsAlertsIconListener.h -new file mode 100644 -index 0000000..ac96db9 ---- /dev/null -+++ toolkit/system/gnome/nsAlertsIconListener.h -@@ -0,0 +1,89 @@ -+/* -*- 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 -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef nsAlertsIconListener_h__ -+#define nsAlertsIconListener_h__ -+ -+#include "nsCOMPtr.h" -+#include "imgINotificationObserver.h" -+#include "nsStringAPI.h" -+#include "nsIObserver.h" -+#include "nsWeakReference.h" -+ -+#include <gdk-pixbuf/gdk-pixbuf.h> -+ -+class imgIRequest; -+ -+struct NotifyNotification; -+ -+class nsAlertsIconListener : public imgINotificationObserver, -+ public nsIObserver, -+ public nsSupportsWeakReference -+{ -+public: -+ NS_DECL_ISUPPORTS -+ NS_DECL_IMGINOTIFICATIONOBSERVER -+ NS_DECL_NSIOBSERVER -+ -+ nsAlertsIconListener(); -+ -+ nsresult InitAlertAsync(const nsAString & aImageUrl, -+ const nsAString & aAlertTitle, -+ const nsAString & aAlertText, -+ bool aAlertTextClickable, -+ const nsAString & aAlertCookie, -+ nsIObserver * aAlertListener); -+ -+ void SendCallback(); -+ void SendClosed(); -+ -+protected: -+ virtual ~nsAlertsIconListener(); -+ -+ nsresult OnStopRequest(imgIRequest* aRequest); -+ nsresult OnStopFrame(imgIRequest* aRequest); -+ -+ /** -+ * The only difference between libnotify.so.4 and libnotify.so.1 for these symbols -+ * is that notify_notification_new takes three arguments in libnotify.so.4 and -+ * four in libnotify.so.1. -+ * Passing the fourth argument as NULL is binary compatible. -+ */ -+ typedef void (*NotifyActionCallback)(NotifyNotification*, char*, gpointer); -+ typedef bool (*notify_is_initted_t)(void); -+ typedef bool (*notify_init_t)(const char*); -+ typedef GList* (*notify_get_server_caps_t)(void); -+ typedef NotifyNotification* (*notify_notification_new_t)(const char*, const char*, const char*, const char*); -+ typedef bool (*notify_notification_show_t)(void*, char*); -+ typedef void (*notify_notification_set_icon_from_pixbuf_t)(void*, GdkPixbuf*); -+ typedef void (*notify_notification_add_action_t)(void*, const char*, const char*, NotifyActionCallback, gpointer, GFreeFunc); -+ -+ nsCOMPtr<imgIRequest> mIconRequest; -+ nsCString mAlertTitle; -+ nsCString mAlertText; -+ -+ nsCOMPtr<nsIObserver> mAlertListener; -+ nsString mAlertCookie; -+ -+ bool mLoadedFrame; -+ bool mAlertHasAction; -+ -+ static void* libNotifyHandle; -+ static bool libNotifyNotAvail; -+ static notify_is_initted_t notify_is_initted; -+ static notify_init_t notify_init; -+ static notify_get_server_caps_t notify_get_server_caps; -+ static notify_notification_new_t notify_notification_new; -+ static notify_notification_show_t notify_notification_show; -+ static notify_notification_set_icon_from_pixbuf_t notify_notification_set_icon_from_pixbuf; -+ static notify_notification_add_action_t notify_notification_add_action; -+ NotifyNotification* mNotification; -+ gulong mClosureHandler; -+ -+ nsresult StartRequest(const nsAString & aImageUrl); -+ nsresult ShowAlert(GdkPixbuf* aPixbuf); -+}; -+ -+#endif -diff --git toolkit/system/gnome/nsGnomeModule.cpp toolkit/system/gnome/nsGnomeModule.cpp -index 5ccc8e5..f893893 100644 ---- toolkit/system/gnome/nsGnomeModule.cpp -+++ toolkit/system/gnome/nsGnomeModule.cpp -@@ -22,6 +22,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init) - NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService) - NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init) - #endif -+#include "nsSystemAlertsService.h" -+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init) - - #ifdef MOZ_ENABLE_GCONF - NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID); -@@ -33,6 +35,7 @@ NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID); - NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID); - NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID); - #endif -+NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID); - - static const mozilla::Module::CIDEntry kGnomeCIDs[] = { - #ifdef MOZ_ENABLE_GCONF -@@ -45,6 +48,7 @@ static const mozilla::Module::CIDEntry kGnomeCIDs[] = { - { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor }, - { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor }, - #endif -+ { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor }, - { nullptr } - }; - -@@ -59,6 +63,7 @@ static const mozilla::Module::ContractIDEntry kGnomeContracts[] = { - { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID }, - { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID }, - #endif -+ { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID }, - { nullptr } - }; - -diff --git toolkit/system/gnome/nsSystemAlertsService.cpp toolkit/system/gnome/nsSystemAlertsService.cpp -new file mode 100644 -index 0000000..b91b402 ---- /dev/null -+++ toolkit/system/gnome/nsSystemAlertsService.cpp -@@ -0,0 +1,53 @@ -+/* -*- 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 -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "nsXULAppAPI.h" -+#include "nsSystemAlertsService.h" -+#include "nsAlertsIconListener.h" -+#include "nsAutoPtr.h" -+ -+NS_IMPL_ADDREF(nsSystemAlertsService) -+NS_IMPL_RELEASE(nsSystemAlertsService) -+ -+NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService) -+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService) -+ NS_INTERFACE_MAP_ENTRY(nsIAlertsService) -+NS_INTERFACE_MAP_END_THREADSAFE -+ -+nsSystemAlertsService::nsSystemAlertsService() -+{ -+} -+ -+nsSystemAlertsService::~nsSystemAlertsService() -+{} -+ -+nsresult -+nsSystemAlertsService::Init() -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP nsSystemAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle, -+ const nsAString & aAlertText, bool aAlertTextClickable, -+ const nsAString & aAlertCookie, -+ nsIObserver * aAlertListener, -+ const nsAString & aAlertName, -+ const nsAString & aBidi, -+ const nsAString & aLang, -+ nsIPrincipal * aPrincipal) -+{ -+ nsRefPtr<nsAlertsIconListener> alertListener = new nsAlertsIconListener(); -+ if (!alertListener) -+ return NS_ERROR_OUT_OF_MEMORY; -+ -+ return alertListener->InitAlertAsync(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable, -+ aAlertCookie, aAlertListener); -+} -+ -+NS_IMETHODIMP nsSystemAlertsService::CloseAlert(const nsAString& aAlertName, -+ nsIPrincipal* aPrincipal) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -diff --git toolkit/system/gnome/nsSystemAlertsService.h toolkit/system/gnome/nsSystemAlertsService.h -new file mode 100644 -index 0000000..b0bd625 ---- /dev/null -+++ toolkit/system/gnome/nsSystemAlertsService.h -@@ -0,0 +1,27 @@ -+/* -*- 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 -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef nsSystemAlertsService_h__ -+#define nsSystemAlertsService_h__ -+ -+#include "nsIAlertsService.h" -+#include "nsCOMPtr.h" -+ -+class nsSystemAlertsService : public nsIAlertsService -+{ -+public: -+ NS_DECL_NSIALERTSSERVICE -+ NS_DECL_ISUPPORTS -+ -+ nsSystemAlertsService(); -+ -+ nsresult Init(); -+ -+protected: -+ virtual ~nsSystemAlertsService(); -+ -+}; -+ -+#endif /* nsSystemAlertsService_h__ */ diff --git a/www/libxul/files/patch-bug961264 b/www/libxul/files/patch-bug961264 deleted file mode 100644 index 94fd84ce5cb6..000000000000 --- a/www/libxul/files/patch-bug961264 +++ /dev/null @@ -1,266 +0,0 @@ -commit d099acd -Author: Trevor Saunders <trev.saunders@gmail.com> -Date: Fri Jan 17 15:08:00 2014 -0800 - - Bug 961264 - Remove obsolete checks for gcc visibility stuff. ---- - configure.in | 115 +++------------------------------------------------- - js/src/configure.in | 111 ++------------------------------------------------ - 2 files changed, 8 insertions(+), 218 deletions(-) - -diff --git configure.in configure.in -index dfb8193..33d71b3 100644 ---- configure.in -+++ configure.in -@@ -2507,118 +2507,15 @@ MOZ_CXX11 - - AC_LANG_C - --dnl Check for .hidden assembler directive and visibility attribute. --dnl Borrowed from glibc configure.in -+dnl Setup default hidden visibility and wrapped system headers. - dnl =============================================================== - if test "$GNU_CC"; then -- AC_CACHE_CHECK(for visibility(hidden) attribute, -- ac_cv_visibility_hidden, -- [cat > conftest.c <<EOF -- int foo __attribute__ ((visibility ("hidden"))) = 1; --EOF -- ac_cv_visibility_hidden=no -- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then -- if egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then -- ac_cv_visibility_hidden=yes -- fi -- fi -- rm -f conftest.[cs] -- ]) -- if test "$ac_cv_visibility_hidden" = "yes"; then -- AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) -- -- AC_CACHE_CHECK(for visibility(default) attribute, -- ac_cv_visibility_default, -- [cat > conftest.c <<EOF -- int foo __attribute__ ((visibility ("default"))) = 1; --EOF -- ac_cv_visibility_default=no -- if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then -- if ! egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then -- ac_cv_visibility_default=yes -- fi -- fi -- rm -f conftest.[cs] -- ]) -- if test "$ac_cv_visibility_default" = "yes"; then -- AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE) -- -- AC_CACHE_CHECK(for visibility pragma support, -- ac_cv_visibility_pragma, -- [cat > conftest.c <<EOF --#pragma GCC visibility push(hidden) -- int foo_hidden = 1; --#pragma GCC visibility push(default) -- int foo_default = 1; --EOF -- ac_cv_visibility_pragma=no -- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then -- if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then -- if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then -- ac_cv_visibility_pragma=yes -- fi -- fi -- fi -- rm -f conftest.[cs] -- ]) -- if test "$ac_cv_visibility_pragma" = "yes"; then -- AC_CACHE_CHECK(For gcc visibility bug with class-level attributes (GCC bug 26905), -- ac_cv_have_visibility_class_bug, -- [cat > conftest.c <<EOF --#pragma GCC visibility push(hidden) --struct __attribute__ ((visibility ("default"))) TestStruct { -- static void Init(); --}; --__attribute__ ((visibility ("default"))) void TestFunc() { -- TestStruct::Init(); --} --EOF -- ac_cv_have_visibility_class_bug=no -- if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then -- ac_cv_have_visibility_class_bug=yes -- else -- if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then -- ac_cv_have_visibility_class_bug=yes -- fi -- fi -- rm -rf conftest.{c,S} -- ]) -- -- AC_CACHE_CHECK(For x86_64 gcc visibility bug with builtins (GCC bug 20297), -- ac_cv_have_visibility_builtin_bug, -- [cat > conftest.c <<EOF --#pragma GCC visibility push(hidden) --#pragma GCC visibility push(default) --#include <string.h> --#pragma GCC visibility pop -- --__attribute__ ((visibility ("default"))) void Func() { -- char c[[100]]; -- memset(c, 0, sizeof(c)); --} --EOF -- ac_cv_have_visibility_builtin_bug=no -- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then -- ac_cv_have_visibility_builtin_bug=yes -- else -- if test `grep -c "@PLT" conftest.S` = 0; then -- ac_cv_visibility_builtin_bug=yes -- fi -- fi -- rm -f conftest.{c,S} -- ]) -- if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \ -- "$ac_cv_have_visibility_class_bug" = "no"; then -- VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h' -- WRAP_SYSTEM_INCLUDES=1 -- STL_FLAGS='-I$(DIST)/stl_wrappers' -- WRAP_STL_INCLUDES=1 -- else -- VISIBILITY_FLAGS='-fvisibility=hidden' -- fi # have visibility pragma bug -- fi # have visibility pragma -- fi # have visibility(default) attribute -- fi # have visibility(hidden) attribute -+ AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) -+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE) -+ VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h' -+ WRAP_SYSTEM_INCLUDES=1 -+ STL_FLAGS='-I$(DIST)/stl_wrappers' -+ WRAP_STL_INCLUDES=1 - fi # GNU_CC - - # visibility hidden flag for Sun Studio on Solaris -diff --git js/src/configure.in js/src/configure.in -index bddd46d..d4b522e 100644 ---- js/src/configure.in -+++ js/src/configure.in -@@ -2077,116 +2077,13 @@ AC_LANG_CPLUSPLUS - - MOZ_CXX11 - --dnl Check for .hidden assembler directive and visibility attribute. --dnl Borrowed from glibc configure.in -+dnl Setup default hidden visibility and wrapped system headers. - dnl =============================================================== - if test "$GNU_CC"; then -- AC_CACHE_CHECK(for visibility(hidden) attribute, -- ac_cv_visibility_hidden, -- [cat > conftest.c <<EOF -- int foo __attribute__ ((visibility ("hidden"))) = 1; --EOF -- ac_cv_visibility_hidden=no -- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then -- if egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then -- ac_cv_visibility_hidden=yes -- fi -- fi -- rm -f conftest.[cs] -- ]) -- if test "$ac_cv_visibility_hidden" = "yes"; then -- AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) -- -- AC_CACHE_CHECK(for visibility(default) attribute, -- ac_cv_visibility_default, -- [cat > conftest.c <<EOF -- int foo __attribute__ ((visibility ("default"))) = 1; --EOF -- ac_cv_visibility_default=no -- if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then -- if ! egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then -- ac_cv_visibility_default=yes -- fi -- fi -- rm -f conftest.[cs] -- ]) -- if test "$ac_cv_visibility_default" = "yes"; then -- AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE) -- -- AC_CACHE_CHECK(for visibility pragma support, -- ac_cv_visibility_pragma, -- [cat > conftest.c <<EOF --#pragma GCC visibility push(hidden) -- int foo_hidden = 1; --#pragma GCC visibility push(default) -- int foo_default = 1; --EOF -- ac_cv_visibility_pragma=no -- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then -- if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then -- if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then -- ac_cv_visibility_pragma=yes -- fi -- fi -- fi -- rm -f conftest.[cs] -- ]) -- if test "$ac_cv_visibility_pragma" = "yes"; then -- AC_CACHE_CHECK(For gcc visibility bug with class-level attributes (GCC bug 26905), -- ac_cv_have_visibility_class_bug, -- [cat > conftest.c <<EOF --#pragma GCC visibility push(hidden) --struct __attribute__ ((visibility ("default"))) TestStruct { -- static void Init(); --}; --__attribute__ ((visibility ("default"))) void TestFunc() { -- TestStruct::Init(); --} --EOF -- ac_cv_have_visibility_class_bug=no -- if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then -- ac_cv_have_visibility_class_bug=yes -- else -- if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then -- ac_cv_have_visibility_class_bug=yes -- fi -- fi -- rm -rf conftest.{c,S} -- ]) -- -- AC_CACHE_CHECK(For x86_64 gcc visibility bug with builtins (GCC bug 20297), -- ac_cv_have_visibility_builtin_bug, -- [cat > conftest.c <<EOF --#pragma GCC visibility push(hidden) --#pragma GCC visibility push(default) --#include <string.h> --#pragma GCC visibility pop -- --__attribute__ ((visibility ("default"))) void Func() { -- char c[[100]]; -- memset(c, 0, sizeof(c)); --} --EOF -- ac_cv_have_visibility_builtin_bug=no -- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then -- ac_cv_have_visibility_builtin_bug=yes -- else -- if test `grep -c "@PLT" conftest.S` = 0; then -- ac_cv_visibility_builtin_bug=yes -- fi -- fi -- rm -f conftest.{c,S} -- ]) -- if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \ -- "$ac_cv_have_visibility_class_bug" = "no"; then -- VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h' -- WRAP_SYSTEM_INCLUDES=1 -- else -- VISIBILITY_FLAGS='-fvisibility=hidden' -- fi # have visibility pragma bug -- fi # have visibility pragma -- fi # have visibility(default) attribute -- fi # have visibility(hidden) attribute -+ AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) -+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE) -+ VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h' -+ WRAP_SYSTEM_INCLUDES=1 - fi # GNU_CC - - # visibility hidden flag for Sun Studio on Solaris diff --git a/www/libxul/files/patch-ijg-libjpeg b/www/libxul/files/patch-ijg-libjpeg index 406bb1627d6e..f3378046dd32 100644 --- a/www/libxul/files/patch-ijg-libjpeg +++ b/www/libxul/files/patch-ijg-libjpeg @@ -28,7 +28,7 @@ index 8fa8200..1d2a259 100644 -} +#ifdef JCS_EXTENSIONS - #if defined(IS_BIG_ENDIAN) + #if MOZ_BIG_ENDIAN #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB #else #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX @@ -51,26 +51,26 @@ index 8fa8200..1d2a259 100644 static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width); -@@ -324,6 +340,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount) - case JCS_GRAYSCALE: - case JCS_RGB: - case JCS_YCbCr: +@@ -367,6 +382,7 @@ nsJPEGDecoder::WriteInternal(const char* + case JCS_GRAYSCALE: + case JCS_RGB: + case JCS_YCbCr: +#ifdef JCS_EXTENSIONS - // if we're not color managing we can decode directly to - // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB - if (mCMSMode != eCMSMode_All) { -@@ -332,6 +349,9 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount) - } else { - mInfo.out_color_space = JCS_RGB; - } + // if we're not color managing we can decode directly to + // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB + if (mCMSMode != eCMSMode_All) { +@@ -375,6 +391,9 @@ nsJPEGDecoder::WriteInternal(const char* + } else { + mInfo.out_color_space = JCS_RGB; + } +#else -+ mInfo.out_color_space = JCS_RGB; ++ mInfo.out_color_space = JCS_RGB; +#endif - break; - case JCS_CMYK: - case JCS_YCCK: -@@ -399,6 +419,15 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount) - return; /* I/O suspension */ + break; + case JCS_CMYK: + case JCS_YCCK: +@@ -433,6 +452,15 @@ nsJPEGDecoder::WriteInternal(const char* + return; // I/O suspension } +#ifndef JCS_EXTENSIONS @@ -83,10 +83,10 @@ index 8fa8200..1d2a259 100644 + } +#endif - /* If this is a progressive JPEG ... */ - mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL; -@@ -544,7 +573,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend) - uint32_t *imageRow = ((uint32_t*)mImageData) + + // If this is a progressive JPEG ... + mState = mInfo.buffered_image ? +@@ -605,7 +633,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus + uint32_t* imageRow = ((uint32_t*)mImageData) + (mInfo.output_scanline * mInfo.output_width); +#ifdef JCS_EXTENSIONS @@ -94,10 +94,10 @@ index 8fa8200..1d2a259 100644 +#else + if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) { +#endif - /* Special case: scanline will be directly converted into packed ARGB */ + // Special case: scanline will be directly converted into packed ARGB if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) { - *suspend = true; /* suspend */ -@@ -854,6 +887,282 @@ term_source (j_decompress_ptr jd) + *suspend = true; // suspend +@@ -920,6 +952,282 @@ term_source (j_decompress_ptr jd) } // namespace mozilla @@ -377,6 +377,6 @@ index 8fa8200..1d2a259 100644 +#endif + + - /**************** Inverted CMYK -> RGB conversion **************/ - /* - * Input is (Inverted) CMYK stored as 4 bytes per pixel. + ///*************** Inverted CMYK -> RGB conversion ************************* + /// Input is (Inverted) CMYK stored as 4 bytes per pixel. + /// Output is RGB stored as 3 bytes per pixel. diff --git a/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp b/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp new file mode 100644 index 000000000000..530902b13393 --- /dev/null +++ b/www/libxul/files/patch-media-libstagefright-foundation-AString.cpp @@ -0,0 +1,16 @@ +--- media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp~ ++++ media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp +@@ -23,6 +23,13 @@ + #include "ADebug.h" + #include "AString.h" + ++#ifdef __FreeBSD__ ++# include <osreldate.h> ++# if __FreeBSD_version < 900506 ++# undef tolower ++# endif ++#endif ++ + namespace stagefright { + + // static diff --git a/www/libxul/files/patch-system-openh264 b/www/libxul/files/patch-system-openh264 new file mode 100644 index 000000000000..e694b28f436e --- /dev/null +++ b/www/libxul/files/patch-system-openh264 @@ -0,0 +1,239 @@ +# Revert bug 1045209 to allow using absolute path + +diff --git dom/media/gmp/GMPChild.cpp dom/media/gmp/GMPChild.cpp +index 1dde3ac..12c88cf 100644 +--- dom/media/gmp/GMPChild.cpp ++++ dom/media/gmp/GMPChild.cpp +@@ -76,21 +76,14 @@ GetFileBase(const std::string& aPluginPa + } + #endif + +- nsCOMPtr<nsIFile> parent; +- rv = aFileBase->GetParent(getter_AddRefs(parent)); +- if (NS_FAILED(rv)) { +- return false; +- } +- +- nsAutoString parentLeafName; +- rv = parent->GetLeafName(parentLeafName); +- if (NS_FAILED(rv)) { ++ nsAutoString leafName; ++ if (NS_FAILED(aFileBase->GetLeafName(leafName))) { + return false; + } + +- aBaseName = Substring(parentLeafName, ++ aBaseName = Substring(leafName, + 4, +- parentLeafName.Length() - 1); ++ leafName.Length() - 1); + return true; + } + +diff --git dom/media/gmp/GMPParent.cpp dom/media/gmp/GMPParent.cpp +index aa60acf..90878ca 100644 +--- dom/media/gmp/GMPParent.cpp ++++ dom/media/gmp/GMPParent.cpp +@@ -90,23 +90,16 @@ + mService = aService; + mDirectory = aPluginDir; + +- // aPluginDir is <profile-dir>/<gmp-plugin-id>/<version> +- // where <gmp-plugin-id> should be gmp-gmpopenh264 +- nsCOMPtr<nsIFile> parent; +- nsresult rv = aPluginDir->GetParent(getter_AddRefs(parent)); +- if (NS_FAILED(rv)) { +- return rv; +- } +- nsAutoString parentLeafName; +- rv = parent->GetLeafName(parentLeafName); ++ nsAutoString leafname; ++ nsresult rv = aPluginDir->GetLeafName(leafname); + if (NS_FAILED(rv)) { + return rv; + } + LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this, +- NS_LossyConvertUTF16toASCII(parentLeafName).get())); ++ NS_LossyConvertUTF16toASCII(leafname).get())); + +- MOZ_ASSERT(parentLeafName.Length() > 4); +- mName = Substring(parentLeafName, 4); ++ MOZ_ASSERT(leafname.Length() > 4); ++ mName = Substring(leafname, 4); + + return ReadGMPMetaData(); + } +diff --git toolkit/modules/GMPInstallManager.jsm toolkit/modules/GMPInstallManager.jsm +index 9593492..470384b 100644 +--- toolkit/modules/GMPInstallManager.jsm ++++ toolkit/modules/GMPInstallManager.jsm +@@ -888,9 +889,7 @@ + let gmpAddon = this._gmpAddon; + let installToDirPath = Cc["@mozilla.org/file/local;1"]. + createInstance(Ci.nsIFile); +- let path = OS.Path.join(OS.Constants.Path.profileDir, +- gmpAddon.id, +- gmpAddon.version); ++ let path = OS.Path.join(OS.Constants.Path.profileDir, gmpAddon.id); + installToDirPath.initWithPath(path); + log.info("install to directory path: " + installToDirPath.path); + let gmpInstaller = new GMPExtractor(zipPath, installToDirPath.path); +@@ -885,10 +883,12 @@ + // Success, set the prefs + let now = Math.round(Date.now() / 1000); + GMPPrefs.set(GMPPrefs.KEY_PLUGIN_LAST_UPDATE, now, gmpAddon.id); +- // Setting the version pref signals installation completion to consumers, +- // if you need to set other prefs etc. do it before this. ++ // Setting the path pref signals installation completion to consumers, ++ // so set the version and potential other information they use first. + GMPPrefs.set(GMPPrefs.KEY_PLUGIN_VERSION, gmpAddon.version, + gmpAddon.id); ++ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_PATH, ++ installToDirPath.path, gmpAddon.id); + this._deferred.resolve(extractedPaths); + }, err => { + this._deferred.reject(err); +diff --git toolkit/modules/GMPUtils.jsm toolkit/modules/GMPUtils.jsm +index 1f3a0b1..93517be 100644 +--- toolkit/modules/GMPUtils.jsm ++++ toolkit/modules/GMPUtils.jsm +@@ -70,6 +70,7 @@ this.GMPPrefs = { + KEY_EME_ENABLED: "media.eme.enabled", + KEY_PLUGIN_ENABLED: "media.{0}.enabled", + KEY_PLUGIN_LAST_UPDATE: "media.{0}.lastUpdate", ++ KEY_PLUGIN_PATH: "media.{0}.path", + KEY_PLUGIN_VERSION: "media.{0}.version", + KEY_PLUGIN_AUTOUPDATE: "media.{0}.autoupdate", + KEY_PLUGIN_FORCEVISIBLE: "media.{0}.forcevisible", +diff --git toolkit/mozapps/extensions/internal/GMPProvider.jsm toolkit/mozapps/extensions/internal/GMPProvider.jsm +index 1f3a0b1..93517be 100644 +--- toolkit/mozapps/extensions/internal/GMPProvider.jsm ++++ toolkit/mozapps/extensions/internal/GMPProvider.jsm +@@ -100,12 +100,11 @@ + Log.repository.getLoggerWithMessagePrefix("Toolkit.GMP", + "GMPWrapper(" + + this._plugin.id + ") "); +- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, +- this._plugin.id), ++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, this._plugin.id), + this.onPrefEnabledChanged, this); +- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION, ++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH, + this._plugin.id), +- this.onPrefVersionChanged, this); ++ this.onPrefPathChanged, this); + if (this._plugin.isEME) { + Preferences.observe(GMPPrefs.KEY_EME_ENABLED, + this.onPrefEMEGlobalEnabledChanged, this); +@@ -120,17 +119,14 @@ + optionsType: AddonManager.OPTIONS_TYPE_INLINE, + get optionsURL() { return this._plugin.optionsURL; }, + ++ + set gmpPath(aPath) { this._gmpPath = aPath; }, + get gmpPath() { +- if (!this._gmpPath && this.isInstalled) { +- this._gmpPath = OS.Path.join(OS.Constants.Path.profileDir, +- this._plugin.id, +- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, +- null, this._plugin.id)); ++ if (!this._gmpPath) { ++ this._gmpPath = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); + } + return this._gmpPath; + }, +- + get id() { return this._plugin.id; }, + get type() { return "plugin"; }, + get isGMPlugin() { return true; }, +@@ -141,8 +137,13 @@ + get description() { return this._plugin.description; }, + get fullDescription() { return this._plugin.fullDescription; }, + +- get version() { return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null, +- this._plugin.id); }, ++ get version() { ++ if (this.isInstalled) { ++ return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null, ++ this._plugin.id); ++ } ++ return null; ++ }, + + get isActive() { return !this.appDisabled && !this.userDisabled; }, + get appDisabled() { +@@ -289,24 +290,17 @@ + + get pluginMimeTypes() { return []; }, + get pluginLibraries() { +- if (this.isInstalled) { +- let path = this.version; +- return [path]; +- } +- return []; ++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); ++ return path && path.length ? [OS.Path.basename(path)] : []; + }, + get pluginFullpath() { +- if (this.isInstalled) { +- let path = OS.Path.join(OS.Constants.Path.profileDir, +- this._plugin.id, +- this.version); +- return [path]; +- } +- return []; ++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); ++ return path && path.length ? [path] : []; + }, + + get isInstalled() { +- return this.version && this.version.length > 0; ++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); ++ return path && path.length > 0; + }, + + _handleEnabledChanged: function() { +@@ -362,10 +356,10 @@ + } + }, + +- onPrefVersionChanged: function() { ++ onPrefPathChanged: function() { + AddonManagerPrivate.callAddonListeners("onUninstalling", this, false); + if (this._gmpPath) { +- this._log.info("onPrefVersionChanged() - unregistering gmp directory " + ++ this._log.info("onPrefPathChanged() - unregistering gmp directory " + + this._gmpPath); + gmpService.removePluginDirectory(this._gmpPath); + } +@@ -374,15 +368,10 @@ + AddonManagerPrivate.callInstallListeners("onExternalInstall", null, this, + null, false); + AddonManagerPrivate.callAddonListeners("onInstalling", this, false); +- this._gmpPath = null; +- if (this.isInstalled) { +- this._gmpPath = OS.Path.join(OS.Constants.Path.profileDir, +- this._plugin.id, +- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, +- null, this._plugin.id)); +- } ++ this._gmpPath = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, ++ null, this._plugin.id); + if (this._gmpPath && this.isActive) { +- this._log.info("onPrefVersionChanged() - registering gmp directory " + ++ this._log.info("onPrefPathChanged() - registering gmp directory " + + this._gmpPath); + gmpService.addPluginDirectory(this._gmpPath); + } +@@ -393,9 +382,9 @@ + Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, + this._plugin.id), + this.onPrefEnabledChanged, this); +- Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION, ++ Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH, + this._plugin.id), +- this.onPrefVersionChanged, this); ++ this.onPrefPathChanged, this); + if (this._plugin.isEME) { + Preferences.ignore(GMPPrefs.KEY_EME_ENABLED, + this.onPrefEMEGlobalEnabledChanged, this); diff --git a/www/libxul/files/patch-z-bug517422 b/www/libxul/files/patch-z-bug517422 index 1c0f0dd2aab8..0137e4858cf8 100644 --- a/www/libxul/files/patch-z-bug517422 +++ b/www/libxul/files/patch-z-bug517422 @@ -4,7 +4,7 @@ diff --git config/Makefile.in config/Makefile.in index 5383399..0410004 100644 --- config/Makefile.in +++ config/Makefile.in -@@ -79,6 +79,13 @@ export:: $(export-preqs) +@@ -77,6 +77,14 @@ export:: $(export-preqs) -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \ @@ -12,6 +12,7 @@ index 5383399..0410004 100644 + -DMOZ_NATIVE_THEORA=$(MOZ_NATIVE_THEORA) \ + -DMOZ_NATIVE_VORBIS=$(MOZ_NATIVE_VORBIS) \ + -DMOZ_NATIVE_TREMOR=$(MOZ_NATIVE_TREMOR) \ ++ -DMOZ_NATIVE_CELT=$(MOZ_NATIVE_CELT) \ + -DMOZ_NATIVE_OPUS=$(MOZ_NATIVE_OPUS) \ + -DMOZ_NATIVE_SPEEX=$(MOZ_NATIVE_SPEEX) \ + -DMOZ_NATIVE_SOUNDTOUCH=$(MOZ_NATIVE_SOUNDTOUCH) \ @@ -22,14 +23,17 @@ diff --git config/external/moz.build config/external/moz.build index f67c5c7..eb909ce 100644 --- config/external/moz.build +++ config/external/moz.build -@@ -15,13 +15,19 @@ if CONFIG['MOZ_UPDATER']: - if not CONFIG['MOZ_NATIVE_BZ2']: - external_dirs += ['modules/libbz2'] +@@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']: + # There's no "native brotli" yet, but probably in the future... + external_dirs += ['modules/brotli'] -if CONFIG['MOZ_VORBIS']: +if not CONFIG['MOZ_NATIVE_OGG']: + external_dirs += ['media/libogg'] + ++if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']: ++ external_dirs += ['media/libopus'] ++ +if not CONFIG['MOZ_NATIVE_THEORA']: + external_dirs += ['media/libtheora'] + @@ -40,12 +44,8 @@ index f67c5c7..eb909ce 100644 +if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']: external_dirs += ['media/libtremor'] --if CONFIG['MOZ_OPUS']: -+if CONFIG['MOZ_OPUS'] and not CONFIG['MOZ_NATIVE_OPUS']: - external_dirs += ['media/libopus'] - if CONFIG['MOZ_WEBM']: -@@ -36,13 +42,15 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']: +@@ -37,15 +46,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ if not CONFIG['MOZ_NATIVE_PNG']: external_dirs += ['media/libpng'] @@ -59,35 +59,35 @@ index f67c5c7..eb909ce 100644 'media/kiss_fft', 'media/libcubeb', - 'media/libogg', +- 'media/libopus', - 'media/libtheora', - 'media/libspeex_resampler', + 'media/libstagefright', - 'media/libsoundtouch', ] - PARALLEL_DIRS += ['../../' + i for i in external_dirs] + DIRS += ['../../' + i for i in external_dirs] diff --git config/system-headers config/system-headers index bef567c..9807c29 100644 --- config/system-headers +++ config/system-headers -@@ -1050,8 +1050,6 @@ X11/Xutil.h - xpt_struct.h - xpt_xdr.h +@@ -1263,7 +1263,6 @@ X11/Xlocale.h + X11/Xos.h + X11/Xutil.h zmouse.h --speex/speex_resampler.h -soundtouch/SoundTouch.h #if MOZ_NATIVE_PNG==1 png.h #endif -@@ -1119,6 +1117,8 @@ ogg/ogg.h +@@ -1325,6 +1324,7 @@ vorbis/codec.h + theora/theoradec.h + tremor/ivorbiscodec.h + speex/speex_resampler.h ++soundtouch/SoundTouch.h + ogg/ogg.h ogg/os_types.h nestegg/nestegg.h - cubeb/cubeb.h -+speex/speex_resampler.h -+soundtouch/SoundTouch.h - #endif - gst/gst.h - gst/app/gstappsink.h -@@ -1155,3 +1155,29 @@ graphite2/Segment.h +@@ -1365,3 +1365,35 @@ graphite2/Segment.h harfbuzz/hb-ot.h harfbuzz/hb.h #endif @@ -105,6 +105,12 @@ index bef567c..9807c29 100644 +#if MOZ_NATIVE_TREMOR==1 +tremor/ivorbiscodec.h +#endif ++#if MOZ_NATIVE_CELT==1 ++celt.h ++celt_header.h ++celt/celt.h ++celt/celt_header.h ++#endif +#if MOZ_NATIVE_OPUS==1 +opus.h +opus_multistream.h @@ -121,7 +127,7 @@ diff --git configure.in configure.in index 87db361..7947626 100644 --- configure.in +++ configure.in -@@ -5211,6 +5211,63 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then +@@ -5223,6 +5223,157 @@ if test "${ac_cv_c_attribute_aligned}" ! fi dnl ======================================================== @@ -144,8 +150,6 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_OGG) -+AC_SUBST(MOZ_OGG_CFLAGS) -+AC_SUBST(MOZ_OGG_LIBS) + +dnl ======================================================== +dnl Check for libvorbis @@ -161,8 +165,6 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_VORBIS) -+AC_SUBST(MOZ_VORBIS_CFLAGS) -+AC_SUBST(MOZ_VORBIS_LIBS) + +dnl ======================================================== +dnl Check for integer-only libvorbis aka tremor @@ -178,17 +180,25 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_TREMOR) -+AC_SUBST(MOZ_TREMOR_CFLAGS) -+AC_SUBST(MOZ_TREMOR_LIBS) + +dnl ======================================================== - dnl = Disable Opus audio codec support - dnl ======================================================== - MOZ_ARG_DISABLE_BOOL(opus, -@@ -5219,6 +5274,97 @@ MOZ_ARG_DISABLE_BOOL(opus, - MOZ_OPUS=1) - - dnl ======================================================== ++dnl Check for libcelt ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-celt, ++[ --with-system-celt Use system libcelt (located with pkgconfig)], ++MOZ_NATIVE_CELT=1, ++MOZ_NATIVE_CELT=) ++ ++if test -n "$MOZ_NATIVE_CELT"; then ++ PKG_CHECK_MODULES(MOZ_CELT, celt) ++else ++ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus' ++fi ++ ++AC_SUBST(MOZ_NATIVE_CELT) ++ ++dnl ======================================================== +dnl Check for libopus +dnl ======================================================== + @@ -204,8 +214,6 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_OPUS) -+AC_SUBST(MOZ_OPUS_CFLAGS) -+AC_SUBST(MOZ_OPUS_LIBS) + +dnl ======================================================== +dnl Check for libtheora @@ -221,8 +229,6 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_THEORA) -+AC_SUBST(MOZ_THEORA_CFLAGS) -+AC_SUBST(MOZ_THEORA_LIBS) + +dnl ======================================================== +dnl Check for libspeex resampler @@ -238,8 +244,6 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_SPEEX) -+AC_SUBST(MOZ_SPEEX_CFLAGS) -+AC_SUBST(MOZ_SPEEX_LIBS) + +dnl ======================================================== +dnl Check for libsoundtouch @@ -276,19 +280,17 @@ index 87db361..7947626 100644 +fi + +AC_SUBST(MOZ_NATIVE_SOUNDTOUCH) -+AC_SUBST(MOZ_SOUNDTOUCH_CFLAGS) -+AC_SUBST(MOZ_SOUNDTOUCH_LIBS) + +dnl ======================================================== dnl = Disable VP8 decoder support dnl ======================================================== MOZ_ARG_DISABLE_BOOL(webm, -diff --git content/media/AudioStream.h content/media/AudioStream.h +diff --git dom/media/AudioStream.h dom/media/AudioStream.h index 085676d..00c54fb 100644 ---- content/media/AudioStream.h -+++ content/media/AudioStream.h -@@ -26,7 +26,7 @@ public: - }; +--- dom/media/AudioStream.h ++++ dom/media/AudioStream.h +@@ -17,7 +17,7 @@ + #include "CubebUtils.h" namespace soundtouch { -class SoundTouch; @@ -296,177 +298,265 @@ index 085676d..00c54fb 100644 } namespace mozilla { -diff --git content/media/Makefile.in content/media/Makefile.in -index fd34449..c6c42c8 100644 ---- content/media/Makefile.in -+++ content/media/Makefile.in -@@ -6,3 +6,31 @@ include $(topsrcdir)/config/rules.mk +diff --git dom/media/moz.build dom/media/moz.build +index 7526cff..e0a0ca0 100644 +--- dom/media/moz.build ++++ dom/media/moz.build +@@ -212,3 +212,24 @@ if CONFIG['ANDROID_VERSION'] > '15': + + CFLAGS += CONFIG['GSTREAMER_CFLAGS'] + CXXFLAGS += CONFIG['GSTREAMER_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_OGG']: ++ CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_THEORA']: ++ CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_VORBIS']: ++ CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_TREMOR']: ++ CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_OPUS']: ++ CXXFLAGS += CONFIG['MOZ_OPUS_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_SPEEX']: ++ CXXFLAGS += CONFIG['MOZ_SPEEX_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']: ++ CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS'] +diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build +index 944744d..9a7c8c0 100644 +--- media/libcubeb/src/moz.build ++++ media/libcubeb/src/moz.build +@@ -65,6 +65,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']: - CFLAGS += $(GSTREAMER_CFLAGS) - CXXFLAGS += $(GSTREAMER_CFLAGS) -+ -+ifdef MOZ_NATIVE_OGG -+CXXFLAGS += $(MOZ_OGG_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_THEORA -+CXXFLAGS += $(MOZ_THEORA_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_VORBIS -+CXXFLAGS += $(MOZ_VORBIS_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_TREMOR -+CXXFLAGS += $(MOZ_TREMOR_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_OPUS -+CXXFLAGS += $(MOZ_OPUS_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_SPEEX -+CXXFLAGS += $(MOZ_SPEEX_CFLAGS) -+endif -+ -+ifdef MOZ_NATIVE_SOUNDTOUCH -+CXXFLAGS += $(MOZ_SOUNDTOUCH_CFLAGS) -+endif -diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in -index 4c14494..1cb98e2 100644 ---- media/libcubeb/src/Makefile.in -+++ media/libcubeb/src/Makefile.in -@@ -9,3 +9,7 @@ CFLAGS += \ - $(MOZ_ALSA_CFLAGS) \ - $(MOZ_PULSEAUDIO_CFLAGS) \ - $(NULL) -+ -+ifdef MOZ_NATIVE_SPEEX -+CFLAGS += $(MOZ_SPEEX_CFLAGS) -+endif -diff --git media/libtheora/Makefile.in media/libtheora/Makefile.in -new file mode 100644 -index 0000000..1f02dc0 ---- /dev/null -+++ media/libtheora/Makefile.in -@@ -0,0 +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/. -+ -+include $(topsrcdir)/config/rules.mk -+ -+ifdef MOZ_NATIVE_OGG -+CFLAGS += $(MOZ_OGG_CFLAGS) -+endif -diff --git media/libtremor/Makefile.in media/libtremor/Makefile.in -new file mode 100644 -index 0000000..1f02dc0 ---- /dev/null -+++ media/libtremor/Makefile.in -@@ -0,0 +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/. -+ -+include $(topsrcdir)/config/rules.mk -+ -+ifdef MOZ_NATIVE_OGG -+CFLAGS += $(MOZ_OGG_CFLAGS) -+endif -diff --git media/libvorbis/Makefile.in media/libvorbis/Makefile.in -new file mode 100644 -index 0000000..1f02dc0 ---- /dev/null -+++ media/libvorbis/Makefile.in -@@ -0,0 +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/. -+ -+include $(topsrcdir)/config/rules.mk -+ -+ifdef MOZ_NATIVE_OGG -+CFLAGS += $(MOZ_OGG_CFLAGS) -+endif -diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in + FINAL_LIBRARY = 'gkmedias' + ++if CONFIG['MOZ_NATIVE_SPEEX']: ++ SOURCES['cubeb_resampler.cpp'].flags += CONFIG['MOZ_SPEEX_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': + CFLAGS += [ + '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ +diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA +index 0833e4d..7ece97b 100644 +--- media/libogg/README_MOZILLA ++++ media/libogg/README_MOZILLA +@@ -6,3 +6,6 @@ The svn revision number used was r17287. + The int-types.patch address a bug that config_types.h generated from + Linux platform can't be used on OpenSolaris directly see Mozilla bug + 449754 ++ ++The in-tree copy may be omitted during build by --with-system-ogg. ++Keep version in configure.in in sync on updates. +diff --git media/libopus/README_MOZILLA media/libopus/README_MOZILLA +index 2d85c9f..d3fb9f8 100644 +--- media/libopus/README_MOZILLA ++++ media/libopus/README_MOZILLA +@@ -9,3 +9,6 @@ files after the copy step. + The upstream repository is https://git.xiph.org/opus.git + + The git tag/revision used was v1.1. ++ ++The in-tree copy may be omitted during build by --with-system-opus. ++So, keep its pkg-config version check within configure.in in sync on updates. +diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA +index bfd4b1a..15b158d 100644 +--- media/libsoundtouch/README_MOZILLA ++++ media/libsoundtouch/README_MOZILLA +@@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree, + using the script `update.sh`. Some changes have been made to the files, using + the patch `moz-libsoundtouch.patch`. We also use a custom soundtouch_config.h. + ++The in-tree copy may be omitted during build by --with-system-soundtouch. ++Keep version in configure.in in sync on updates. +diff --git media/libspeex_resampler/README_MOZILLA media/libspeex_resampler/README_MOZILLA +index 7f6b1bb..e830300 100644 +--- media/libspeex_resampler/README_MOZILLA ++++ media/libspeex_resampler/README_MOZILLA +@@ -3,3 +3,6 @@ This source is from the Speex DSP library + + It consists in the audio resampling code (resampler.c) and its header files + dependancies, imported into the tree using the update.sh script. ++ ++The in-tree copy may be omitted during build by --with-system-speex. ++Keep version in configure.in in sync on updates. +diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA +index d48dbfa..f08a2ed 100644 +--- media/libtheora/README_MOZILLA ++++ media/libtheora/README_MOZILLA +@@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh, + the addition/update of Makefile.in files for the Mozilla build system. + + The subversion revision used was r17578. ++ ++The in-tree copy may be omitted during build by --with-system-theora. ++Keep version in configure.in in sync on updates. +diff --git media/libtheora/moz.build media/libtheora/moz.build +index 14265b1..3069e99 100644 +--- media/libtheora/moz.build ++++ media/libtheora/moz.build +@@ -93,3 +93,5 @@ if CONFIG['GNU_AS']: + if CONFIG['OS_TARGET'] == 'Android': + DEFINES['__linux__'] = True + ++if CONFIG['MOZ_NATIVE_OGG']: ++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] +diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA +index ee67b53..3f34a09 100644 +--- media/libtremor/README_MOZILLA ++++ media/libtremor/README_MOZILLA +@@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system. + + The upstream release used was http://svn.xiph.org/trunk/Tremor/ + The subversion revision used was r17547. ++ ++The in-tree copy may be omitted during build by --with-system-tremor. ++Keep version in configure.in in sync on updates. +diff --git media/libtremor/moz.build media/libtremor/moz.build +index 31831ba..a03d576 100644 +--- media/libtremor/moz.build ++++ media/libtremor/moz.build +@@ -6,3 +6,5 @@ + + DIRS += ['include/tremor', 'lib'] + ++if CONFIG['MOZ_NATIVE_OGG']: ++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] +diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA +index 7c7454c..55baedd 100644 +--- media/libvorbis/README_MOZILLA ++++ media/libvorbis/README_MOZILLA +@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.4@19059 + + Some files are renamed during the copy to prevent clashes with object + file names with other Mozilla libraries. ++ ++The in-tree copy may be omitted during build by --with-system-vorbis. ++Keep version in configure.in in sync on updates. +diff --git media/libvorbis/moz.build media/libvorbis/moz.build +index 919b99e..cc776f7 100644 +--- media/libvorbis/moz.build ++++ media/libvorbis/moz.build +@@ -55,3 +55,6 @@ FINAL_LIBRARY = 'gkmedias' + # Suppress warnings in third-party code. + if CONFIG['GNU_CC']: + CFLAGS += ['-Wno-uninitialized'] ++ ++if CONFIG['MOZ_NATIVE_OGG']: ++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] +diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build index bbc971c..6ed7e41 100644 ---- media/webrtc/signaling/test/Makefile.in -+++ media/webrtc/signaling/test/Makefile.in -@@ -48,6 +48,12 @@ LIBS += \ - $(NULL) - endif +--- media/webrtc/signaling/test/moz.build ++++ media/webrtc/signaling/test/moz.build +@@ -127,6 +127,9 @@ if CONFIG['MOZ_ALSA']: + if CONFIG['MOZ_NATIVE_JPEG']: + OS_LIBS += CONFIG['MOZ_JPEG_LIBS'] + ++if CONFIG['MOZ_NATIVE_OPUS']: ++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS'] ++ + if CONFIG['MOZ_NATIVE_LIBVPX']: + OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS'] -+ifdef MOZ_NATIVE_OPUS -+LIBS += \ -+ $(MOZ_OPUS_LIBS) \ -+ $(NULL) -+endif -+ - ifdef MOZ_NATIVE_LIBVPX - LIBS += \ - $(MOZ_LIBVPX_LIBS) \ diff --git media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi index 00e77e7..55f48ab 100644 --- media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi +++ media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi -@@ -14,9 +14,9 @@ +@@ -17,18 +17,11 @@ 'conditions': [ ['build_with_mozilla==1', { # Mozilla provides its own build of the opus library. - 'include_dirs': [ - '/media/libopus/include', -- ] +- '/media/libopus/src', +- '/media/libopus/celt', + 'cflags_mozilla': [ ++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt', + '$(MOZ_OPUS_CFLAGS)', -+ ], ++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src', + ], +- 'direct_dependent_settings': { +- 'include_dirs': [ +- '/media/libopus/include', +- '/media/libopus/src', +- '/media/libopus/celt', +- ], +- }, }, { 'dependencies': [ '<(DEPTH)/third_party/opus/opus.gyp:opus' -diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk +diff --git media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi +index 00e77e7..55f48ab 100644 +--- media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi ++++ media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi +@@ -84,19 +84,11 @@ + ], + }], + ['build_with_mozilla==1', { +- 'include_dirs': [ +- # Need Opus header files for the audio classifier. +- '<(DEPTH)/../../../media/opus/celt', +-# '<(DEPTH)/third_party/opus/src/src', ++ 'cflags_mozilla': [ ++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt', ++ '$(MOZ_OPUS_CFLAGS)', ++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src', + ], +- 'direct_dependent_settings': { +- 'include_dirs': [ +- '../../../../../../media/opus/celt', +- # Need Opus header files for the audio classifier. +- '<(DEPTH)/../../../media/opus/celt', +-# '<(DEPTH)/third_party/opus/src/src', +- ], +- }, + }], + ], + 'sources': [ +diff --git toolkit/library/moz.build toolkit/library/moz.build index d42137a..695e75a8 100644 ---- toolkit/library/libxul.mk -+++ toolkit/library/libxul.mk -@@ -77,6 +77,34 @@ ifdef MOZ_NATIVE_HUNSPELL - EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS) - endif +--- toolkit/library/moz.build ++++ toolkit/library/moz.build +@@ -178,6 +178,30 @@ if CONFIG['MOZ_NATIVE_PNG']: + if CONFIG['MOZ_NATIVE_HUNSPELL']: + OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] + ++if CONFIG['MOZ_NATIVE_OGG']: ++ OS_LIBS += CONFIG['MOZ_OGG_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_THEORA']: ++ OS_LIBS += CONFIG['MOZ_THEORA_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_VORBIS']: ++ OS_LIBS += CONFIG['MOZ_VORBIS_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_TREMOR']: ++ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_CELT']: ++ OS_LIBS += CONFIG['MOZ_CELT_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_OPUS']: ++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_SPEEX']: ++ OS_LIBS += CONFIG['MOZ_SPEEX_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']: ++ OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS'] ++ + if CONFIG['MOZ_NATIVE_LIBEVENT']: + OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] -+ifdef MOZ_NATIVE_OGG -+EXTRA_DSO_LDOPTS += $(MOZ_OGG_LIBS) -+endif -+ -+ifdef MOZ_NATIVE_THEORA -+EXTRA_DSO_LDOPTS += $(MOZ_THEORA_LIBS) -+endif -+ -+ifdef MOZ_NATIVE_VORBIS -+EXTRA_DSO_LDOPTS += $(MOZ_VORBIS_LIBS) -+endif -+ -+ifdef MOZ_NATIVE_TREMOR -+EXTRA_DSO_LDOPTS += $(MOZ_TREMOR_LIBS) -+endif -+ -+ifdef MOZ_NATIVE_OPUS -+EXTRA_DSO_LDOPTS += $(MOZ_OPUS_LIBS) -+endif -+ -+ifdef MOZ_NATIVE_SPEEX -+EXTRA_DSO_LDOPTS += $(MOZ_SPEEX_LIBS) -+endif -+ -+ifdef MOZ_NATIVE_SOUNDTOUCH -+EXTRA_DSO_LDOPTS += $(MOZ_SOUNDTOUCH_LIBS) -+endif -+ - ifdef MOZ_NATIVE_LIBEVENT - EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS) - endif -diff --git xpcom/build/nsXPComInit.cpp xpcom/build/nsXPComInit.cpp +diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp index 2cf281e..6d7af0e 100644 ---- xpcom/build/nsXPComInit.cpp -+++ xpcom/build/nsXPComInit.cpp -@@ -130,7 +130,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **) +--- xpcom/build/XPCOMInit.cpp ++++ xpcom/build/XPCOMInit.cpp +@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**); #include "mozilla/VisualEventTracer.h" #endif @@ -476,17 +566,17 @@ index 2cf281e..6d7af0e 100644 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) #include "vpx_mem/vpx_mem.h" #endif -@@ -571,11 +573,13 @@ NS_InitXPCOM2(nsIServiceManager* *result, - // this oddness. - mozilla::SetICUMemoryFunctions(); +@@ -651,11 +653,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult, + // this oddness. + mozilla::SetICUMemoryFunctions(); +#ifndef MOZ_OGG_NO_MEM_REPORTING - // Do the same for libogg. - ogg_set_mem_functions(OggReporter::CountingMalloc, - OggReporter::CountingCalloc, - OggReporter::CountingRealloc, - OggReporter::CountingFree); + // Do the same for libogg. + ogg_set_mem_functions(OggReporter::CountingMalloc, + OggReporter::CountingCalloc, + OggReporter::CountingRealloc, + OggReporter::CountingFree); +#endif #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) - // And for VPX. + // And for VPX. |