From dc528200e239529d361c03fceb41420043713953 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 6 Dec 2013 21:07:02 -0500 Subject: [PATCH 01/19] Bug 947299 - Don't build ICU as a shared library when building JS in standalone mode; r=glandium X-Git-Commit-ID: 4664ac89e5ef60181b1c783cced3c323d11d6e43 --HG-- extra : rebase_source : 9340c2e547459f1f001d7eae8eab61e8e29ec114 --- build/autoconf/icu.m4 | 2 +- js/src/Makefile.in | 2 ++ js/src/build/autoconf/icu.m4 | 2 +- js/src/configure.in | 12 ++++++------ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 index 517f5b77af6..b311a8a9414 100644 --- a/build/autoconf/icu.m4 +++ b/build/autoconf/icu.m4 @@ -22,7 +22,7 @@ AC_DEFUN([MOZ_CONFIG_ICU], [ fi MOZ_ICU_VERSION="$version" - if test -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then + if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then MOZ_SHARED_ICU=1 fi diff --git a/js/src/Makefile.in b/js/src/Makefile.in index 28da52c750c..14a5eade8c9 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -125,6 +125,7 @@ include $(topsrcdir)/config/config.mk # Ensure that this happens before including rules.mk ifdef ENABLE_INTL_API ifndef MOZ_NATIVE_ICU +ifdef MOZ_SHARED_ICU ifeq ($(OS_ARCH),WINNT) # Library names: On Windows, ICU uses modified library names for static # and debug libraries. @@ -156,6 +157,7 @@ ifdef ICU_FILES endif endif endif +endif include $(topsrcdir)/config/rules.mk diff --git a/js/src/build/autoconf/icu.m4 b/js/src/build/autoconf/icu.m4 index 517f5b77af6..b311a8a9414 100644 --- a/js/src/build/autoconf/icu.m4 +++ b/js/src/build/autoconf/icu.m4 @@ -22,7 +22,7 @@ AC_DEFUN([MOZ_CONFIG_ICU], [ fi MOZ_ICU_VERSION="$version" - if test -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then + if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then MOZ_SHARED_ICU=1 fi diff --git a/js/src/configure.in b/js/src/configure.in index d7184bc3750..8269205f07e 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -4213,7 +4213,7 @@ if test -n "$ENABLE_INTL_API"; then case "$OS_TARGET" in WINNT) ICU_LIB_NAMES="icuin icuuc icudt" - if test "$DISABLE_SHARED_JS" != "1"; then + if test -n "$MOZ_SHARED_ICU"; then DBG_SUFFIX= if test -n "$MOZ_DEBUG"; then DBG_SUFFIX=d @@ -4223,20 +4223,20 @@ if test -n "$ENABLE_INTL_API"; then ;; Darwin) ICU_LIB_NAMES="icui18n icuuc icudata" - if test "$DISABLE_SHARED_JS" != "1"; then + if test -n "$MOZ_SHARED_ICU"; then MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(lib).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))' fi ;; Linux|DragonFly|FreeBSD|NetBSD|OpenBSD) ICU_LIB_NAMES="icui18n icuuc icudata" - if test "$DISABLE_SHARED_JS" != "1"; then + if test -n "$MOZ_SHARED_ICU"; then MOZ_ICU_LIBS='$(foreach lib,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(lib)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))' fi ;; *) AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform]) esac - if test "$DISABLE_SHARED_JS" = "1"; then + if test -z "$MOZ_SHARED_ICU"; then MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib)' fi fi @@ -4251,7 +4251,7 @@ AC_SUBST(MOZ_NATIVE_ICU) dnl Settings for ICU if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then dnl We build ICU as a static library for non-shared js builds and as a shared library for shared js builds. - if test "$DISABLE_SHARED_JS" = "1"; then + if test -z "$MOZ_SHARED_ICU"; then AC_DEFINE(U_STATIC_IMPLEMENTATION) else AC_DEFINE(U_COMBINED_IMPLEMENTATION) @@ -4347,7 +4347,7 @@ if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then ICU_TARGET_OPT="--build=$target --host=$target" fi - if test "$DISABLE_SHARED_JS" = "1"; then + if test -z "$MOZ_SHARED_ICU"; then # To reduce library size, use static linking ICU_LINK_OPTS="--enable-static --disable-shared" else From dbaf907aa40acd323a8f8c38a37f9cf70662dbde Mon Sep 17 00:00:00 2001 From: Guillaume Abadie Date: Sat, 7 Dec 2013 10:23:33 +0100 Subject: [PATCH 02/19] bug 945243 - Fixes WebGL conformance test failures for the WEBGL_draw_buffers extension - r=jgilbert --- content/canvas/src/WebGLFramebuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/canvas/src/WebGLFramebuffer.cpp b/content/canvas/src/WebGLFramebuffer.cpp index 7502bd5bfa8..66438975b10 100644 --- a/content/canvas/src/WebGLFramebuffer.cpp +++ b/content/canvas/src/WebGLFramebuffer.cpp @@ -504,7 +504,7 @@ bool WebGLFramebuffer::CheckColorAttachementNumber(GLenum attachment, const char if (mContext->IsExtensionEnabled(WebGLContext::WEBGL_draw_buffers)) { if (attachment < LOCAL_GL_COLOR_ATTACHMENT0 || - attachment > GLenum(LOCAL_GL_COLOR_ATTACHMENT0 + mContext->mGLMaxColorAttachments)) + attachment >= GLenum(LOCAL_GL_COLOR_ATTACHMENT0 + mContext->mGLMaxColorAttachments)) { mContext->ErrorInvalidEnum(errorFormating, functionName, attachment); return false; From 6f9e8fc89d8e08f2d3315e676d651dca4b709d60 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Wed, 4 Dec 2013 14:06:16 +1300 Subject: [PATCH 03/19] Bug 938772. Don't give the anonymous poster an empty 'src' attribute if we don't have a 'poster' attribute. r=cpearce --- layout/generic/nsVideoFrame.cpp | 26 ++++++++++++------------- layout/generic/nsVideoFrame.h | 2 +- layout/generic/test/mochitest.ini | 1 + layout/generic/test/test_bug938772.html | 23 ++++++++++++++++++++++ 4 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 layout/generic/test/test_bug938772.html diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 541164366ab..b7c020c0ef7 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -85,8 +85,7 @@ nsVideoFrame::CreateAnonymousContent(nsTArray& aElements) // And now have it update its internal state element->UpdateState(false); - nsresult res = UpdatePosterSource(false); - NS_ENSURE_SUCCESS(res,res); + UpdatePosterSource(false); if (!aElements.AppendElement(mPosterImage)) return NS_ERROR_OUT_OF_MEMORY; @@ -585,20 +584,22 @@ nsVideoFrame::GetVideoIntrinsicSize(nsRenderingContext *aRenderingContext) nsPresContext::CSSPixelsToAppUnits(size.height)); } -nsresult +void nsVideoFrame::UpdatePosterSource(bool aNotify) { NS_ASSERTION(HasVideoElement(), "Only call this on