summaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/Makefile41
-rw-r--r--www/firefox/Makefile.options3
-rw-r--r--www/firefox/distinfo4
-rw-r--r--www/firefox/files/patch-bug102176148
-rw-r--r--www/firefox/files/patch-bug104138112
-rw-r--r--www/firefox/files/patch-bug104622426
-rw-r--r--www/firefox/files/patch-bug107698345
-rw-r--r--www/firefox/files/patch-bug108219926
-rw-r--r--www/firefox/files/patch-bug109759241
-rw-r--r--www/firefox/files/patch-bug110385842
-rw-r--r--www/firefox/files/patch-bug70217934
-rw-r--r--www/firefox/files/patch-bug82698543
-rw-r--r--www/firefox/files/patch-bug847568196
-rw-r--r--www/firefox/files/patch-bug858919394
-rw-r--r--www/firefox/files/patch-bug877605305
-rw-r--r--www/firefox/files/patch-bug89912698
-rw-r--r--www/firefox/files/patch-duckduckgo47
-rw-r--r--www/firefox/files/patch-system-openh2646
-rw-r--r--www/firefox/files/patch-z-bug517422395
19 files changed, 1312 insertions, 494 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 4f27c5589fc1..64e2748d7ed0 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -2,18 +2,18 @@
# $FreeBSD$
PORTNAME= firefox
-DISTVERSION= 33.0
+DISTVERSION= 34.0.5
DISTVERSIONSUFFIX=.source
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
- https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source/
+ https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source/
MAINTAINER= gecko@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \
- nss>=3.16.2:${PORTSDIR}/security/nss \
+ nss>=3.17.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 \
@@ -22,7 +22,7 @@ BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \
libvorbis>=1.3.4:${PORTSDIR}/audio/libvorbis \
opus>=1.1:${PORTSDIR}/audio/opus \
libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \
- sqlite3>=3.8.4.2:${PORTSDIR}/databases/sqlite3 \
+ sqlite3>=3.8.6:${PORTSDIR}/databases/sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \
autoconf-2.13:${PORTSDIR}/devel/autoconf213 \
@@ -31,22 +31,17 @@ BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \
LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l
-OBJDIR_BUILD= # in-tree build broken after bug 789837
USE_GECKO= gecko
CONFLICTS= firefox-esr-31.* firefox-esr-24.* firefox-esr-17.*
MOZ_PKGCONFIG_FILES= # empty
USE_MOZILLA= # empty
MOZILLA_NAME= Firefox
-WANT_GNOME= yes
USE_QT5= # empty
QT_NONSTANDARD= yes
-ALL_TARGET= default
-GNU_CONFIGURE= yes
USE_GL= gl
USES= dos2unix tar:bzip2
DOS2UNIX_FILES= media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
-NO_MOZPKGINSTALL=yes
FIREFOX_ICON= ${MOZILLA}.png
FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default48.png
@@ -54,28 +49,16 @@ MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \
--enable-application=browser \
--enable-official-branding
+OPTIONS_DEFAULT= GTK2
+
+OPTIONS_SINGLE+= TOOLKIT
+OPTIONS_SINGLE_TOOLKIT= GTK2 GTK3
+
.include "${.CURDIR}/../../www/firefox/Makefile.options"
.include <bsd.port.pre.mk>
WRKSRC:= ${WRKDIR}/mozilla-release
-# avoid clang 3.2/3.3 crash in js/src/jsgc.cpp on refillFreeList<(js::AllowGC)1>
-# To be removed when 9.2R goes EOL. http://llvm.org/PR15840
-.if ${ARCH} == i386 && ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION:M3[23]}
-. if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
-BROKEN= Cannot build with OPTIMIZED_CFLAGS option due to \
- a ${CHOSEN_COMPILER_TYPE} bug: unset the option or \
- use FAVORITE_COMPILER=gcc in Makefile.local/make.conf
-# apply workaround only for -O2 or greater
-. elif ${CXXFLAGS:M-O*} && ! ${CXXFLAGS:M-O[01]}
-. if ${MACHINE_CPU:Msse2}
-CXXFLAGS+= -msse2
-. else
-CXXFLAGS+= -O1
-. endif
-. endif
-.endif
-
.if ${PORT_OPTIONS:MALSA}
RUN_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib
.endif
@@ -84,6 +67,12 @@ 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.3:${PORTSDIR}/x11-toolkits/gtk30
+# XXX ports/195455
+RUN_DEPENDS+= adwaita-icon-theme>=3.14:${PORTSDIR}/x11-themes/adwaita-icon-theme
+.endif
+
post-extract:
@${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \
-e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \
diff --git a/www/firefox/Makefile.options b/www/firefox/Makefile.options
index 3fe874eee153..d7db550caedc 100644
--- a/www/firefox/Makefile.options
+++ b/www/firefox/Makefile.options
@@ -2,8 +2,7 @@
OPTIONS_DEFINE+= DBUS DEBUG DTRACE GCONF GIO GNOMEUI GNOMEVFS2 GSTREAMER \
LIBPROXY LOGGING OPTIMIZED_CFLAGS PGO PROFILE TEST
-OPTIONS_DEFAULT+= ALSA DBUS GIO GSTREAMER LOGGING
-OPTIONS_DEFAULT_amd64= OPTIMIZED_CFLAGS
+OPTIONS_DEFAULT+= ALSA DBUS GIO GSTREAMER LOGGING OPTIMIZED_CFLAGS
OPTIONS_MULTI+= AUDIO
OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index a6126851c48a..51be1176a956 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-33.0.source.tar.bz2) = 1018c2fae8c54c8a45f5a3ce348a2617a3f8039a789b09b7cfa5a27be069b229
-SIZE (firefox-33.0.source.tar.bz2) = 155177527
+SHA256 (firefox-34.0.5.source.tar.bz2) = 1680191ff7d4c465c0e6a5d7d6ff7a426f5bfa64f8d6d68a4bdfa9ac4ee459c8
+SIZE (firefox-34.0.5.source.tar.bz2) = 164333716
diff --git a/www/firefox/files/patch-bug1021761 b/www/firefox/files/patch-bug1021761
index cf179649803d..e8721fa8806f 100644
--- a/www/firefox/files/patch-bug1021761
+++ b/www/firefox/files/patch-bug1021761
@@ -235,12 +235,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);
@@ -660,7 +660,7 @@ new file mode 100644
index 0000000..5e38e27
--- /dev/null
+++ media/libcubeb/src/cubeb_oss.c
-@@ -0,0 +1,399 @@
+@@ -0,0 +1,404 @@
+/*
+ * Copyright © 2014 Mozilla Foundation
+ *
@@ -1058,7 +1058,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
@@ -1084,18 +1089,17 @@ index 8b7a0dd..31212ce 100644
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
-diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
+diff --git toolkit/library/moz.build toolkit/library/moz.build
index e191f13..4fb268a 100644
---- toolkit/library/libxul.mk
-+++ toolkit/library/libxul.mk
-@@ -146,6 +146,10 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32
- endif
- endif
-
-+ifdef MOZ_OSS
-+EXTRA_DSO_LDOPTS += $(MOZ_OSS_LIBS)
-+endif
-+
- ifdef MOZ_ALSA
- EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
- endif
+--- toolkit/library/moz.build
++++ toolkit/library/moz.build
+@@ -239,6 +239,9 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
++
+ if CONFIG['MOZ_ALSA']:
+ OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
+
diff --git a/www/firefox/files/patch-bug1041381 b/www/firefox/files/patch-bug1041381
deleted file mode 100644
index ef90b7b00c3f..000000000000
--- a/www/firefox/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/firefox/files/patch-bug1046224 b/www/firefox/files/patch-bug1046224
deleted file mode 100644
index 50d268f8fabe..000000000000
--- a/www/firefox/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/firefox/files/patch-bug1076983 b/www/firefox/files/patch-bug1076983
deleted file mode 100644
index 182aadf58bf5..000000000000
--- a/www/firefox/files/patch-bug1076983
+++ /dev/null
@@ -1,45 +0,0 @@
-commit e10ee74
-Author: Martin Thomson <martin.thomson@gmail.com>
-Date: Tue Oct 14 17:17:35 2014 -0700
-
- Bug 1076983 - Disabling SSL 3.0 with pref
----
- netwerk/base/public/security-prefs.js | 2 +-
- security/manager/ssl/src/nsNSSComponent.cpp | 7 +++----
- 2 files changed, 4 insertions(+), 5 deletions(-)
-
-diff --git netwerk/base/public/security-prefs.js netwerk/base/public/security-prefs.js
-index 352552e..c12731b 100644
---- netwerk/base/public/security-prefs.js
-+++ netwerk/base/public/security-prefs.js
-@@ -2,7 +2,7 @@
- * 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/. */
-
--pref("security.tls.version.min", 0);
-+pref("security.tls.version.min", 1);
- pref("security.tls.version.max", 3);
-
- pref("security.ssl.allow_unrestricted_renego_everywhere__temporarily_available_pref", false);
-diff --git security/manager/ssl/src/nsNSSComponent.cpp security/manager/ssl/src/nsNSSComponent.cpp
-index 8cab67b..772959d 100644
---- security/manager/ssl/src/nsNSSComponent.cpp
-+++ security/manager/ssl/src/nsNSSComponent.cpp
-@@ -829,14 +829,13 @@ void nsNSSComponent::setValidationOptions(bool isInitialSetting,
- mDefaultCertVerifier = new SharedCertVerifier(odc, osc, ogc, pinningMode);
- }
-
--// Enable the TLS versions given in the prefs, defaulting to SSL 3.0 (min
--// version) and TLS 1.2 (max version) when the prefs aren't set or set to
--// invalid values.
-+// Enable the TLS versions given in the prefs, defaulting to TLS 1.0 (min) and
-+// TLS 1.2 (max) when the prefs aren't set or set to invalid values.
- nsresult
- nsNSSComponent::setEnabledTLSVersions()
- {
- // keep these values in sync with security-prefs.js
-- static const int32_t PSM_DEFAULT_MIN_TLS_VERSION = 0;
-+ static const int32_t PSM_DEFAULT_MIN_TLS_VERSION = 1;
- static const int32_t PSM_DEFAULT_MAX_TLS_VERSION = 3;
-
- int32_t minVersion = Preferences::GetInt("security.tls.version.min",
diff --git a/www/firefox/files/patch-bug1082199 b/www/firefox/files/patch-bug1082199
new file mode 100644
index 000000000000..a10356adaa5b
--- /dev/null
+++ b/www/firefox/files/patch-bug1082199
@@ -0,0 +1,26 @@
+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/firefox/files/patch-bug1097592 b/www/firefox/files/patch-bug1097592
new file mode 100644
index 000000000000..5c1833b60688
--- /dev/null
+++ b/www/firefox/files/patch-bug1097592
@@ -0,0 +1,41 @@
+commit a822f9a
+Author: Martin Stransky <stransky@redhat.com>
+Date: Fri Nov 14 06:32:00 2014 +0100
+
+ Bug 1097592 - Don't use PR_FindFunctionSymbolAndLibrary to avoid app freeze, r=karlt
+---
+ widget/gtk/mozgtk/mozgtk.c | 1 +
+ widget/gtk/nsWindow.cpp | 8 +-------
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git widget/gtk/mozgtk/mozgtk.c widget/gtk/mozgtk/mozgtk.c
+index 11829d7..3b46759 100644
+--- widget/gtk/mozgtk/mozgtk.c
++++ widget/gtk/mozgtk/mozgtk.c
+@@ -121,6 +121,7 @@ STUB(gdk_x11_lookup_xdisplay)
+ STUB(gdk_x11_screen_get_xscreen)
+ STUB(gdk_x11_visual_get_xvisual)
+ STUB(gdk_x11_window_lookup_for_display)
++STUB(gdk_x11_window_set_user_time)
+ STUB(gdk_x11_xatom_to_atom)
+ STUB(gtk_accel_label_new)
+ STUB(gtk_alignment_get_type)
+diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
+index 26c333b..d462f13 100644
+--- widget/gtk/nsWindow.cpp
++++ widget/gtk/nsWindow.cpp
+@@ -1295,13 +1295,7 @@ SetUserTimeAndStartupIDForActivatedWindow(GtkWidget* aWindow)
+ }
+
+ if (sn_launchee_context_get_id_has_timestamp(ctx)) {
+- PRLibrary* gtkLibrary;
+- SetUserTimeFunc setUserTimeFunc = (SetUserTimeFunc)
+- PR_FindFunctionSymbolAndLibrary("gdk_x11_window_set_user_time", &gtkLibrary);
+- if (setUserTimeFunc) {
+- setUserTimeFunc(gdkWindow, sn_launchee_context_get_timestamp(ctx));
+- PR_UnloadLibrary(gtkLibrary);
+- }
++ gdk_x11_window_set_user_time(gdkWindow, sn_launchee_context_get_timestamp(ctx));
+ }
+
+ sn_launchee_context_setup_window(ctx, gdk_x11_window_get_xid(gdkWindow));
diff --git a/www/firefox/files/patch-bug1103858 b/www/firefox/files/patch-bug1103858
new file mode 100644
index 000000000000..16cfd9973a86
--- /dev/null
+++ b/www/firefox/files/patch-bug1103858
@@ -0,0 +1,42 @@
+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/firefox/files/patch-bug702179 b/www/firefox/files/patch-bug702179
index d7b90a082519..d1aa293d2237 100644
--- a/www/firefox/files/patch-bug702179
+++ b/www/firefox/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/firefox/files/patch-bug826985 b/www/firefox/files/patch-bug826985
index 4e20ff41d658..f75339d98a6b 100644
--- a/www/firefox/files/patch-bug826985
+++ b/www/firefox/files/patch-bug826985
@@ -38,18 +38,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
@@ -152,18 +152,15 @@ index d46b5aa..e452223 100644
}], # linux
['OS=="mac"', {
'sources': [
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
+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/firefox/files/patch-bug847568 b/www/firefox/files/patch-bug847568
index a065b937eae9..698ee2c498fc 100644
--- a/www/firefox/files/patch-bug847568
+++ b/www/firefox/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 ========================================================
@@ -50,12 +50,11 @@ index ac38f40..87536b7 100644
+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
+index a660ba4..6b2f602 100644
--- content/base/src/moz.build
+++ content/base/src/moz.build
-@@ -179,6 +179,9 @@ SOURCES += [
+@@ -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
-@@ -15,3 +15,7 @@ include $(topsrcdir)/config/rules.mk
- ifdef ENABLE_INTL_API
- LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
- 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
+@@ -63,3 +63,6 @@ GENERATED_FILES = [
+ LOCAL_INCLUDES += [
+ '../base/src',
+ ]
++
++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_ALSA']:
+ OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
+
diff --git a/www/firefox/files/patch-bug858919 b/www/firefox/files/patch-bug858919
new file mode 100644
index 000000000000..e1c38b9ec51e
--- /dev/null
+++ b/www/firefox/files/patch-bug858919
@@ -0,0 +1,394 @@
+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,10 +100,12 @@ 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, aData,
+- IPC::Principal(aPrincipal));
++ rv = sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
++ aAlertCookie, aAlertListener, aAlertName,
++ aBidi, aLang, aData,
++ 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,54 @@
++/* -*- 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,
++ const nsAString & aData,
++ 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/firefox/files/patch-bug877605 b/www/firefox/files/patch-bug877605
new file mode 100644
index 000000000000..fb1d5dbbcc12
--- /dev/null
+++ b/www/firefox/files/patch-bug877605
@@ -0,0 +1,305 @@
+commit d7cc508
+Author: Martin Stransky <stransky@redhat.com>
+Date: Thu Sep 4 05:17:00 2014 +0200
+
+ Bug 877605 - GTK3 - fixed tab widget rendering. r=karlt
+---
+ widget/gtk/gtk2drawing.c | 18 ++++++
+ widget/gtk/gtk3drawing.c | 121 ++++++++++++++++++++++++++++++----------
+ widget/gtk/gtkdrawing.h | 13 +++++
+ widget/gtk/nsNativeThemeGTK.cpp | 20 ++++---
+ 4 files changed, 136 insertions(+), 36 deletions(-)
+
+diff --git widget/gtk/gtk2drawing.c widget/gtk/gtk2drawing.c
+index 71e1929..290a17a 100644
+--- widget/gtk/gtk2drawing.c
++++ widget/gtk/gtk2drawing.c
+@@ -3013,6 +3013,24 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ }
+
+ gint
++moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
++ GtkTextDirection direction, GtkTabFlags flags)
++{
++ moz_gtk_get_widget_border(MOZ_GTK_TAB, left, top,
++ right, bottom, direction,
++ FALSE);
++
++ // Top tabs have no bottom border, bottom tabs have no top border
++ if (flags & MOZ_GTK_TAB_BOTTOM) {
++ *top = 0;
++ } else {
++ *bottom = 0;
++ }
++
++ return MOZ_GTK_SUCCESS;
++}
++
++gint
+ moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height)
+ {
+ /*
+diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c
+index 684650d..e9e21b1 100644
+--- widget/gtk/gtk3drawing.c
++++ widget/gtk/gtk3drawing.c
+@@ -2105,6 +2105,21 @@ moz_gtk_get_tab_thickness(void)
+ return border.top;
+ }
+
++static void
++moz_gtk_tab_prepare_style_context(GtkStyleContext *style,
++ GtkTabFlags flags)
++{
++ gtk_style_context_set_state(style, ((flags & MOZ_GTK_TAB_SELECTED) == 0) ?
++ GTK_STATE_FLAG_NORMAL :
++ GTK_STATE_FLAG_ACTIVE);
++ gtk_style_context_add_region(style, GTK_STYLE_REGION_TAB,
++ (flags & MOZ_GTK_TAB_FIRST) ?
++ GTK_REGION_FIRST : 0);
++ gtk_style_context_add_class(style, (flags & MOZ_GTK_TAB_BOTTOM) ?
++ GTK_STYLE_CLASS_BOTTOM :
++ GTK_STYLE_CLASS_TOP);
++}
++
+ /* actual small tabs */
+ static gint
+ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+@@ -2117,22 +2132,35 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+ * tab appear physically attached to the tabpanel; see details below. */
+
+ GtkStyleContext* style;
++ GdkRectangle tabRect;
+ GdkRectangle focusRect;
+ GdkRectangle backRect;
++ int initial_gap = 0;
+
+ ensure_tab_widget();
+ gtk_widget_set_direction(gTabWidget, direction);
+
+ style = gtk_widget_get_style_context(gTabWidget);
+- backRect = focusRect = *rect;
+-
+ gtk_style_context_save(style);
++ moz_gtk_tab_prepare_style_context(style, flags);
++
++ tabRect = *rect;
++
++ if (flags & MOZ_GTK_TAB_FIRST) {
++ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
++ tabRect.width -= initial_gap;
++
++ if (direction != GTK_TEXT_DIR_RTL) {
++ tabRect.x += initial_gap;
++ }
++ }
++
++ focusRect = backRect = tabRect;
+
+ if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
+ /* Only draw the tab */
+- gtk_style_context_set_state(style, GTK_STATE_FLAG_NORMAL);
+ gtk_render_extension(style, cr,
+- rect->x, rect->y, rect->width, rect->height,
++ tabRect.x, tabRect.y, tabRect.width, tabRect.height,
+ (flags & MOZ_GTK_TAB_BOTTOM) ?
+ GTK_POS_TOP : GTK_POS_BOTTOM );
+ } else {
+@@ -2186,24 +2214,19 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+ gap_loffset = gap_roffset = 20; /* should be enough */
+ if (flags & MOZ_GTK_TAB_FIRST) {
+ if (direction == GTK_TEXT_DIR_RTL)
+- gap_roffset = 0;
++ gap_roffset = initial_gap;
+ else
+- gap_loffset = 0;
++ gap_loffset = initial_gap;
+ }
+
+- gtk_style_context_set_state(style, GTK_STATE_FLAG_ACTIVE);
+-
+- /* Adwaita theme engine crashes without it (rhbz#713764) */
+- gtk_style_context_add_region(style, GTK_STYLE_REGION_TAB, 0);
+-
+ if (flags & MOZ_GTK_TAB_BOTTOM) {
+ /* Draw the tab on bottom */
+ focusRect.y += gap_voffset;
+ focusRect.height -= gap_voffset;
+
+ gtk_render_extension(style, cr,
+- rect->x, rect->y + gap_voffset, rect->width,
+- rect->height - gap_voffset, GTK_POS_TOP);
++ 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);
+
+@@ -2219,38 +2242,39 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+ cairo_clip(cr);
+
+ gtk_render_frame_gap(style, cr,
+- rect->x - gap_loffset,
+- rect->y + gap_voffset - 3 * gap_height,
+- rect->width + gap_loffset + gap_roffset,
++ 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 + rect->width);
++ gap_loffset, gap_loffset + tabRect.width);
+ cairo_restore(cr);
+ } else {
+ /* Draw the tab on top */
+ focusRect.height -= gap_voffset;
+ gtk_render_extension(style, cr,
+- rect->x, rect->y, rect->width,
+- rect->height - gap_voffset, GTK_POS_BOTTOM);
++ 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 += (rect->height - gap_voffset);
++ 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,
+- rect->x - gap_loffset,
+- rect->y + rect->height - gap_voffset,
+- rect->width + gap_loffset + gap_roffset,
++ 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 + rect->width);
++ gap_loffset, gap_loffset + tabRect.width);
+ cairo_restore(cr);
+ }
+ }
+@@ -2885,10 +2909,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+- case MOZ_GTK_TAB:
+- ensure_tab_widget();
+- w = gTabWidget;
+- break;
+ /* These widgets have no borders, since they are not containers. */
+ case MOZ_GTK_SPLITTER_HORIZONTAL:
+ case MOZ_GTK_SPLITTER_VERTICAL:
+@@ -2932,6 +2952,51 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ }
+
+ gint
++moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
++ GtkTextDirection direction, GtkTabFlags flags)
++{
++ GtkStyleContext* style;
++ int tab_curvature;
++
++ ensure_tab_widget();
++
++ style = gtk_widget_get_style_context(gTabWidget);
++ 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);
++ *left += tab_curvature;
++ *right += tab_curvature;
++
++ if (flags & MOZ_GTK_TAB_FIRST) {
++ int initial_gap;
++ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
++ if (direction == GTK_TEXT_DIR_RTL)
++ *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;
++ }
++
++ gtk_style_context_restore(style);
++
++ return MOZ_GTK_SUCCESS;
++}
++
++gint
+ moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height)
+ {
+ /*
+diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h
+index fb11105..1938e8f 100644
+--- widget/gtk/gtkdrawing.h
++++ widget/gtk/gtkdrawing.h
+@@ -259,6 +259,19 @@ gint moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ gboolean inhtml);
+
+ /**
++ * Get the border size of a notebook tab
++ * left/right: [OUT] the tab's left/right border
++ * top/bottom: [OUT] the tab's top/bottom border
++ * direction: the text direction for the widget
++ * flags: tab-dependant flags; see the GtkTabFlags definition.
++ *
++ * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
++ */
++gint
++moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
++ GtkTextDirection direction, GtkTabFlags flags);
++
++/**
+ * Get the desired size of a GtkCheckButton
+ * indicator_size: [OUT] the indicator size
+ * indicator_spacing: [OUT] the spacing between the indicator and its
+diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp
+index 969fb0a..62018e5 100644
+--- widget/gtk/nsNativeThemeGTK.cpp
++++ widget/gtk/nsNativeThemeGTK.cpp
+@@ -940,14 +940,18 @@ nsNativeThemeGTK::GetWidgetBorder(nsDeviceContext* aContext, nsIFrame* aFrame,
+ // but don't reserve any space for it.
+ break;
+ case NS_THEME_TAB:
+- // Top tabs have no bottom border, bottom tabs have no top border
+- moz_gtk_get_widget_border(MOZ_GTK_TAB, &aResult->left, &aResult->top,
+- &aResult->right, &aResult->bottom, direction,
+- FALSE);
+- if (IsBottomTab(aFrame))
+- aResult->top = 0;
+- else
+- aResult->bottom = 0;
++ {
++ GtkThemeWidgetType gtkWidgetType;
++ gint flags;
++
++ if (!GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, nullptr,
++ &flags))
++ return NS_OK;
++
++ moz_gtk_get_tab_border(&aResult->left, &aResult->top,
++ &aResult->right, &aResult->bottom, direction,
++ (GtkTabFlags)flags);
++ }
+ break;
+ case NS_THEME_MENUITEM:
+ case NS_THEME_CHECKMENUITEM:
diff --git a/www/firefox/files/patch-bug899126 b/www/firefox/files/patch-bug899126
new file mode 100644
index 000000000000..70a254c701b5
--- /dev/null
+++ b/www/firefox/files/patch-bug899126
@@ -0,0 +1,98 @@
+commit 0f63381
+Author: Guilherme Goncalves <guilherme.p.gonc@gmail.com>
+Date: Tue Nov 18 14:03:00 2014 -0800
+
+ Bug 899126 - Part 1 - Implement bin_unused for jemalloc3. r=glandium
+---
+ memory/build/mozjemalloc_compat.c | 57 ++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 56 insertions(+), 1 deletion(-)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 70265a7..0a9b21a 100644
+--- memory/build/mozjemalloc_compat.c
++++ memory/build/mozjemalloc_compat.c
+@@ -12,6 +12,8 @@
+ #include "jemalloc_types.h"
+ #include "mozilla/Types.h"
+
++#include <stdbool.h>
++
+ #if defined(MOZ_NATIVE_JEMALLOC)
+
+ MOZ_IMPORT_API int
+@@ -47,6 +49,16 @@ je_(nallocm)(size_t *rsize, size_t size, int flags);
+ je_(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
+ } while (0)
+
++#define CTL_IJ_GET(n, v, i, j) do { \
++ size_t mib[6]; \
++ size_t miblen = sizeof(mib) / sizeof(mib[0]); \
++ size_t sz = sizeof(v); \
++ je_(mallctlnametomib)(n, mib, &miblen); \
++ mib[2] = i; \
++ mib[4] = j; \
++ je_(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
++} while (0)
++
+ MOZ_MEMORY_API size_t
+ malloc_good_size_impl(size_t size)
+ {
+@@ -61,6 +73,48 @@ malloc_good_size_impl(size_t size)
+ return size;
+ }
+
++static size_t
++compute_bin_unused(unsigned int narenas)
++{
++ size_t bin_unused = 0;
++
++ uint32_t nregs; // number of regions per run in the j-th bin
++ size_t reg_size; // size of regions served by the j-th bin
++ size_t curruns; // number of runs belonging to a bin
++ size_t curregs; // number of allocated regions in a bin
++
++ unsigned int nbins; // number of bins per arena
++ unsigned int i, j;
++
++ // curruns and curregs are not defined for uninitialized arenas,
++ // so we skip them when computing bin_unused. However, initialized
++ // arenas are not guaranteed to be sequential, so we must test each
++ // one when iterating below.
++ bool initialized[100]; // should be narenas, but MSVC doesn't have VLAs
++ size_t isz = sizeof(initialized) / sizeof(initialized[0]);
++
++ je_(mallctl)("arenas.initialized", initialized, &isz, NULL, 0);
++ CTL_GET("arenas.nbins", nbins);
++
++ for (j = 0; j < nbins; j++) {
++ CTL_I_GET("arenas.bin.0.nregs", nregs, j);
++ CTL_I_GET("arenas.bin.0.size", reg_size, j);
++
++ for (i = 0; i < narenas; i++) {
++ if (!initialized[i]) {
++ continue;
++ }
++
++ CTL_IJ_GET("stats.arenas.0.bins.0.curruns", curruns, i, j);
++ CTL_IJ_GET("stats.arenas.0.bins.0.curregs", curregs, i, j);
++
++ bin_unused += (nregs * curruns - curregs) * reg_size;
++ }
++ }
++
++ return bin_unused;
++}
++
+ MOZ_JEMALLOC_API void
+ jemalloc_stats_impl(jemalloc_stats_t *stats)
+ {
+@@ -93,7 +147,8 @@ jemalloc_stats_impl(jemalloc_stats_t *stats)
+ // We could get this value out of base.c::base_pages, but that really should
+ // be an upstream change, so don't worry about it for now.
+ stats->bookkeeping = 0;
+- stats->bin_unused = 0;
++
++ stats->bin_unused = compute_bin_unused(narenas);
+ }
+
+ MOZ_JEMALLOC_API void
diff --git a/www/firefox/files/patch-duckduckgo b/www/firefox/files/patch-duckduckgo
deleted file mode 100644
index bc3a7e321f41..000000000000
--- a/www/firefox/files/patch-duckduckgo
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -r f2fa4ae74ee1 browser/locales/en-US/chrome/browser-region/region.properties
---- browser/locales/en-US/chrome/browser-region/region.properties Mon Oct 24 22:54:18 2011 +0300
-+++ browser/locales/en-US/chrome/browser-region/region.properties Tue Oct 25 21:13:40 2011 -0400
-@@ -9,6 +9,7 @@
- browser.search.order.1=Google
- browser.search.order.2=Yahoo
- browser.search.order.3=Bing
-+browser.search.order.4=DuckDuckGo
-
- # This is the default set of web based feed handlers shown in the reader
- # selection UI
---- /dev/null 2013-02-09 00:33:00.000000000 +0100
-+++ browser/locales/en-US/searchplugins/duckduckgo.xml 2013-02-09 00:40:19.000000000 +0100
-@@ -0,0 +1,11 @@
-+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
-+<ShortName>DuckDuckGo</ShortName>
-+<Description>We believe in better search and not tracking.</Description>
-+<InputEncoding>UTF-8</InputEncoding>
-+<Image height="16" width="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8nIOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rBUv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n//////05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v////////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9hXPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8nIOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDsAScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMADAADwDwAA+B8AAA==</Image>
-+<Url type="text/html" method="GET" template="https://duckduckgo.com/">
-+<Param name="q" value="{searchTerms}"/>
-+<Param name="t" value="freebsd"/>
-+</Url>
-+<SearchForm>https://duckduckgo.com/</SearchForm>
-+</SearchPlugin>
-diff -r f2fa4ae74ee1 browser/locales/en-US/searchplugins/list.txt
---- browser/locales/en-US/searchplugins/list.txt Mon Oct 24 22:54:18 2011 +0300
-+++ browser/locales/en-US/searchplugins/list.txt Tue Oct 25 21:13:40 2011 -0400
-@@ -1,7 +1,8 @@
- amazondotcom
- bing
-+duckduckgo
- eBay
- google
- twitter
- wikipedia
- yahoo
---- browser/app/profile/firefox.js.orig 2013-02-09 12:26:02.000000000 +0100
-+++ browser/app/profile/firefox.js 2013-02-09 12:26:19.000000000 +0100
-@@ -341,6 +341,7 @@
- pref("browser.search.order.1", "chrome://browser-region/locale/region.properties");
- pref("browser.search.order.2", "chrome://browser-region/locale/region.properties");
- pref("browser.search.order.3", "chrome://browser-region/locale/region.properties");
-+pref("browser.search.order.4", "chrome://browser-region/locale/region.properties");
-
- // search bar results always open in a new tab
- pref("browser.search.openintab", false);
diff --git a/www/firefox/files/patch-system-openh264 b/www/firefox/files/patch-system-openh264
index 14bd5488fed5..a26cb2a611fa 100644
--- a/www/firefox/files/patch-system-openh264
+++ b/www/firefox/files/patch-system-openh264
@@ -28,10 +28,10 @@ index 4165a75..81914d5 100644
#if defined(XP_MACOSX)
nsAutoString binaryName = NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".dylib");
diff --git content/media/gmp/GMPParent.cpp content/media/gmp/GMPParent.cpp
-index e63453e..bf83b30 100644
+index aa60acf..90878ca 100644
--- content/media/gmp/GMPParent.cpp
+++ content/media/gmp/GMPParent.cpp
-@@ -87,23 +87,16 @@
+@@ -90,23 +90,16 @@
mService = aService;
mDirectory = aPluginDir;
@@ -49,7 +49,7 @@ index e63453e..bf83b30 100644
if (NS_FAILED(rv)) {
return rv;
}
- LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this,
+ LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this,
- NS_LossyConvertUTF16toASCII(parentLeafName).get()));
+ NS_LossyConvertUTF16toASCII(leafname).get()));
diff --git a/www/firefox/files/patch-z-bug517422 b/www/firefox/files/patch-z-bug517422
index eb84013cb964..7b84987ca922 100644
--- a/www/firefox/files/patch-z-bug517422
+++ b/www/firefox/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,13 @@ export:: $(export-preqs)
-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
-DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
-DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
@@ -22,7 +22,7 @@ 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']:
+@@ -16,13 +16,19 @@ if CONFIG['MOZ_UPDATER']:
if not CONFIG['MOZ_NATIVE_BZ2']:
external_dirs += ['modules/libbz2']
@@ -45,7 +45,7 @@ index f67c5c7..eb909ce 100644
external_dirs += ['media/libopus']
if CONFIG['MOZ_WEBM']:
-@@ -36,14 +42,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
+@@ -37,14 +43,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
if not CONFIG['MOZ_NATIVE_PNG']:
external_dirs += ['media/libpng']
@@ -65,30 +65,28 @@ index f67c5c7..eb909ce 100644
- '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,29 @@ graphite2/Segment.h
harfbuzz/hb-ot.h
harfbuzz/hb.h
#endif
@@ -122,7 +120,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
+@@ -5056,6 +5056,57 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then
fi
dnl ========================================================
@@ -145,8 +143,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
@@ -162,8 +158,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
@@ -179,14 +173,12 @@ 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,
+@@ -5064,6 +5115,89 @@ MOZ_ARG_DISABLE_BOOL(opus,
MOZ_OPUS=1)
dnl ========================================================
@@ -205,8 +197,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
@@ -222,8 +212,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
@@ -239,8 +227,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
@@ -277,8 +263,6 @@ 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
@@ -288,8 +272,8 @@ diff --git content/media/AudioStream.h content/media/AudioStream.h
index 085676d..00c54fb 100644
--- content/media/AudioStream.h
+++ content/media/AudioStream.h
-@@ -26,7 +26,7 @@ public:
- };
+@@ -17,7 +17,7 @@
+ #include "CubebUtils.h"
namespace soundtouch {
-class SoundTouch;
@@ -297,121 +281,175 @@ 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 content/media/moz.build content/media/moz.build
+index 7526cff..e0a0ca0 100644
+--- content/media/moz.build
++++ content/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']:
+
+ FINAL_LIBRARY = 'gkmedias'
- 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
++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
+@@ -6,3 +6,5 @@
+
+ DIRS += ['include', 'lib']
+
++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,9 +17,9 @@
'conditions': [
['build_with_mozilla==1', {
# Mozilla provides its own build of the opus library.
@@ -424,50 +462,43 @@ index 00e77e7..55f48ab 100644
}, {
'dependencies': [
'<(DEPTH)/third_party/opus/opus.gyp:opus'
-diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
+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,27 @@ if CONFIG['MOZ_NATIVE_PNG']:
+ if CONFIG['MOZ_NATIVE_HUNSPELL']:
+ OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
-+ifdef MOZ_NATIVE_OGG
-+EXTRA_DSO_LDOPTS += $(MOZ_OGG_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_OGG']:
++ OS_LIBS += CONFIG['MOZ_OGG_LIBS']
+
-+ifdef MOZ_NATIVE_THEORA
-+EXTRA_DSO_LDOPTS += $(MOZ_THEORA_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_THEORA']:
++ OS_LIBS += CONFIG['MOZ_THEORA_LIBS']
+
-+ifdef MOZ_NATIVE_VORBIS
-+EXTRA_DSO_LDOPTS += $(MOZ_VORBIS_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ OS_LIBS += CONFIG['MOZ_VORBIS_LIBS']
+
-+ifdef MOZ_NATIVE_TREMOR
-+EXTRA_DSO_LDOPTS += $(MOZ_TREMOR_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
+
-+ifdef MOZ_NATIVE_OPUS
-+EXTRA_DSO_LDOPTS += $(MOZ_OPUS_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
+
-+ifdef MOZ_NATIVE_SPEEX
-+EXTRA_DSO_LDOPTS += $(MOZ_SPEEX_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ OS_LIBS += CONFIG['MOZ_SPEEX_LIBS']
+
-+ifdef MOZ_NATIVE_SOUNDTOUCH
-+EXTRA_DSO_LDOPTS += $(MOZ_SOUNDTOUCH_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS']
+
- ifdef MOZ_NATIVE_LIBEVENT
- EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
- endif
+ if CONFIG['MOZ_NATIVE_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
+
diff --git xpcom/build/nsXPComInit.cpp xpcom/build/nsXPComInit.cpp
index 2cf281e..6d7af0e 100644
--- xpcom/build/nsXPComInit.cpp
+++ xpcom/build/nsXPComInit.cpp
-@@ -130,7 +130,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **)
+@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
#include "mozilla/VisualEventTracer.h"
#endif
@@ -477,17 +508,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.