diff options
author | ryoon <ryoon> | 2015-05-12 22:48:54 +0000 |
---|---|---|
committer | ryoon <ryoon> | 2015-05-12 22:48:54 +0000 |
commit | 8b97839056ec1e1499ba3e0334a2d11157ce3a4c (patch) | |
tree | 7625b36acada04a0c8f2396df99d2d83a429dafb /www/firefox/patches | |
parent | 2409af9fea9928bc307246a180cfdc1a75d91204 (diff) | |
download | pkgsrc-8b97839056ec1e1499ba3e0334a2d11157ce3a4c.tar.gz |
Update to 38.0
Changelog:
New New tab-based preferences
New Ruby annotation support
New Base for the next ESR release.
Changed autocomplete=off is no longer supported for username/password fields
Changed URL parser avoids doing percent encoding when setting the Fragment part of the URL, and percent decoding when getting the Fragment in line with the URL spec
Changed RegExp.prototype.source now returns "(?:)" instead of the empty string for empty regular expressions
Changed Improved page load times via speculative connection warmup
HTML5 WebSocket now available in Web Workers
HTML5 BroadcastChannel API implemented
HTML5 Implemented srcset attribute and <picture> element for responsive images
HTML5 Implemented DOM3 Events KeyboardEvent.code
HTML5 Mac OS X: Implemented a subset of the Media Source Extensions (MSE) API to allow native HTML5 playback on YouTube
HTML5 Implemented Encrypted Media Extensions (EME) API to support encrypted HTML5 video/audio playback (Windows Vista or later only)
HTML5 Automatically download Adobe Primetime Content Decryption Module (CDM) for DRM playback through EME (Windows Vista or later only)
Developer Optimized-out variables are now visible in Debugger UI
Developer XMLHttpRequest logs in the web console are now visually labelled and can be filtered separately from regular network requests
Developer WebRTC now has multistream and renegotiation support
Developer copy command added to console
Fixed Various security fixes
Fixed in Firefox 38
2015-58 Mozilla Windows updater can be run outside of application directory
2015-57 Privilege escalation through IPC channel messages
2015-56 Untrusted site hosting trusted page can intercept webchannel responses
2015-55 Buffer overflow and out-of-bounds read while parsing MP4 video metadata
2015-54 Buffer overflow when parsing compressed XML
2015-53 Use-after-free due to Media Decoder Thread creation during shutdown
2015-52 Sensitive URL encoded information written to Android logcat
2015-51 Use-after-free during text processing with vertical text enabled
2015-50 Out-of-bounds read and write in asm.js validation
2015-49 Referrer policy ignored when links opened by middle-click and context menu
2015-48 Buffer overflow with SVG content and CSS
2015-47 Buffer overflow parsing H.264 video with Linux Gstreamer
2015-46 Miscellaneous memory safety hazards (rv:38.0 / rv:31.7)
Diffstat (limited to 'www/firefox/patches')
40 files changed, 704 insertions, 741 deletions
diff --git a/www/firefox/patches/patch-aa b/www/firefox/patches/patch-aa index 28ca4efbc2a..70d34a97ab2 100644 --- a/www/firefox/patches/patch-aa +++ b/www/firefox/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ +$NetBSD: patch-aa,v 1.37 2015/05/12 22:48:54 ryoon Exp $ * The profiler does not support Darwin/PPC so don't try to enable it on that platform. @@ -13,9 +13,9 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ heavy patching. Ideally they should be fixed individually but that will be an extremely hard work, so don't define XP_MACOSX for now. ---- configure.in.orig 2015-03-27 02:20:20.000000000 +0000 +--- configure.in.orig 2015-05-04 00:43:23.000000000 +0000 +++ configure.in -@@ -1767,7 +1767,13 @@ Linux) +@@ -1794,7 +1794,13 @@ Linux) MOZ_ENABLE_PROFILER_SPS= esac ;; @@ -30,7 +30,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ *) MOZ_ENABLE_PROFILER_SPS= ;; -@@ -1871,7 +1877,7 @@ case "$host" in +@@ -1898,7 +1904,7 @@ case "$host" in ;; *-darwin*) @@ -39,7 +39,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ;; -@@ -1995,7 +2001,6 @@ case "$target" in +@@ -2022,7 +2028,6 @@ case "$target" in AC_DEFINE(XP_DARWIN) _PLATFORM_DEFAULT_TOOLKIT='cairo-uikit' else @@ -47,7 +47,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ AC_DEFINE(XP_DARWIN) _PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa' # The ExceptionHandling framework is needed for Objective-C exception -@@ -2615,8 +2620,7 @@ MOZ_CXX11 +@@ -2641,8 +2646,7 @@ MOZ_CXX11 AC_LANG_C @@ -57,7 +57,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ dnl =============================================================== if test "$GNU_CC" -a "$OS_TARGET" != WINNT; then AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) -@@ -3648,6 +3652,14 @@ if test -n "$YASM"; then +@@ -3663,6 +3667,14 @@ if test -n "$YASM"; then _YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'` fi @@ -72,7 +72,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ if test -z "$SKIP_LIBRARY_CHECKS"; then dnl system JPEG support dnl ======================================================== -@@ -3675,11 +3687,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then +@@ -3690,11 +3702,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then #include <jpeglib.h> ], [ #if JPEG_LIB_VERSION < $MOZJPEG #error "Insufficient JPEG library version ($MOZJPEG required)." @@ -105,7 +105,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ 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 -@@ -5137,6 +5149,9 @@ if test -n "$MOZ_WEBRTC"; then +@@ -5149,6 +5161,9 @@ if test -n "$MOZ_WEBRTC"; then MOZ_VPX=1 MOZ_VPX_ERROR_CONCEALMENT=1 @@ -115,7 +115,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ dnl enable once Signaling lands MOZ_WEBRTC_SIGNALING=1 AC_DEFINE(MOZ_WEBRTC_SIGNALING) -@@ -5240,6 +5255,223 @@ if test "${ac_cv_c_attribute_aligned}" ! +@@ -5252,6 +5267,157 @@ if test "${ac_cv_c_attribute_aligned}" ! fi dnl ======================================================== @@ -170,87 +170,21 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ +AC_SUBST(MOZ_NATIVE_TREMOR) + +dnl ======================================================== -+dnl Check for libopus ++dnl Check for libcelt +dnl ======================================================== + -+MOZ_ARG_WITH_BOOL(system-opus, -+[ --with-system-opus Use system libopus (located with pkgconfig)], -+MOZ_NATIVE_OPUS=1, -+MOZ_NATIVE_OPUS=) ++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_OPUS"; then -+ PKG_CHECK_MODULES(MOZ_OPUS, opus >= 1.1) ++if test -n "$MOZ_NATIVE_CELT"; then ++ PKG_CHECK_MODULES(MOZ_CELT, celt) +else -+ MOZ_OPUS_CFLAGS='-I$(topsrcdir)/media/libopus/include' -+fi -+ -+AC_SUBST(MOZ_NATIVE_OPUS) -+ -+dnl ======================================================== -+dnl Check for libtheora -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-theora, -+[ --with-system-theora Use system libtheora (located with pkgconfig)], -+MOZ_NATIVE_THEORA=1, -+MOZ_NATIVE_THEORA=) -+ -+if test -n "$MOZ_NATIVE_THEORA"; then -+ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2) -+fi -+ -+AC_SUBST(MOZ_NATIVE_THEORA) -+ -+dnl ======================================================== -+dnl Check for libspeex resampler -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-speex, -+[ --with-system-speex Use system libspeex (located with pkgconfig)], -+MOZ_NATIVE_SPEEX=1, -+MOZ_NATIVE_SPEEX=) -+ -+if test -n "$MOZ_NATIVE_SPEEX"; then -+ PKG_CHECK_MODULES(MOZ_SPEEX, speexdsp >= 1.2) ++ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus' +fi + -+AC_SUBST(MOZ_NATIVE_SPEEX) -+ -+dnl ======================================================== -+dnl Check for libsoundtouch -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-soundtouch, -+[ --with-system-soundtouch Use system libsoundtouch (located with pkgconfig)], -+MOZ_NATIVE_SOUNDTOUCH=1, -+MOZ_NATIVE_SOUNDTOUCH=) -+ -+if test -n "$MOZ_NATIVE_SOUNDTOUCH"; then -+ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.8.0) -+ -+ AC_LANG_SAVE -+ AC_LANG_CPLUSPLUS -+ _SAVE_CXXFLAGS=$CXXFLAGS -+ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS" -+ AC_CACHE_CHECK(for soundtouch sample type, -+ ac_cv_soundtouch_sample_type, -+ [AC_TRY_COMPILE([#include <SoundTouch.h> -+ #ifndef SOUNDTOUCH_INTEGER_SAMPLES -+ #error soundtouch expects float samples -+ #endif], -+ [], -+ [ac_cv_soundtouch_sample_type=short], -+ [ac_cv_soundtouch_sample_type=float])]) -+ CXXFLAGS=$_SAVE_CXXFLAGS -+ AC_LANG_RESTORE -+ -+ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \ -+ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then -+ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.]) -+ fi -+fi -+ -+AC_SUBST(MOZ_NATIVE_SOUNDTOUCH) ++AC_SUBST(MOZ_NATIVE_CELT) + +dnl ======================================================== +dnl Check for libopus @@ -339,7 +273,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ dnl = Disable VP8 decoder support dnl ======================================================== MOZ_ARG_DISABLE_BOOL(webm, -@@ -5594,6 +5826,67 @@ fi +@@ -5606,6 +5772,67 @@ fi AC_SUBST(MOZ_WEBM_ENCODER) dnl ================================== @@ -407,7 +341,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ dnl = Check alsa availability on Linux dnl ================================== -@@ -5607,12 +5900,23 @@ MOZ_ARG_ENABLE_BOOL(alsa, +@@ -5619,12 +5846,23 @@ MOZ_ARG_ENABLE_BOOL(alsa, MOZ_ALSA=1, MOZ_ALSA=) @@ -419,7 +353,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ if test -n "$MOZ_ALSA"; then PKG_CHECK_MODULES(MOZ_ALSA, alsa, , [echo "$MOZ_ALSA_PKG_ERRORS" - AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) + AC_MSG_ERROR([Need alsa for audio output on Linux. (On Ubuntu, you might try installing the package libasound2-dev.)])]) fi +if test -n "$DISABLE_LIBASOUND_DLOPEN"; then @@ -431,7 +365,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ AC_SUBST(MOZ_ALSA) dnl ======================================================== -@@ -6036,7 +6340,9 @@ MOZ_ARG_DISABLE_BOOL(gamepad, +@@ -6046,7 +6284,9 @@ MOZ_ARG_DISABLE_BOOL(gamepad, if test "$MOZ_GAMEPAD"; then case "$OS_TARGET" in Darwin) @@ -442,7 +376,7 @@ $NetBSD: patch-aa,v 1.36 2015/04/05 12:54:11 ryoon Exp $ ;; WINNT) MOZ_GAMEPAD_BACKEND=windows -@@ -8033,6 +8339,49 @@ if test "$USE_FC_FREETYPE"; then +@@ -8066,6 +8306,49 @@ if test "$USE_FC_FREETYPE"; then fi dnl ======================================================== diff --git a/www/firefox/patches/patch-accessible_atk_Platform.cpp b/www/firefox/patches/patch-accessible_atk_Platform.cpp index 72942452792..8414b6625b7 100644 --- a/www/firefox/patches/patch-accessible_atk_Platform.cpp +++ b/www/firefox/patches/patch-accessible_atk_Platform.cpp @@ -1,6 +1,6 @@ -$NetBSD: patch-accessible_atk_Platform.cpp,v 1.1 2015/04/05 12:54:11 ryoon Exp $ +$NetBSD: patch-accessible_atk_Platform.cpp,v 1.2 2015/05/12 22:48:54 ryoon Exp $ ---- accessible/atk/Platform.cpp.orig 2015-03-27 02:20:15.000000000 +0000 +--- accessible/atk/Platform.cpp.orig 2015-05-04 00:43:17.000000000 +0000 +++ accessible/atk/Platform.cpp @@ -18,8 +18,9 @@ #include <dbus/dbus.h> @@ -55,7 +55,7 @@ $NetBSD: patch-accessible_atk_Platform.cpp,v 1.1 2015/04/05 12:54:11 ryoon Exp $ void a11y::PlatformInit() -@@ -175,13 +180,17 @@ a11y::PlatformInit() +@@ -175,14 +180,17 @@ a11y::PlatformInit() // Init atk-bridge now PR_SetEnv("NO_AT_BRIDGE=0"); @@ -63,23 +63,24 @@ $NetBSD: patch-accessible_atk_Platform.cpp,v 1.1 2015/04/05 12:54:11 ryoon Exp $ - 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 -+ rv = LoadGtkModule(sAtkBridge); ++ } else + #endif ++ { ++ nsresult rv = LoadGtkModule(sAtkBridge); + if (NS_SUCCEEDED(rv)) { + (*sAtkBridge.init)(); + } -+#if (MOZ_WIDGET_GTK == 3) - } --#else -- atk_bridge_adaptor_init(nullptr, nullptr); - #endif ++ } if (!sToplevel_event_hook_added) { -@@ -210,7 +219,6 @@ a11y::PlatformShutdown() + sToplevel_event_hook_added = true; +@@ -210,7 +218,6 @@ a11y::PlatformShutdown() sToplevel_hide_hook); } @@ -87,7 +88,7 @@ $NetBSD: patch-accessible_atk_Platform.cpp,v 1.1 2015/04/05 12:54:11 ryoon Exp $ if (sAtkBridge.lib) { // Do not shutdown/unload atk-bridge, // an exit function registered will take care of it -@@ -221,6 +229,7 @@ a11y::PlatformShutdown() +@@ -221,6 +228,7 @@ a11y::PlatformShutdown() sAtkBridge.init = nullptr; sAtkBridge.shutdown = nullptr; } diff --git a/www/firefox/patches/patch-ak b/www/firefox/patches/patch-ak deleted file mode 100644 index 145853c3b8a..00000000000 --- a/www/firefox/patches/patch-ak +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ak,v 1.12 2014/10/05 01:59:08 ryoon Exp $ - ---- js/src/ctypes/libffi/configure.orig 2014-09-24 01:05:20.000000000 +0000 -+++ js/src/ctypes/libffi/configure -@@ -17226,7 +17226,7 @@ case "$host" in - powerpc-*-aix* | rs6000-*-aix*) - TARGET=POWERPC_AIX; TARGETDIR=powerpc - ;; -- powerpc-*-freebsd* | powerpc-*-openbsd*) -+ powerpc-*-freebsd* | powerpc-*-openbsd* | powerpc-*-netbsd*) - TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc - HAVE_LONG_DOUBLE_VARIANT=1 - ;; diff --git a/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp b/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp index 941d39b106c..514fa9e5540 100644 --- a/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp +++ b/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp @@ -1,9 +1,9 @@ -$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.6 2015/01/29 22:22:26 wiz Exp $ +$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.7 2015/05/12 22:48:54 ryoon Exp $ * Replace XP_MACOSX with XP_DARWIN as the former is not defined when the toolkit is not cocoa. ---- browser/app/nsBrowserApp.cpp.orig 2014-05-06 22:55:09.000000000 +0000 +--- browser/app/nsBrowserApp.cpp.orig 2015-05-04 00:43:18.000000000 +0000 +++ browser/app/nsBrowserApp.cpp @@ -18,8 +18,10 @@ #include <unistd.h> @@ -17,7 +17,7 @@ $NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.6 2015/01/29 22:22:26 wiz Exp $ #include "MacQuirks.h" #endif -@@ -447,7 +449,7 @@ TimeStamp_Now() +@@ -459,7 +461,7 @@ TimeStamp_Now() } return sGetTickCount64() * freq.QuadPart; @@ -26,3 +26,11 @@ $NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.6 2015/01/29 22:22:26 wiz Exp $ return mach_absolute_time(); #elif defined(HAVE_CLOCK_MONOTONIC) struct timespec ts; +@@ -606,6 +608,7 @@ int main(int argc, char* argv[]) + TriggerQuirks(); + #endif + ++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); + int gotCounters; + #if defined(XP_UNIX) + struct rusage initialRUsage; diff --git a/www/firefox/patches/patch-build_autoconf_nss.m4 b/www/firefox/patches/patch-build_autoconf_nss.m4 index 1fdd9b920c1..f09b68dfa94 100644 --- a/www/firefox/patches/patch-build_autoconf_nss.m4 +++ b/www/firefox/patches/patch-build_autoconf_nss.m4 @@ -1,6 +1,6 @@ -$NetBSD: patch-build_autoconf_nss.m4,v 1.4 2014/02/20 13:19:03 ryoon Exp $ +$NetBSD: patch-build_autoconf_nss.m4,v 1.5 2015/05/12 22:48:54 ryoon Exp $ ---- build/autoconf/nss.m4.orig 2013-10-25 22:27:10.000000000 +0000 +--- build/autoconf/nss.m4.orig 2015-04-29 21:11:43.000000000 +0000 +++ build/autoconf/nss.m4 @@ -22,18 +22,18 @@ AC_ARG_WITH(nss-exec-prefix, if test -n "$nss_config_exec_prefix"; then @@ -35,12 +35,12 @@ $NetBSD: patch-build_autoconf_nss.m4,v 1.4 2014/02/20 13:19:03 ryoon Exp $ - nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \ + nss_config_major_version=`$NSS_CONFIG $nss_config_args nss --modversion | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\(\.\([[0-9]]*\)\)\{0,1\}/\1/'` - nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \ + nss_config_minor_version=`$NSS_CONFIG $nss_config_args nss --modversion | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\(\.\([[0-9]]*\)\)\{0,1\}/\2/'` - nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \ + nss_config_micro_version=`$NSS_CONFIG $nss_config_args nss --modversion | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - min_nss_major_version=`echo $min_nss_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\(\.\([[0-9]]*\)\)\{0,1\}/\4/'` + if test -z "$nss_config_micro_version"; then + nss_config_micro_version="0" diff --git a/www/firefox/patches/patch-config_Makefile.in b/www/firefox/patches/patch-config_Makefile.in index 9dd50a2d21f..72bf9ef73a4 100644 --- a/www/firefox/patches/patch-config_Makefile.in +++ b/www/firefox/patches/patch-config_Makefile.in @@ -1,8 +1,8 @@ -$NetBSD: patch-config_Makefile.in,v 1.4 2014/04/30 15:07:18 ryoon Exp $ +$NetBSD: patch-config_Makefile.in,v 1.5 2015/05/12 22:48:54 ryoon Exp $ ---- config/Makefile.in.orig 2014-04-18 02:02:39.000000000 +0000 +--- config/Makefile.in.orig 2015-05-04 00:43:23.000000000 +0000 +++ config/Makefile.in -@@ -77,6 +77,15 @@ export:: $(export-preqs) +@@ -77,6 +77,16 @@ export:: $(export-preqs) -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \ -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ @@ -12,6 +12,7 @@ $NetBSD: patch-config_Makefile.in,v 1.4 2014/04/30 15:07:18 ryoon Exp $ + -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) \ diff --git a/www/firefox/patches/patch-config_external_moz.build b/www/firefox/patches/patch-config_external_moz.build index 4f92a331101..bedd4070c78 100644 --- a/www/firefox/patches/patch-config_external_moz.build +++ b/www/firefox/patches/patch-config_external_moz.build @@ -1,6 +1,6 @@ -$NetBSD: patch-config_external_moz.build,v 1.7 2015/04/05 12:54:11 ryoon Exp $ +$NetBSD: patch-config_external_moz.build,v 1.8 2015/05/12 22:48:54 ryoon Exp $ ---- config/external/moz.build.orig 2015-03-27 02:20:20.000000000 +0000 +--- config/external/moz.build.orig 2015-05-04 00:43:23.000000000 +0000 +++ config/external/moz.build @@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']: # There's no "native brotli" yet, but probably in the future... @@ -10,7 +10,7 @@ $NetBSD: patch-config_external_moz.build,v 1.7 2015/04/05 12:54:11 ryoon Exp $ +if not CONFIG['MOZ_NATIVE_OGG']: + external_dirs += ['media/libogg'] + -+if not CONFIG['MOZ_NATIVE_OPUS']: ++if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']: + external_dirs += ['media/libopus'] + +if not CONFIG['MOZ_NATIVE_THEORA']: diff --git a/www/firefox/patches/patch-config_system-headers b/www/firefox/patches/patch-config_system-headers index 3d149be4be7..fe8e889418d 100644 --- a/www/firefox/patches/patch-config_system-headers +++ b/www/firefox/patches/patch-config_system-headers @@ -1,6 +1,6 @@ -$NetBSD: patch-config_system-headers,v 1.12 2015/04/05 12:54:11 ryoon Exp $ +$NetBSD: patch-config_system-headers,v 1.13 2015/05/12 22:48:54 ryoon Exp $ ---- config/system-headers.orig 2015-03-27 02:20:20.000000000 +0000 +--- config/system-headers.orig 2015-05-04 00:43:23.000000000 +0000 +++ config/system-headers @@ -189,7 +189,6 @@ asm/signal.h ASRegistry.h @@ -40,7 +40,7 @@ $NetBSD: patch-config_system-headers,v 1.12 2015/04/05 12:54:11 ryoon Exp $ #endif gst/gst.h gst/app/gstappsink.h -@@ -1360,3 +1362,37 @@ unicode/utypes.h +@@ -1360,3 +1362,43 @@ unicode/utypes.h #endif libutil.h unwind.h @@ -66,6 +66,12 @@ $NetBSD: patch-config_system-headers,v 1.12 2015/04/05 12:54:11 ryoon Exp $ +#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 diff --git a/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp b/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp index 58ec2c7d1c1..18dcbd4b4d7 100644 --- a/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp +++ b/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp @@ -1,8 +1,8 @@ -$NetBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp,v 1.9 2015/04/05 12:54:11 ryoon Exp $ +$NetBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp,v 1.10 2015/05/12 22:48:54 ryoon Exp $ Load system hunspell dictionaries. ---- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2015-03-27 02:20:32.000000000 +0000 +--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2015-05-04 00:43:34.000000000 +0000 +++ extensions/spellcheck/hunspell/src/mozHunspell.cpp @@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo } @@ -10,7 +10,7 @@ Load system hunspell dictionaries. + // load system hunspell dictionaries + nsCOMPtr<nsIFile> hunDir; -+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/usr/pkg/share/hunspell"), ++ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("@PREFIX@/share/hunspell"), + true, getter_AddRefs(hunDir)); + if (hunDir) { + LoadDictionariesFromDir(hunDir); diff --git a/www/firefox/patches/patch-gfx_layers_basic_BasicCompositor.cpp b/www/firefox/patches/patch-gfx_layers_basic_BasicCompositor.cpp deleted file mode 100644 index 2be1d68a7c1..00000000000 --- a/www/firefox/patches/patch-gfx_layers_basic_BasicCompositor.cpp +++ /dev/null @@ -1,128 +0,0 @@ -$NetBSD: patch-gfx_layers_basic_BasicCompositor.cpp,v 1.2 2015/04/05 12:54:11 ryoon Exp $ - -Part of the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1105087 - -diff -git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp ---- gfx/layers/basic/BasicCompositor.cpp.orig 2015-03-27 02:20:33.000000000 +0000 -+++ gfx/layers/basic/BasicCompositor.cpp -@@ -17,8 +17,13 @@ - #include <algorithm> - #include "ImageContainer.h" - #include "gfxPrefs.h" -+#if MOZ_ENABLE_SKIA - #include "skia/SkCanvas.h" // for SkCanvas - #include "skia/SkBitmapDevice.h" // for SkBitmapDevice -+#else -+#define PIXMAN_DONT_DEFINE_STDINT -+#include "pixman.h" // for pixman_f_transform, etc -+#endif - - namespace mozilla { - using namespace mozilla::gfx; -@@ -177,6 +182,7 @@ DrawSurfaceWithTextureCoords(DrawTarget - mode, aMask, aMaskTransform, &matrix); - } - -+#if MOZ_ENABLE_SKIA - static SkMatrix - Matrix3DToSkia(const gfx3DMatrix& aMatrix) - { -@@ -195,7 +201,7 @@ Matrix3DToSkia(const gfx3DMatrix& aMatri - } - - static void --SkiaTransform(DataSourceSurface* aDest, -+DrawTransform(DataSourceSurface* aDest, - DataSourceSurface* aSource, - const gfx3DMatrix& aTransform, - const Point& aDestOffset) -@@ -234,6 +240,80 @@ SkiaTransform(DataSourceSurface* aDest, - SkRect destRect = SkRect::MakeXYWH(0, 0, srcSize.width, srcSize.height); - destCanvas.drawBitmapRectToRect(src, nullptr, destRect, &paint); - } -+#else -+// Cairo must rely on a less precise method if Skia is not available. -+// See bugs 1105087 and 1097776. -+static pixman_transform -+Matrix3DToPixman(const gfx3DMatrix& aMatrix) -+{ -+ pixman_f_transform transform; -+ -+ transform.m[0][0] = aMatrix._11; -+ transform.m[0][1] = aMatrix._21; -+ transform.m[0][2] = aMatrix._41; -+ transform.m[1][0] = aMatrix._12; -+ transform.m[1][1] = aMatrix._22; -+ transform.m[1][2] = aMatrix._42; -+ transform.m[2][0] = aMatrix._14; -+ transform.m[2][1] = aMatrix._24; -+ transform.m[2][2] = aMatrix._44; -+ -+ pixman_transform result; -+ pixman_transform_from_pixman_f_transform(&result, &transform); -+ -+ return result; -+} -+ -+static void -+DrawTransform(DataSourceSurface* aDest, -+ DataSourceSurface* aSource, -+ const gfx3DMatrix& aTransform, -+ const Point& aDestOffset) -+{ -+ IntSize destSize = aDest->GetSize(); -+ pixman_image_t* dest = pixman_image_create_bits(PIXMAN_a8r8g8b8, -+ destSize.width, -+ destSize.height, -+ (uint32_t*)aDest->GetData(), -+ aDest->Stride()); -+ -+ IntSize srcSize = aSource->GetSize(); -+ pixman_image_t* src = pixman_image_create_bits(PIXMAN_a8r8g8b8, -+ srcSize.width, -+ srcSize.height, -+ (uint32_t*)aSource->GetData(), -+ aSource->Stride()); -+ -+ NS_ABORT_IF_FALSE(src && dest, "Failed to create pixman images?"); -+ -+ pixman_transform pixTransform = Matrix3DToPixman(aTransform); -+ pixman_transform pixTransformInverted; -+ -+ // If the transform is singular then nothing would be drawn anyway, return here -+ if (!pixman_transform_invert(&pixTransformInverted, &pixTransform)) { -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+ return; -+ } -+ pixman_image_set_transform(src, &pixTransformInverted); -+ -+ pixman_image_composite32(PIXMAN_OP_SRC, -+ src, -+ nullptr, -+ dest, -+ aDestOffset.x, -+ aDestOffset.y, -+ 0, -+ 0, -+ 0, -+ 0, -+ destSize.width, -+ destSize.height); -+ -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+} -+#endif - - static inline IntRect - RoundOut(Rect r) -@@ -378,7 +458,7 @@ BasicCompositor::DrawQuad(const gfx::Rec - return; - } - -- SkiaTransform(temp, source, new3DTransform, transformBounds.TopLeft()); -+ DrawTransform(temp, source, new3DTransform, transformBounds.TopLeft()); - - transformBounds.MoveTo(0, 0); - buffer->DrawSurface(temp, transformBounds, transformBounds); diff --git a/www/firefox/patches/patch-gfx_layers_basic_BasicLayerManager.cpp b/www/firefox/patches/patch-gfx_layers_basic_BasicLayerManager.cpp deleted file mode 100644 index 72f5f691d98..00000000000 --- a/www/firefox/patches/patch-gfx_layers_basic_BasicLayerManager.cpp +++ /dev/null @@ -1,128 +0,0 @@ -$NetBSD: patch-gfx_layers_basic_BasicLayerManager.cpp,v 1.2 2015/04/05 12:54:11 ryoon Exp $ - -Part of the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1105087 -(sligthly modified to fix a compile error: PixmanTransform -> DrawTransform) - -diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp ---- gfx/layers/basic/BasicLayerManager.cpp.orig 2015-03-27 02:20:33.000000000 +0000 -+++ gfx/layers/basic/BasicLayerManager.cpp -@@ -46,8 +46,13 @@ - #include "nsRect.h" // for nsIntRect - #include "nsRegion.h" // for nsIntRegion, etc - #include "nsTArray.h" // for nsAutoTArray -+#if MOZ_ENABLE_SKIA - #include "skia/SkCanvas.h" // for SkCanvas - #include "skia/SkBitmapDevice.h" // for SkBitmapDevice -+#else -+#define PIXMAN_DONT_DEFINE_STDINT -+#include "pixman.h" // for pixman_f_transform, etc -+#endif - class nsIWidget; - - namespace mozilla { -@@ -606,6 +611,7 @@ BasicLayerManager::SetRoot(Layer* aLayer - mRoot = aLayer; - } - -+#if MOZ_ENABLE_SKIA - static SkMatrix - BasicLayerManager_Matrix3DToSkia(const gfx3DMatrix& aMatrix) - { -@@ -624,7 +630,7 @@ BasicLayerManager_Matrix3DToSkia(const g - } - - static void --SkiaTransform(const gfxImageSurface* aDest, -+DrawTransform(const gfxImageSurface* aDest, - RefPtr<DataSourceSurface> aSrc, - const gfx3DMatrix& aTransform, - gfxPoint aDestOffset) -@@ -663,6 +669,79 @@ SkiaTransform(const gfxImageSurface* aDe - SkRect destRect = SkRect::MakeXYWH(0, 0, srcSize.width, srcSize.height); - destCanvas.drawBitmapRectToRect(src, nullptr, destRect, &paint); - } -+#else -+// See bugs 1097776 and 1105087. -+static pixman_transform -+BasicLayerManager_Matrix3DToPixman(const gfx3DMatrix& aMatrix) -+{ -+ pixman_f_transform transform; -+ -+ transform.m[0][0] = aMatrix._11; -+ transform.m[0][1] = aMatrix._21; -+ transform.m[0][2] = aMatrix._41; -+ transform.m[1][0] = aMatrix._12; -+ transform.m[1][1] = aMatrix._22; -+ transform.m[1][2] = aMatrix._42; -+ transform.m[2][0] = aMatrix._14; -+ transform.m[2][1] = aMatrix._24; -+ transform.m[2][2] = aMatrix._44; -+ -+ pixman_transform result; -+ pixman_transform_from_pixman_f_transform(&result, &transform); -+ -+ return result; -+} -+ -+static void -+DrawTransform(const gfxImageSurface* aDest, -+ RefPtr<DataSourceSurface> aSrc, -+ const gfx3DMatrix& aTransform, -+ gfxPoint aDestOffset) -+{ -+ IntSize destSize = ToIntSize(aDest->GetSize()); -+ pixman_image_t* dest = pixman_image_create_bits(aDest->Format() == gfxImageFormat::ARGB32 ? PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8, -+ destSize.width, -+ destSize.height, -+ (uint32_t*)aDest->Data(), -+ aDest->Stride()); -+ -+ IntSize srcSize = aSrc->GetSize(); -+ pixman_image_t* src = pixman_image_create_bits(aSrc->GetFormat() == SurfaceFormat::B8G8R8A8 ? PIXMAN_a8r8g8b8 : PIXMAN_x8r8g8b8, -+ srcSize.width, -+ srcSize.height, -+ (uint32_t*)aSrc->GetData(), -+ aSrc->Stride()); -+ -+ NS_ABORT_IF_FALSE(src && dest, "Failed to create pixman images?"); -+ -+ pixman_transform pixTransform = BasicLayerManager_Matrix3DToPixman(aTransform); -+ pixman_transform pixTransformInverted; -+ -+ // If the transform is singular then nothing would be drawn anyway, return here -+ if (!pixman_transform_invert(&pixTransformInverted, &pixTransform)) { -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+ return; -+ } -+ pixman_image_set_transform(src, &pixTransformInverted); -+ -+ pixman_image_composite32(PIXMAN_OP_SRC, -+ src, -+ nullptr, -+ dest, -+ aDestOffset.x, -+ aDestOffset.y, -+ 0, -+ 0, -+ 0, -+ 0, -+ destSize.width, -+ destSize.height); -+ -+ pixman_image_unref(dest); -+ pixman_image_unref(src); -+} -+#endif - - /** - * Transform a surface using a gfx3DMatrix and blit to the destination if -@@ -704,7 +783,7 @@ Transform3D(RefPtr<SourceSurface> aSourc - gfx3DMatrix translation = gfx3DMatrix::Translation(aBounds.x, aBounds.y, 0); - - // Transform the content and offset it such that the content begins at the origin. -- SkiaTransform(destImage, aSource->GetDataSurface(), translation * aTransform, offset); -+ DrawTransform(destImage, aSource->GetDataSurface(), translation * aTransform, offset); - - // If we haven't actually drawn to aDest then return our temporary image so - // that the caller can do this. diff --git a/www/firefox/patches/patch-image_decoders_nsJPEGDecoder.cpp b/www/firefox/patches/patch-image_decoders_nsJPEGDecoder.cpp index cb34f4eede5..fbac6afd7e6 100644 --- a/www/firefox/patches/patch-image_decoders_nsJPEGDecoder.cpp +++ b/www/firefox/patches/patch-image_decoders_nsJPEGDecoder.cpp @@ -1,15 +1,15 @@ -$NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.4 2015/02/28 04:30:55 ryoon Exp $ +$NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.5 2015/05/12 22:48:54 ryoon Exp $ ---- image/decoders/nsJPEGDecoder.cpp.orig 2015-02-17 21:40:35.000000000 +0000 +--- image/decoders/nsJPEGDecoder.cpp.orig 2015-05-04 00:43:19.000000000 +0000 +++ image/decoders/nsJPEGDecoder.cpp -@@ -21,13 +21,28 @@ +@@ -23,13 +23,28 @@ extern "C" { #include "iccjpeg.h" -} +#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 @@ -32,7 +32,7 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.4 2015/02/28 04:30:55 ryoon static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width); -@@ -358,6 +373,7 @@ nsJPEGDecoder::WriteInternal(const char* +@@ -373,6 +388,7 @@ nsJPEGDecoder::WriteInternal(const char* case JCS_GRAYSCALE: case JCS_RGB: case JCS_YCbCr: @@ -40,7 +40,7 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.4 2015/02/28 04:30:55 ryoon // if we're not color managing we can decode directly to // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB if (mCMSMode != eCMSMode_All) { -@@ -366,6 +382,9 @@ nsJPEGDecoder::WriteInternal(const char* +@@ -381,6 +397,9 @@ nsJPEGDecoder::WriteInternal(const char* } else { mInfo.out_color_space = JCS_RGB; } @@ -50,7 +50,7 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.4 2015/02/28 04:30:55 ryoon break; case JCS_CMYK: case JCS_YCCK: -@@ -424,6 +443,15 @@ nsJPEGDecoder::WriteInternal(const char* +@@ -450,6 +469,15 @@ nsJPEGDecoder::WriteInternal(const char* return; // I/O suspension } @@ -66,9 +66,9 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.4 2015/02/28 04:30:55 ryoon // If this is a progressive JPEG ... mState = mInfo.buffered_image ? -@@ -596,7 +624,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus - uint32_t* imageRow = ((uint32_t*)mImageData) + - (mInfo.output_scanline * mInfo.output_width); +@@ -632,7 +660,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus + + MOZ_ASSERT(imageRow, "Should have a row buffer here"); +#ifdef JCS_EXTENSIONS if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) { @@ -78,7 +78,7 @@ $NetBSD: patch-image_decoders_nsJPEGDecoder.cpp,v 1.4 2015/02/28 04:30:55 ryoon // Special case: scanline will be directly converted into packed ARGB if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) { *suspend = true; // suspend -@@ -911,6 +943,282 @@ term_source (j_decompress_ptr jd) +@@ -959,6 +991,282 @@ term_source (j_decompress_ptr jd) } // namespace mozilla diff --git a/www/firefox/patches/patch-js_public_CallArgs.h b/www/firefox/patches/patch-js_public_CallArgs.h new file mode 100644 index 00000000000..9b8205f68da --- /dev/null +++ b/www/firefox/patches/patch-js_public_CallArgs.h @@ -0,0 +1,13 @@ +$NetBSD: patch-js_public_CallArgs.h,v 1.1 2015/05/12 22:48:54 ryoon Exp $ + +--- js/public/CallArgs.h.orig 2015-04-29 21:11:43.000000000 +0000 ++++ js/public/CallArgs.h +@@ -344,7 +344,7 @@ class MOZ_STACK_CLASS CallArgs : public + * Returns true if there are at least |required| arguments passed in. If + * false, it reports an error message on the context. + */ +- bool requireAtLeast(JSContext* cx, const char* fnname, unsigned required); ++ JS_PUBLIC_API(bool) requireAtLeast(JSContext* cx, const char* fnname, unsigned required); + + }; + diff --git a/www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp b/www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp index c3644ca1d41..7a3cbb9e8f6 100644 --- a/www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp +++ b/www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp @@ -1,51 +1,11 @@ -$NetBSD: patch-js_src_asmjs_AsmJSSignalHandlers.cpp,v 1.2 2015/02/28 04:30:55 ryoon Exp $ +$NetBSD: patch-js_src_asmjs_AsmJSSignalHandlers.cpp,v 1.3 2015/05/12 22:48:54 ryoon Exp $ Increase portability for non-x86 Darwin by not hardwiring x86_THREAD_STATE. ---- js/src/asmjs/AsmJSSignalHandlers.cpp.orig 2015-02-17 21:40:38.000000000 +0000 +--- js/src/asmjs/AsmJSSignalHandlers.cpp.orig 2015-05-04 00:43:23.000000000 +0000 +++ js/src/asmjs/AsmJSSignalHandlers.cpp -@@ -504,8 +504,38 @@ AsmJSFaultHandler(LPEXCEPTION_POINTERS e - #elif defined(XP_MACOSX) - # include <mach/exc.h> - -+# if defined(ARM_THREAD_STATE) -+typedef arm_thread_state_t moz_platform_thread_state_t; -+static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = ARM_THREAD_STATE; -+static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = ARM_THREAD_STATE_COUNT; -+ -+# elif defined(PPC_THREAD_STATE) -+typedef ppc_thread_state_t moz_platform_thread_state_t; -+static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = PPC_THREAD_STATE; -+static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = PPC_THREAD_STATE_COUNT; -+ -+# elif defined(PPC_THREAD_STATE64) -+typedef ppc_thread_state64_t moz_platform_thread_state_t; -+static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = PPC_THREAD_STATE64; -+static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = PPC_THREAD_STATE64_COUNT; -+ -+# elif defined(x86_THREAD_STATE) -+typedef x86_thread_state_t moz_platform_thread_state_t; -+static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = x86_THREAD_STATE; -+static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = x86_THREAD_STATE_COUNT; -+ -+# else -+# error Type unknown for platform-specific thread_state_t -+# endif -+ -+# if defined(__DARWIN_UNIX03) -+# define REG_FIELD(NAME) __ ## NAME -+# else -+# define REG_FIELD(NAME) NAME -+# endif -+ - static uint8_t ** --ContextToPC(x86_thread_state_t &state) -+ContextToPC(moz_platform_thread_state_t &state) - { - # if defined(JS_CPU_X64) - static_assert(sizeof(state.uts.ts64.__rip) == sizeof(void*), -@@ -617,10 +647,11 @@ HandleMachException(JSRuntime *rt, const +@@ -637,10 +637,11 @@ HandleMachException(JSRuntime* rt, const mach_port_t rtThread = request.body.thread.name; // Read out the JSRuntime thread's register state. diff --git a/www/firefox/patches/patch-js_src_gc_Memory.cpp b/www/firefox/patches/patch-js_src_gc_Memory.cpp deleted file mode 100644 index 1d663545f99..00000000000 --- a/www/firefox/patches/patch-js_src_gc_Memory.cpp +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-js_src_gc_Memory.cpp,v 1.2 2014/10/05 01:59:08 ryoon Exp $ - -Make sure mmap() delivers memory with upper 17 bits clear on sparc64 on NetBSD: -with topdown-vm we would map in the last 4 gig of the address space (past -the VA hole) otherwise by default, thus busting the JSValue restrictions. - -https://bugzilla.mozilla.org/show_bug.cgi?id=994133 - - ---- js/src/gc/Memory.cpp.orig 2014-09-24 01:05:20.000000000 +0000 -+++ js/src/gc/Memory.cpp -@@ -350,7 +350,7 @@ static inline void * - MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE, - int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0) - { --#if defined(__ia64__) -+#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) - /* - * The JS engine assumes that all allocated pointers have their high 17 bits clear, - * which ia64's mmap doesn't support directly. However, we can emulate it by passing diff --git a/www/firefox/patches/patch-js_src_jit-LIR.cpp b/www/firefox/patches/patch-js_src_jit-LIR.cpp index 7d7222f642b..95038785136 100644 --- a/www/firefox/patches/patch-js_src_jit-LIR.cpp +++ b/www/firefox/patches/patch-js_src_jit-LIR.cpp @@ -1,9 +1,9 @@ -$NetBSD: patch-js_src_jit-LIR.cpp,v 1.1 2015/02/16 16:16:17 bad Exp $ +$NetBSD: patch-js_src_jit-LIR.cpp,v 1.2 2015/05/12 22:48:54 ryoon Exp $ ---- js/src/jit/LIR.cpp.orig 2015-01-23 06:00:01.000000000 +0000 -+++ js/src/jit/LIR.cpp 2015-02-05 12:03:55.000000000 +0000 -@@ -314,7 +314,7 @@ - const char *name = names[op]; +--- js/src/jit/LIR.cpp.orig 2015-05-04 00:43:27.000000000 +0000 ++++ js/src/jit/LIR.cpp +@@ -323,7 +323,7 @@ LNode::printName(FILE* fp, Opcode op) + const char* name = names[op]; size_t len = strlen(name); for (size_t i = 0; i < len; i++) - fprintf(fp, "%c", tolower(name[i])); diff --git a/www/firefox/patches/patch-js_src_jit_ExecutableAllocator.h b/www/firefox/patches/patch-js_src_jit_ExecutableAllocator.h index cea23875430..560b12d9a22 100644 --- a/www/firefox/patches/patch-js_src_jit_ExecutableAllocator.h +++ b/www/firefox/patches/patch-js_src_jit_ExecutableAllocator.h @@ -1,10 +1,10 @@ -$NetBSD: patch-js_src_jit_ExecutableAllocator.h,v 1.2 2015/02/28 04:30:55 ryoon Exp $ +$NetBSD: patch-js_src_jit_ExecutableAllocator.h,v 1.3 2015/05/12 22:48:54 ryoon Exp $ ---- js/src/jit/ExecutableAllocator.h.orig 2015-02-17 21:40:41.000000000 +0000 +--- js/src/jit/ExecutableAllocator.h.orig 2015-05-04 00:43:27.000000000 +0000 +++ js/src/jit/ExecutableAllocator.h -@@ -425,6 +425,11 @@ public: - - #undef GCC_VERSION +@@ -419,6 +419,11 @@ class ExecutableAllocator { + { + __clear_cache(code, reinterpret_cast<char*>(code) + size); } +#elif defined(JS_CODEGEN_ARM) && (defined(__FreeBSD__) || defined(__NetBSD__)) + static void cacheFlush(void* code, size_t size) diff --git a/www/firefox/patches/patch-js_src_jit_MIR.cpp b/www/firefox/patches/patch-js_src_jit_MIR.cpp index 71bbf16bde6..6cb09135589 100644 --- a/www/firefox/patches/patch-js_src_jit_MIR.cpp +++ b/www/firefox/patches/patch-js_src_jit_MIR.cpp @@ -1,13 +1,13 @@ -$NetBSD: patch-js_src_jit_MIR.cpp,v 1.2 2015/04/05 12:54:11 ryoon Exp $ +$NetBSD: patch-js_src_jit_MIR.cpp,v 1.3 2015/05/12 22:48:54 ryoon Exp $ ---- js/src/jit/MIR.cpp.orig 2015-03-27 02:20:25.000000000 +0000 +--- js/src/jit/MIR.cpp.orig 2015-05-04 00:43:27.000000000 +0000 +++ js/src/jit/MIR.cpp -@@ -71,7 +71,7 @@ MDefinition::PrintOpcodeName(FILE *fp, M - const char *name = names[op]; +@@ -71,7 +71,7 @@ MDefinition::PrintOpcodeName(FILE* fp, M + const char* name = names[op]; size_t len = strlen(name); for (size_t i = 0; i < len; i++) - fprintf(fp, "%c", tolower(name[i])); + fprintf(fp, "%c", tolower(((unsigned char)name[i]))); } - const Value & + const Value& diff --git a/www/firefox/patches/patch-js_src_jit_arm_Architecture-arm.cpp b/www/firefox/patches/patch-js_src_jit_arm_Architecture-arm.cpp index 142f50ad9df..5211c8c2995 100644 --- a/www/firefox/patches/patch-js_src_jit_arm_Architecture-arm.cpp +++ b/www/firefox/patches/patch-js_src_jit_arm_Architecture-arm.cpp @@ -1,12 +1,12 @@ -$NetBSD: patch-js_src_jit_arm_Architecture-arm.cpp,v 1.4 2015/02/28 04:30:55 ryoon Exp $ +$NetBSD: patch-js_src_jit_arm_Architecture-arm.cpp,v 1.5 2015/05/12 22:48:54 ryoon Exp $ ---- js/src/jit/arm/Architecture-arm.cpp.orig 2015-02-17 21:40:41.000000000 +0000 +--- js/src/jit/arm/Architecture-arm.cpp.orig 2015-05-04 00:43:27.000000000 +0000 +++ js/src/jit/arm/Architecture-arm.cpp @@ -16,7 +16,7 @@ #include "jit/arm/Assembler-arm.h" #include "jit/RegisterSets.h" --#if defined(ANDROID) || defined(JS_ARM_SIMULATOR) +-#if !defined(__linux__) || defined(ANDROID) || defined(JS_ARM_SIMULATOR) +#if !defined(__linux__) || defined(ANDROID) || defined(JS_ARM_SIMULATOR) || defined(__NetBSD__) // The Android NDK and B2G do not include the hwcap.h kernel header, and it is not // defined when building the simulator, so inline the header defines we need. diff --git a/www/firefox/patches/patch-js_src_jsapi.cpp b/www/firefox/patches/patch-js_src_jsapi.cpp index 156549fed8d..a9a005fadbe 100644 --- a/www/firefox/patches/patch-js_src_jsapi.cpp +++ b/www/firefox/patches/patch-js_src_jsapi.cpp @@ -1,22 +1,13 @@ -$NetBSD: patch-js_src_jsapi.cpp,v 1.2 2015/02/19 21:33:22 ryoon Exp $ +$NetBSD: patch-js_src_jsapi.cpp,v 1.3 2015/05/12 22:48:54 ryoon Exp $ ---- js/src/jsapi.cpp.orig 2015-01-23 06:00:01.000000000 +0000 +--- js/src/jsapi.cpp.orig 2015-04-29 21:11:46.000000000 +0000 +++ js/src/jsapi.cpp -@@ -236,7 +236,7 @@ JS_ConvertArgumentsVA(JSContext *cx, con - assertSameCompartment(cx, args); - required = true; - while ((c = *format++) != '\0') { -- if (isspace(c)) -+ if (isspace(((unsigned char)c))) - continue; - if (c == '/') { - required = false; -@@ -525,7 +525,7 @@ MessageParameterCount(const char *format - { - unsigned numfmtspecs = 0; - for (const char *fmt = format; *fmt != '\0'; fmt++) { -- if (*fmt == '{' && isdigit(fmt[1])) -+ if (*fmt == '{' && isdigit((unsigned char)fmt[1])) - ++numfmtspecs; - } - return numfmtspecs; +@@ -115,7 +115,7 @@ using js::frontend::Parser; + #define JS_ADDRESSOF_VA_LIST(ap) (&(ap)) + #endif + +-bool ++JS_PUBLIC_API(bool) + JS::CallArgs::requireAtLeast(JSContext* cx, const char* fnname, unsigned required) { + if (length() < required) { + char numArgsStr[40]; diff --git a/www/firefox/patches/patch-js_src_jsprototypes.h b/www/firefox/patches/patch-js_src_jsprototypes.h deleted file mode 100644 index cee5eaf3921..00000000000 --- a/www/firefox/patches/patch-js_src_jsprototypes.h +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-js_src_jsprototypes.h,v 1.1 2015/04/12 06:24:32 martin Exp $ - -Hack around #ifdef inconsistency (depending on exact include order) in -some unified builds, -see https://bugzilla.mozilla.org/show_bug.cgi?id=1152776 - -Remove this patch once we switch to the firefox-38 branch (where the -#ifdef JS_HAVE_SYMBOLS is gone). - ---- js/src/jsprototypes.h.orig 2015-04-11 19:06:44.000000000 +0200 -+++ js/src/jsprototypes.h 2015-04-11 19:06:31.000000000 +0200 -@@ -62,7 +62,7 @@ - #define IF_SAB(real,imaginary) imaginary - #endif - --#ifdef JS_HAS_SYMBOLS -+#if 1 - #define IF_SYMBOLS(real,imaginary) real - #else - #define IF_SYMBOLS(real,imaginary) imaginary diff --git a/www/firefox/patches/patch-js_src_shell_jsoptparse.cpp b/www/firefox/patches/patch-js_src_shell_jsoptparse.cpp index fc042928f1b..5e669703e99 100644 --- a/www/firefox/patches/patch-js_src_shell_jsoptparse.cpp +++ b/www/firefox/patches/patch-js_src_shell_jsoptparse.cpp @@ -1,8 +1,8 @@ -$NetBSD: patch-js_src_shell_jsoptparse.cpp,v 1.2 2015/02/19 21:33:22 ryoon Exp $ +$NetBSD: patch-js_src_shell_jsoptparse.cpp,v 1.3 2015/05/12 22:48:54 ryoon Exp $ ---- js/src/shell/jsoptparse.cpp.orig 2015-01-23 06:00:02.000000000 +0000 +--- js/src/shell/jsoptparse.cpp.orig 2015-05-04 00:43:27.000000000 +0000 +++ js/src/shell/jsoptparse.cpp -@@ -90,11 +90,11 @@ PrintParagraph(const char *text, unsigne +@@ -90,7 +90,7 @@ PrintParagraph(const char* text, unsigne printf("%*s", startColno, ""); while (*it != '\0') { @@ -10,9 +10,4 @@ $NetBSD: patch-js_src_shell_jsoptparse.cpp,v 1.2 2015/02/19 21:33:22 ryoon Exp $ + MOZ_ASSERT(!isspace((unsigned char)*it)); /* Delimit the current token. */ - const char *limit = it; -- while (!isspace(*limit) && *limit != '\0') -+ while (!isspace(((unsigned char)*limit)) && *limit != '\0') - ++limit; - - /* + const char* limit = it; diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi index 1ab122f74f9..738af421665 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi @@ -1,17 +1,27 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi,v 1.2 2014/04/30 15:07:18 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__coding_codecs_opus_opus.gypi,v 1.3 2015/05/12 22:48:54 ryoon Exp $ ---- media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi.orig 2014-04-18 02:03:52.000000000 +0000 +--- media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi.orig 2015-05-04 00:43:28.000000000 +0000 +++ 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 a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_neteq_neteq.gypi b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_neteq_neteq.gypi new file mode 100644 index 00000000000..171fd01f787 --- /dev/null +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_audio__coding_neteq_neteq.gypi @@ -0,0 +1,28 @@ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_audio__coding_neteq_neteq.gypi,v 1.1 2015/05/12 22:48:54 ryoon Exp $ + +--- media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi.orig 2015-05-04 00:43:28.000000000 +0000 ++++ 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 a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi index 9b8c65d271d..416af31d80a 100644 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi +++ b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi @@ -1,6 +1,6 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi,v 1.6 2014/10/15 13:07:07 ryoon Exp $ +$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.gypi,v 1.7 2015/05/12 22:48:54 ryoon Exp $ ---- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi.orig 2014-10-11 09:06:41.000000000 +0000 +--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi.orig 2015-05-04 00:43:29.000000000 +0000 +++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi @@ -7,6 +7,9 @@ # be found in the AUTHORS file in the root of the source tree. @@ -11,24 +11,24 @@ $NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__capture_video__capture.g + }, 'targets': [ { - 'target_name': 'video_capture_module', -@@ -46,6 +49,19 @@ - 'linux/video_capture_linux.cc', - 'linux/video_capture_linux.h', - ], -+ 'conditions': [ -+ ['use_libv4l2==1', { -+ 'defines': [ -+ 'HAVE_LIBV4L2', -+ ], -+ 'cflags_mozilla': [ -+ '$(MOZ_LIBV4L2_CFLAGS)', -+ ], -+ 'libraries': [ -+ '-lv4l2', -+ ], -+ }], + # Note this library is missing an implementation for the video capture. +@@ -69,6 +72,19 @@ + 'linux/video_capture_linux.cc', + 'linux/video_capture_linux.h', + ], ++ 'conditions': [ ++ ['use_libv4l2==1', { ++ 'defines': [ ++ 'HAVE_LIBV4L2', + ], - }], # linux - ['OS=="mac"', { - 'sources': [ ++ 'cflags_mozilla': [ ++ '$(MOZ_LIBV4L2_CFLAGS)', ++ ], ++ 'libraries': [ ++ '-lv4l2', ++ ], ++ }], ++ ], + }], # linux + ['OS=="mac"', { + 'sources': [ diff --git a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__coding_main_source_receiver.cc b/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__coding_main_source_receiver.cc deleted file mode 100644 index a416a5dcf66..00000000000 --- a/www/firefox/patches/patch-media_webrtc_trunk_webrtc_modules_video__coding_main_source_receiver.cc +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-media_webrtc_trunk_webrtc_modules_video__coding_main_source_receiver.cc,v 1.1 2015/02/28 04:30:55 ryoon Exp $ - ---- media/webrtc/trunk/webrtc/modules/video_coding/main/source/receiver.cc.orig 2015-02-17 21:40:45.000000000 +0000 -+++ media/webrtc/trunk/webrtc/modules/video_coding/main/source/receiver.cc -@@ -159,12 +159,13 @@ VCMEncodedFrame* VCMReceiver::FrameForDe - // Assume that render timing errors are due to changes in the video stream. - if (next_render_time_ms < 0) { - timing_error = true; -- } else if (std::abs(next_render_time_ms - now_ms) > max_video_delay_ms_) { -+ } else if (std::abs(static_cast<int>(next_render_time_ms - now_ms)) > -+ max_video_delay_ms_) { - WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCoding, - VCMId(vcm_id_, receiver_id_), - "This frame is out of our delay bounds, resetting jitter " - "buffer: %d > %d", -- static_cast<int>(std::abs(next_render_time_ms - now_ms)), -+ std::abs(static_cast<int>(next_render_time_ms - now_ms)), - max_video_delay_ms_); - timing_error = true; - } else if (static_cast<int>(timing_->TargetVideoDelay()) > diff --git a/www/firefox/patches/patch-mfbt_Attributes.h b/www/firefox/patches/patch-mfbt_Attributes.h index cb258b11cff..43eabd117d6 100644 --- a/www/firefox/patches/patch-mfbt_Attributes.h +++ b/www/firefox/patches/patch-mfbt_Attributes.h @@ -1,16 +1,16 @@ -$NetBSD: patch-mfbt_Attributes.h,v 1.3 2015/04/05 12:54:12 ryoon Exp $ +$NetBSD: patch-mfbt_Attributes.h,v 1.4 2015/05/12 22:48:54 ryoon Exp $ ---- mfbt/Attributes.h.orig 2015-03-27 02:20:26.000000000 +0000 +--- mfbt/Attributes.h.orig 2015-05-04 00:43:30.000000000 +0000 +++ mfbt/Attributes.h @@ -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_CXX11_FINAL final - # define MOZ_HAVE_CXX11_OVERRIDE # define MOZ_HAVE_NEVER_INLINE __declspec(noinline) -@@ -72,6 +73,9 @@ + # 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 @@ -20,13 +20,13 @@ $NetBSD: patch-mfbt_Attributes.h,v 1.3 2015/04/05 12:54:12 ryoon Exp $ # if __has_extension(cxx_constexpr) # define MOZ_HAVE_CXX11_CONSTEXPR # endif -@@ -90,6 +94,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 + # define MOZ_HAVE_CXX11_CONSTEXPR + # define MOZ_HAVE_EXPLICIT_CONVERSION + # endif diff --git a/www/firefox/patches/patch-netwerk_base_public_nsNetUtil.h b/www/firefox/patches/patch-netwerk_base_nsNetUtil.h index 5c67b7aeb64..f316c5d6e80 100644 --- a/www/firefox/patches/patch-netwerk_base_public_nsNetUtil.h +++ b/www/firefox/patches/patch-netwerk_base_nsNetUtil.h @@ -1,10 +1,7 @@ -$NetBSD: patch-netwerk_base_public_nsNetUtil.h,v 1.1 2015/02/14 07:59:24 martin Exp $ +$NetBSD: patch-netwerk_base_nsNetUtil.h,v 1.1 2015/05/12 22:48:54 ryoon Exp $ -https://bugzilla.mozilla.org/show_bug.cgi?id=1130822 -Fix obivous alignment issues (causing crashes on some architectures). - ---- netwerk/base/public/nsNetUtil.h.orig 2015-01-23 07:00:06.000000000 +0100 -+++ netwerk/base/public/nsNetUtil.h 2015-02-13 08:51:18.000000000 +0100 +--- netwerk/base/nsNetUtil.h.orig 2015-05-04 00:43:34.000000000 +0000 ++++ netwerk/base/nsNetUtil.h @@ -13,6 +13,7 @@ #include "nsMemory.h" #include "nsCOMPtr.h" @@ -13,7 +10,7 @@ Fix obivous alignment issues (causing crashes on some architectures). #include "nsHashKeys.h" #include "plstr.h" -@@ -2717,6 +2718,26 @@ +@@ -2828,6 +2829,26 @@ NS_IsSrcdocChannel(nsIChannel *aChannel) bool NS_IsReasonableHTTPHeaderValue(const nsACString& aValue); /** diff --git a/www/firefox/patches/patch-netwerk_dns_Makefile.in b/www/firefox/patches/patch-netwerk_dns_Makefile.in deleted file mode 100644 index a2611eb5813..00000000000 --- a/www/firefox/patches/patch-netwerk_dns_Makefile.in +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-netwerk_dns_Makefile.in,v 1.2 2014/04/30 15:07:18 ryoon Exp $ - ---- netwerk/dns/Makefile.in.orig 2014-04-18 02:04:03.000000000 +0000 -+++ netwerk/dns/Makefile.in -@@ -5,6 +5,10 @@ - - include $(topsrcdir)/config/rules.mk - -+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 a/www/firefox/patches/patch-netwerk_dns_moz.build b/www/firefox/patches/patch-netwerk_dns_moz.build index e58caaf47af..2b2773f8710 100644 --- a/www/firefox/patches/patch-netwerk_dns_moz.build +++ b/www/firefox/patches/patch-netwerk_dns_moz.build @@ -1,11 +1,13 @@ -$NetBSD: patch-netwerk_dns_moz.build,v 1.1 2014/12/01 18:11:14 ryoon Exp $ +$NetBSD: patch-netwerk_dns_moz.build,v 1.2 2015/05/12 22:48:54 ryoon Exp $ ---- netwerk/dns/moz.build.orig 2014-11-21 03:37:46.000000000 +0000 +--- netwerk/dns/moz.build.orig 2015-05-04 00:43:34.000000000 +0000 +++ netwerk/dns/moz.build -@@ -63,3 +63,6 @@ GENERATED_FILES = [ - LOCAL_INCLUDES += [ - '../base/src', +@@ -68,5 +68,8 @@ LOCAL_INCLUDES += [ + '/netwerk/base', ] -+ + +if CONFIG['MOZ_NATIVE_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19': + CXXFLAGS += ['-I%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']] diff --git a/www/firefox/patches/patch-rc b/www/firefox/patches/patch-rc index 6e382e4944c..b70e8616bf0 100644 --- a/www/firefox/patches/patch-rc +++ b/www/firefox/patches/patch-rc @@ -1,13 +1,15 @@ -$NetBSD: patch-rc,v 1.5 2014/02/20 13:19:03 ryoon Exp $ +$NetBSD: patch-rc,v 1.6 2015/05/12 22:48:54 ryoon Exp $ ---- browser/branding/unofficial/locales/en-US/brand.dtd.orig 2013-01-04 23:44:28.000000000 +0000 +--- browser/branding/unofficial/locales/en-US/brand.dtd.orig 2015-05-04 00:43:19.000000000 +0000 +++ browser/branding/unofficial/locales/en-US/brand.dtd -@@ -2,7 +2,7 @@ +@@ -2,8 +2,8 @@ - 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/. --> +-<!ENTITY brandShorterName "Mozilla Developer Preview"> -<!ENTITY brandShortName "Mozilla Developer Preview"> -<!ENTITY brandFullName "Mozilla Developer Preview"> ++<!ENTITY brandShorterName "Browser"> +<!ENTITY brandShortName "Browser"> +<!ENTITY brandFullName "Browser"> <!ENTITY vendorShortName "mozilla.org"> diff --git a/www/firefox/patches/patch-security_manager_boot_src_CertBlocklist.cpp b/www/firefox/patches/patch-security_manager_boot_src_CertBlocklist.cpp deleted file mode 100644 index 6b63119fad6..00000000000 --- a/www/firefox/patches/patch-security_manager_boot_src_CertBlocklist.cpp +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-security_manager_boot_src_CertBlocklist.cpp,v 1.1 2015/04/10 05:40:36 martin Exp $ - -See https://bugzilla.mozilla.org/show_bug.cgi?id=1153090 - ---- security/manager/boot/src/CertBlocklist.cpp.orig 2015-04-03 04:30:09.000000000 +0200 -+++ security/manager/boot/src/CertBlocklist.cpp 2015-04-10 07:30:39.000000000 +0200 -@@ -87,7 +87,7 @@ CertBlocklistItem::Hash() const - // there's no requirement for a serial to be as large as 32 bits; if it's - // smaller, fall back to the first octet (otherwise, the last four) - if (serialLength >= 4) { -- hash = *(uint32_t *)(mSerialData + serialLength - 4); -+ memcpy(&hash, mSerialData + serialLength - 4, 4); - } else { - hash = *mSerialData; - } diff --git a/www/firefox/patches/patch-toolkit_library_moz.build b/www/firefox/patches/patch-toolkit_library_moz.build index 4c20f2bf014..2f16b0898bc 100644 --- a/www/firefox/patches/patch-toolkit_library_moz.build +++ b/www/firefox/patches/patch-toolkit_library_moz.build @@ -1,4 +1,4 @@ -$NetBSD: patch-toolkit_library_moz.build,v 1.3 2015/02/28 04:30:55 ryoon Exp $ +$NetBSD: patch-toolkit_library_moz.build,v 1.4 2015/05/12 22:48:54 ryoon Exp $ MOZ_GSTREAMER: GSTREAMER_LIBS are linked to libxul on Darwin, while they are @@ -6,7 +6,7 @@ MOZ_GSTREAMER: toolkit being cocoa isn't relevant at all. It's Darwin that needs the special handling, not Cocoa. ---- toolkit/library/moz.build.orig 2015-02-17 21:40:48.000000000 +0000 +--- toolkit/library/moz.build.orig 2015-05-04 00:43:33.000000000 +0000 +++ toolkit/library/moz.build @@ -214,6 +214,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF ] @@ -16,7 +16,7 @@ MOZ_GSTREAMER: OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS'] if CONFIG['MOZ_NATIVE_JPEG']: -@@ -225,6 +226,27 @@ if CONFIG['MOZ_NATIVE_PNG']: +@@ -225,6 +226,30 @@ if CONFIG['MOZ_NATIVE_PNG']: if CONFIG['MOZ_NATIVE_HUNSPELL']: OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] @@ -32,6 +32,9 @@ MOZ_GSTREAMER: +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'] + @@ -44,7 +47,7 @@ MOZ_GSTREAMER: if CONFIG['MOZ_NATIVE_LIBEVENT']: OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] -@@ -234,8 +256,14 @@ if CONFIG['MOZ_NATIVE_LIBVPX']: +@@ -234,8 +259,14 @@ if CONFIG['MOZ_NATIVE_LIBVPX']: if not CONFIG['MOZ_TREE_PIXMAN']: OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] @@ -61,7 +64,7 @@ MOZ_GSTREAMER: if CONFIG['HAVE_CLOCK_MONOTONIC']: OS_LIBS += CONFIG['REALTIME_LIBS'] -@@ -364,7 +392,7 @@ if CONFIG['OS_ARCH'] == 'WINNT': +@@ -365,7 +396,7 @@ if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG['MOZ_ENABLE_QT']: OS_LIBS += CONFIG['XEXT_LIBS'] diff --git a/www/firefox/patches/patch-toolkit_modules_GMPInstallManager.jsm b/www/firefox/patches/patch-toolkit_modules_GMPInstallManager.jsm index 716c37ac0be..9a6bb8cd67c 100644 --- a/www/firefox/patches/patch-toolkit_modules_GMPInstallManager.jsm +++ b/www/firefox/patches/patch-toolkit_modules_GMPInstallManager.jsm @@ -1,16 +1,8 @@ -$NetBSD: patch-toolkit_modules_GMPInstallManager.jsm,v 1.2 2015/04/05 12:54:12 ryoon Exp $ +$NetBSD: patch-toolkit_modules_GMPInstallManager.jsm,v 1.3 2015/05/12 22:48:54 ryoon Exp $ ---- toolkit/modules/GMPInstallManager.jsm.orig 2015-03-27 02:20:31.000000000 +0000 +--- toolkit/modules/GMPInstallManager.jsm.orig 2015-05-04 00:43:33.000000000 +0000 +++ toolkit/modules/GMPInstallManager.jsm -@@ -111,6 +111,7 @@ let GMPPrefs = { - */ - KEY_ADDON_ENABLED: "media.{0}.enabled", - KEY_ADDON_LAST_UPDATE: "media.{0}.lastUpdate", -+ KEY_ADDON_PATH: "media.{0}.path", - KEY_ADDON_VERSION: "media.{0}.version", - KEY_ADDON_AUTOUPDATE: "media.{0}.autoupdate", - KEY_ADDON_HIDDEN: "media.{0}.hidden", -@@ -933,9 +934,7 @@ GMPDownloader.prototype = { +@@ -874,9 +874,7 @@ GMPDownloader.prototype = { let gmpAddon = this._gmpAddon; let installToDirPath = Cc["@mozilla.org/file/local;1"]. createInstance(Ci.nsIFile); @@ -21,17 +13,17 @@ $NetBSD: patch-toolkit_modules_GMPInstallManager.jsm,v 1.2 2015/04/05 12:54:12 r installToDirPath.initWithPath(path); log.info("install to directory path: " + installToDirPath.path); let gmpInstaller = new GMPExtractor(zipPath, installToDirPath.path); -@@ -944,10 +943,12 @@ GMPDownloader.prototype = { +@@ -885,10 +883,12 @@ GMPDownloader.prototype = { // Success, set the prefs let now = Math.round(Date.now() / 1000); - GMPPrefs.set(GMPPrefs.KEY_ADDON_LAST_UPDATE, now, gmpAddon.id); + 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_ADDON_VERSION, gmpAddon.version, + GMPPrefs.set(GMPPrefs.KEY_PLUGIN_VERSION, gmpAddon.version, gmpAddon.id); -+ GMPPrefs.set(GMPPrefs.KEY_ADDON_PATH, ++ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_PATH, + installToDirPath.path, gmpAddon.id); this._deferred.resolve(extractedPaths); }, err => { diff --git a/www/firefox/patches/patch-toolkit_modules_GMPUtils.jsm b/www/firefox/patches/patch-toolkit_modules_GMPUtils.jsm new file mode 100644 index 00000000000..836aff66e4c --- /dev/null +++ b/www/firefox/patches/patch-toolkit_modules_GMPUtils.jsm @@ -0,0 +1,12 @@ +$NetBSD: patch-toolkit_modules_GMPUtils.jsm,v 1.1 2015/05/12 22:48:54 ryoon Exp $ + +--- toolkit/modules/GMPUtils.jsm.orig 2015-05-04 00:43:33.000000000 +0000 ++++ toolkit/modules/GMPUtils.jsm +@@ -74,6 +74,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 a/www/firefox/patches/patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm b/www/firefox/patches/patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm index 7414c117140..cda997fd077 100644 --- a/www/firefox/patches/patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm +++ b/www/firefox/patches/patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm @@ -1,57 +1,61 @@ -$NetBSD: patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm,v 1.1 2015/04/05 12:54:12 ryoon Exp $ +$NetBSD: patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm,v 1.2 2015/05/12 22:48:54 ryoon Exp $ ---- toolkit/mozapps/extensions/internal/GMPProvider.jsm.orig 2015-03-27 02:20:31.000000000 +0000 +--- toolkit/mozapps/extensions/internal/GMPProvider.jsm.orig 2015-05-04 00:43:33.000000000 +0000 +++ toolkit/mozapps/extensions/internal/GMPProvider.jsm -@@ -40,6 +40,7 @@ const KEY_LOGGING_LEVEL = KEY_LOG_B - const KEY_LOGGING_DUMP = KEY_LOG_BASE + "dump"; - const KEY_EME_ENABLED = "media.eme.enabled"; // Global pref to enable/disable all EME plugins - const KEY_PLUGIN_ENABLED = "media.{0}.enabled"; -+const KEY_PLUGIN_PATH = "media.{0}.path"; - const KEY_PLUGIN_LAST_UPDATE = "media.{0}.lastUpdate"; - const KEY_PLUGIN_VERSION = "media.{0}.version"; - const KEY_PLUGIN_AUTOUPDATE = "media.{0}.autoupdate"; -@@ -165,8 +166,8 @@ function GMPWrapper(aPluginInfo) { +@@ -101,12 +101,11 @@ function GMPWrapper(aPluginInfo) { + Log.repository.getLoggerWithMessagePrefix("Toolkit.GMP", + "GMPWrapper(" + this._plugin.id + ") "); - Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_ENABLED, 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(KEY_PLUGIN_VERSION, this._plugin.id), +- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION, ++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH, + this._plugin.id), - this.onPrefVersionChanged, this); -+ Preferences.observe(GMPPrefs.getPrefKey(KEY_PLUGIN_PATH, this._plugin.id), + this.onPrefPathChanged, this); if (this._plugin.isEME) { - Preferences.observe(GMPPrefs.getPrefKey(KEY_EME_ENABLED, this._plugin.id), - this.onPrefEnabledChanged, this); -@@ -183,11 +184,8 @@ GMPWrapper.prototype = { + Preferences.observe(GMPPrefs.KEY_EME_ENABLED, + this.onPrefEMEGlobalEnabledChanged, this); +@@ -123,17 +122,14 @@ GMPWrapper.prototype = { + 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(KEY_PLUGIN_VERSION, null, -- this._plugin.id)); +- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, +- null, this._plugin.id)); + if (!this._gmpPath) { -+ this._gmpPath = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); ++ this._gmpPath = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); } return this._gmpPath; }, -@@ -202,8 +200,13 @@ GMPWrapper.prototype = { +- + get id() { return this._plugin.id; }, + get type() { return "plugin"; }, + get isGMPlugin() { return true; }, +@@ -144,8 +140,13 @@ GMPWrapper.prototype = { get description() { return this._plugin.description; }, get fullDescription() { return this._plugin.fullDescription; }, -- get version() { return GMPPrefs.get(KEY_PLUGIN_VERSION, null, +- get version() { return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null, - this._plugin.id); }, + get version() { + if (this.isInstalled) { -+ return GMPPrefs.get(KEY_PLUGIN_VERSION, null, ++ return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null, + this._plugin.id); + } + return null; + }, - get isActive() { return !this.userDisabled; }, - get appDisabled() { return false; }, -@@ -346,24 +349,17 @@ GMPWrapper.prototype = { + get isActive() { return !this.appDisabled && !this.userDisabled; }, + get appDisabled() { +@@ -292,24 +293,17 @@ GMPWrapper.prototype = { get pluginMimeTypes() { return []; }, get pluginLibraries() { @@ -60,7 +64,7 @@ $NetBSD: patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm,v 1.1 2015/04 - return [path]; - } - return []; -+ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); ++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); + return path && path.length ? [OS.Path.basename(path)] : []; }, get pluginFullpath() { @@ -71,19 +75,19 @@ $NetBSD: patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm,v 1.1 2015/04 - return [path]; - } - return []; -+ let path = GMPPrefs.get(KEY_PLUGIN_PATH, null, this._plugin.id); ++ 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(KEY_PLUGIN_PATH, null, this._plugin.id); ++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id); + return path && path.length > 0; }, - onPrefEnabledChanged: function() { -@@ -386,10 +382,10 @@ GMPWrapper.prototype = { - this); + _handleEnabledChanged: function() { +@@ -389,10 +383,10 @@ GMPWrapper.prototype = { + } }, - onPrefVersionChanged: function() { @@ -93,34 +97,36 @@ $NetBSD: patch-toolkit_mozapps_extensions_internal_GMPProvider.jsm,v 1.1 2015/04 - this._log.info("onPrefVersionChanged() - unregistering gmp directory " + + this._log.info("onPrefPathChanged() - unregistering gmp directory " + this._gmpPath); - gmpService.removePluginDirectory(this._gmpPath); + gmpService.removeAndDeletePluginDirectory(this._gmpPath, true /* can defer */); } -@@ -397,15 +393,9 @@ GMPWrapper.prototype = { - +@@ -401,15 +395,10 @@ GMPWrapper.prototype = { 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(KEY_PLUGIN_VERSION, null, -- this._plugin.id)); +- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, +- null, this._plugin.id)); - } -+ this._gmpPath = GMPPrefs.get(KEY_PLUGIN_PATH, 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); } -@@ -415,8 +405,8 @@ GMPWrapper.prototype = { - shutdown: function() { - Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_ENABLED, this._plugin.id), +@@ -431,9 +420,9 @@ GMPWrapper.prototype = { + Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, + this._plugin.id), this.onPrefEnabledChanged, this); -- Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_VERSION, this._plugin.id), +- Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION, ++ Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH, + this._plugin.id), - this.onPrefVersionChanged, this); -+ Preferences.ignore(GMPPrefs.getPrefKey(KEY_PLUGIN_PATH, this._plugin.id), + this.onPrefPathChanged, this); - if (this._isEME) { - Preferences.ignore(GMPPrefs.getPrefKey(KEY_EME_ENABLED, this._plugin.id), - this.onPrefEnabledChanged, this); + if (this._plugin.isEME) { + Preferences.ignore(GMPPrefs.KEY_EME_ENABLED, + this.onPrefEMEGlobalEnabledChanged, this); diff --git a/www/firefox/patches/patch-widget_gtk_gtk3drawing.c b/www/firefox/patches/patch-widget_gtk_gtk3drawing.c index e398c2b4d52..451b2368144 100644 --- a/www/firefox/patches/patch-widget_gtk_gtk3drawing.c +++ b/www/firefox/patches/patch-widget_gtk_gtk3drawing.c @@ -1,8 +1,31 @@ -$NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ +$NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.4 2015/05/12 22:48:54 ryoon Exp $ ---- widget/gtk/gtk3drawing.c.orig 2015-03-27 02:20:33.000000000 +0000 +--- widget/gtk/gtk3drawing.c.orig 2015-05-04 00:43:35.000000000 +0000 +++ widget/gtk/gtk3drawing.c -@@ -762,37 +762,17 @@ moz_gtk_radio_get_metrics(gint* indicato +@@ -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* indicato gint moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width) { @@ -48,7 +71,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ return MOZ_GTK_SUCCESS; } -@@ -880,24 +860,6 @@ moz_gtk_splitter_get_metrics(gint orient +@@ -880,24 +869,6 @@ moz_gtk_splitter_get_metrics(gint orient return MOZ_GTK_SUCCESS; } @@ -73,7 +96,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ static gint moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect, GtkWidgetState* state, -@@ -908,19 +870,8 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec +@@ -908,19 +879,8 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec GtkStyleContext* style = gtk_widget_get_style_context(widget); gint x = rect->x, y=rect->y, width=rect->width, height=rect->height; @@ -94,7 +117,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ gtk_style_context_save(style); gtk_style_context_set_state(style, state_flags); -@@ -953,20 +904,12 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec +@@ -953,20 +913,12 @@ moz_gtk_button_paint(cairo_t *cr, GdkRec } if (state->focused) { @@ -121,7 +144,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ gtk_render_focus(style, cr, x, y, width, height); } gtk_style_context_restore(style); -@@ -1056,33 +999,23 @@ calculate_button_inner_rect(GtkWidget* b +@@ -1056,33 +1008,23 @@ calculate_button_inner_rect(GtkWidget* b GtkTextDirection direction, gboolean ignore_focus) { @@ -164,7 +187,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ return MOZ_GTK_SUCCESS; } -@@ -1230,6 +1163,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi +@@ -1230,6 +1172,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi GtkStyleContext* style; GtkScrollbar *scrollbar; GtkAdjustment *adj; @@ -172,7 +195,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ ensure_scrollbar_widget(); -@@ -1239,15 +1173,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi +@@ -1239,15 +1182,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWi scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget); gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction); @@ -197,7 +220,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); -@@ -1451,19 +1390,12 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect +@@ -1451,19 +1399,12 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect { gint x = rect->x, y = rect->y, width = rect->width, height = rect->height; GtkStyleContext* style; @@ -217,7 +240,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ if (draw_focus_outline_only) { // Inflate the given 'rect' with the focus outline size. gint h, v; -@@ -1495,14 +1427,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect +@@ -1495,14 +1436,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect /* This will get us the lit borders that focused textboxes enjoy on * some themes. */ gtk_style_context_set_state(style, GTK_STATE_FLAG_FOCUSED); @@ -232,7 +255,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ } if (state->disabled) { -@@ -1514,11 +1438,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect +@@ -1514,11 +1447,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRect } gtk_render_frame(style, cr, x, y, width, height); @@ -244,7 +267,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ gtk_style_context_restore(style); return MOZ_GTK_SUCCESS; -@@ -1823,8 +1742,6 @@ moz_gtk_container_paint(cairo_t *cr, Gdk +@@ -1823,8 +1751,6 @@ moz_gtk_container_paint(cairo_t *cr, Gdk GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); GtkStyleContext* style; GtkWidget *widget; @@ -253,7 +276,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ if (isradio) { ensure_radiobutton_widget(); -@@ -1837,7 +1754,6 @@ moz_gtk_container_paint(cairo_t *cr, Gdk +@@ -1837,7 +1763,6 @@ moz_gtk_container_paint(cairo_t *cr, Gdk style = gtk_widget_get_style_context(widget); gtk_style_context_save(style); @@ -261,7 +284,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ gtk_style_context_set_state(style, state_flags); /* this is for drawing a prelight box */ -@@ -1846,10 +1762,6 @@ moz_gtk_container_paint(cairo_t *cr, Gdk +@@ -1846,10 +1771,6 @@ moz_gtk_container_paint(cairo_t *cr, Gdk rect->x, rect->y, rect->width, rect->height); } @@ -272,7 +295,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ gtk_style_context_restore(style); return MOZ_GTK_SUCCESS; -@@ -1862,7 +1774,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, +@@ -1862,7 +1783,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, { GtkStyleContext *style; GtkWidget *widget; @@ -280,7 +303,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ if (!state->focused) return MOZ_GTK_SUCCESS; -@@ -1883,10 +1794,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, +@@ -1883,10 +1803,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, } gtk_widget_set_direction(widget, direction); @@ -291,7 +314,305 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state)); gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height); -@@ -2684,26 +2591,18 @@ moz_gtk_get_widget_border(GtkThemeWidget +@@ -2105,6 +2021,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 +2069,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan + 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 +2086,155 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectan + + 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 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; ++ } + +- /* 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); ++ 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 +2615,18 @@ moz_gtk_get_widget_border(GtkThemeWidget switch (widget) { case MOZ_GTK_BUTTON: { @@ -322,7 +643,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ return MOZ_GTK_SUCCESS; } case MOZ_GTK_ENTRY: -@@ -2711,7 +2610,13 @@ moz_gtk_get_widget_border(GtkThemeWidget +@@ -2711,7 +2634,13 @@ moz_gtk_get_widget_border(GtkThemeWidget ensure_entry_widget(); style = gtk_widget_get_style_context(gEntryWidget); moz_gtk_add_style_border(style, left, top, right, bottom); @@ -337,7 +658,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ return MOZ_GTK_SUCCESS; } case MOZ_GTK_TREEVIEW: -@@ -2731,23 +2636,15 @@ moz_gtk_get_widget_border(GtkThemeWidget +@@ -2731,23 +2660,15 @@ moz_gtk_get_widget_border(GtkThemeWidget * assigned. * That is why the following code is the same as for MOZ_GTK_BUTTON. * */ @@ -366,7 +687,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ return MOZ_GTK_SUCCESS; } case MOZ_GTK_TREE_HEADER_SORTARROW: -@@ -2767,29 +2664,23 @@ moz_gtk_get_widget_border(GtkThemeWidget +@@ -2767,29 +2688,23 @@ moz_gtk_get_widget_border(GtkThemeWidget /* 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. */ @@ -404,7 +725,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ /* If there is no separator, don't try to count its width. */ separator_width = 0; -@@ -2841,60 +2732,23 @@ moz_gtk_get_widget_border(GtkThemeWidget +@@ -2841,60 +2756,23 @@ moz_gtk_get_widget_border(GtkThemeWidget ensure_frame_widget(); w = gFrameWidget; break; @@ -470,7 +791,7 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ return MOZ_GTK_SUCCESS; } case MOZ_GTK_MENUPOPUP: -@@ -2921,6 +2775,8 @@ moz_gtk_get_widget_border(GtkThemeWidget +@@ -2921,6 +2799,8 @@ moz_gtk_get_widget_border(GtkThemeWidget return MOZ_GTK_SUCCESS; } /* These widgets have no borders, since they are not containers. */ @@ -479,3 +800,34 @@ $NetBSD: patch-widget_gtk_gtk3drawing.c,v 1.3 2015/04/05 12:54:12 ryoon Exp $ case MOZ_GTK_SPLITTER_HORIZONTAL: case MOZ_GTK_SPLITTER_VERTICAL: case MOZ_GTK_CHECKBUTTON: +@@ -2975,11 +2855,7 @@ moz_gtk_get_tab_border(gint* left, gint* + 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 +2866,9 @@ moz_gtk_get_tab_border(gint* left, gint* + 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 a/www/firefox/patches/patch-widget_gtk_nsNativeThemeGTK.cpp b/www/firefox/patches/patch-widget_gtk_nsNativeThemeGTK.cpp index 6f4f6fcc03e..90a061aa59b 100644 --- a/www/firefox/patches/patch-widget_gtk_nsNativeThemeGTK.cpp +++ b/www/firefox/patches/patch-widget_gtk_nsNativeThemeGTK.cpp @@ -1,8 +1,17 @@ -$NetBSD: patch-widget_gtk_nsNativeThemeGTK.cpp,v 1.3 2015/04/05 12:54:12 ryoon Exp $ +$NetBSD: patch-widget_gtk_nsNativeThemeGTK.cpp,v 1.4 2015/05/12 22:48:54 ryoon Exp $ ---- widget/gtk/nsNativeThemeGTK.cpp.orig 2015-03-27 02:20:33.000000000 +0000 +--- widget/gtk/nsNativeThemeGTK.cpp.orig 2015-05-04 00:43:35.000000000 +0000 +++ widget/gtk/nsNativeThemeGTK.cpp -@@ -1528,9 +1528,15 @@ nsNativeThemeGTK::GetWidgetTransparency( +@@ -761,6 +761,8 @@ nsNativeThemeGTK::GetExtraSizeForWidget( + 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) +@@ -1528,9 +1530,15 @@ nsNativeThemeGTK::GetWidgetTransparency( case NS_THEME_MENUPOPUP: case NS_THEME_WINDOW: case NS_THEME_DIALOG: diff --git a/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp b/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp index 01c6213510a..e81f8176549 100644 --- a/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp +++ b/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp @@ -1,9 +1,9 @@ -$NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.10 2015/01/30 07:32:24 pho Exp $ +$NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.11 2015/05/12 22:48:54 ryoon Exp $ * Replace XP_MACOSX with XP_DARWIN as the former is not defined when the toolkit is not cocoa. ---- xpcom/base/nsStackWalk.cpp.orig 2015-01-23 06:00:09.000000000 +0000 +--- xpcom/base/nsStackWalk.cpp.orig 2015-05-04 00:43:35.000000000 +0000 +++ xpcom/base/nsStackWalk.cpp @@ -34,12 +34,12 @@ static CriticalAddress gCriticalAddress; #define _GNU_SOURCE @@ -30,7 +30,7 @@ $NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.10 2015/01/30 07:32:24 pho Exp $ #include <pthread.h> #include <CoreServices/CoreServices.h> -@@ -832,7 +832,7 @@ NS_DescribeCodeAddress(void* aPC, nsCode +@@ -830,7 +830,7 @@ NS_DescribeCodeAddress(void* aPC, nsCode } // i386 or PPC Linux stackwalking code @@ -39,7 +39,7 @@ $NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.10 2015/01/30 07:32:24 pho Exp $ #include <stdlib.h> #include <string.h> -@@ -903,7 +903,7 @@ FramePointerStackWalk(NS_WalkStackCallba +@@ -901,7 +901,7 @@ FramePointerStackWalk(NS_WalkStackCallba (long(next) & 3)) { break; } @@ -48,12 +48,12 @@ $NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.10 2015/01/30 07:32:24 pho Exp $ // ppc mac or powerpc64 linux void* pc = *(bp + 2); bp += 3; -@@ -933,7 +933,7 @@ FramePointerStackWalk(NS_WalkStackCallba +@@ -931,7 +931,7 @@ FramePointerStackWalk(NS_WalkStackCallba } #define X86_OR_PPC (defined(__i386) || defined(PPC) || defined(__ppc__)) -#if X86_OR_PPC && (NSSTACKWALK_SUPPORTS_MACOSX || NSSTACKWALK_SUPPORTS_LINUX) // i386 or PPC Linux or Mac stackwalking code +#if X86_OR_PPC && (NSSTACKWALK_SUPPORTS_DARWIN || NSSTACKWALK_SUPPORTS_LINUX) // i386 or PPC Linux or Mac stackwalking code - EXPORT_XPCOM_API(nsresult) + XPCOM_API(nsresult) NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, diff --git a/www/firefox/patches/patch-xpcom_build_XPCOMInit.cpp b/www/firefox/patches/patch-xpcom_build_XPCOMInit.cpp index fa6b734ee4f..89f902fcbeb 100644 --- a/www/firefox/patches/patch-xpcom_build_XPCOMInit.cpp +++ b/www/firefox/patches/patch-xpcom_build_XPCOMInit.cpp @@ -1,8 +1,8 @@ -$NetBSD: patch-xpcom_build_XPCOMInit.cpp,v 1.1 2015/01/16 22:42:09 ryoon Exp $ +$NetBSD: patch-xpcom_build_XPCOMInit.cpp,v 1.2 2015/05/12 22:48:54 ryoon Exp $ ---- xpcom/build/XPCOMInit.cpp.orig 2015-01-09 04:38:29.000000000 +0000 +--- xpcom/build/XPCOMInit.cpp.orig 2015-05-04 00:43:36.000000000 +0000 +++ xpcom/build/XPCOMInit.cpp -@@ -139,7 +139,9 @@ extern nsresult nsStringInputStreamConst +@@ -141,7 +141,9 @@ extern nsresult nsStringInputStreamConst #include "mozilla/VisualEventTracer.h" #endif @@ -10,9 +10,9 @@ $NetBSD: patch-xpcom_build_XPCOMInit.cpp,v 1.1 2015/01/16 22:42:09 ryoon Exp $ #include "ogg/ogg.h" +#endif #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) - #include "vpx_mem/vpx_mem.h" - #endif -@@ -652,11 +654,13 @@ NS_InitXPCOM2(nsIServiceManager** aResul + #if defined(HAVE_STDINT_H) + // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in +@@ -669,11 +671,13 @@ NS_InitXPCOM2(nsIServiceManager** aResul // this oddness. mozilla::SetICUMemoryFunctions(); |