Skip to content
This repository has been archived by the owner on Jul 3, 2018. It is now read-only.

Commit

Permalink
Merge the last PGO-green inbound changeset to m-c.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvandermeulen committed Sep 25, 2012
2 parents 3dc6ee7 + 2663bae commit 51e1eb4
Show file tree
Hide file tree
Showing 710 changed files with 143,980 additions and 36,043 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<script type="application/javascript">
//gA11yEventDumpID = "eventdump"; // debug stuff
//gA11yEventDumpToConsole = true; // debug stuff
gA11yEventDumpToConsole = true; // debug stuff

var gQueue = null;
function doTests()
Expand Down
3 changes: 2 additions & 1 deletion b2g/chrome/content/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ var shell = {
name: 'view',
data: {
type: handler.type,
url: handler.url
url: handler.url,
extras: handler.extras
}
});
}
Expand Down
10 changes: 9 additions & 1 deletion b2g/components/YoutubeProtocolHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ YoutubeProtocolHandler.prototype = {

let bestType = -1;

let extras = { }

streams.forEach(function(aStream) {
let params = extractParameters(aStream);
let url = params["url"];
Expand All @@ -95,12 +97,18 @@ YoutubeProtocolHandler.prototype = {
mimeType = type;
bestType = index;
}
for (let param in params) {
if (["thumbnail_url", "length_seconds", "title"].indexOf(param) != -1) {
extras[param] = decodeURIComponent(params[param]);
}
}
});

if (uri && mimeType) {
cpmm.sendAsyncMessage("content-handler", {
url: uri,
type: mimeType
type: mimeType,
extras: extras
});
}
});
Expand Down
1 change: 1 addition & 0 deletions b2g/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@BINPATH@/components/ProcessGlobal.js
@BINPATH@/components/ContentHandler.js
@BINPATH@/components/PaymentGlue.js
@BINPATH@/components/YoutubeProtocolHandler.js

#ifdef XP_MACOSX
@BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@
Expand Down
21 changes: 18 additions & 3 deletions config/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ ifndef INCLUDED_AUTOCONF_MK
include $(DEPTH)/config/autoconf.mk
endif

space = $(NULL) $(NULL)

# Include defs.mk files that can be found in $(srcdir)/$(DEPTH),
# $(srcdir)/$(DEPTH-1), $(srcdir)/$(DEPTH-2), etc., and $(srcdir)
# where $(DEPTH-1) is one level less of depth, $(DEPTH-2), two, etc.
# i.e. for DEPTH=../../.., DEPTH-1 is ../.. and DEPTH-2 is ..
# These defs.mk files are used to define variables in a directory
# and all its subdirectories, recursively.
__depth := $(subst /, ,$(DEPTH))
ifeq (.,$(__depth))
__depth :=
endif
$(foreach __d,$(__depth) .,$(eval __depth = $(wordlist 2,$(words $(__depth)),$(__depth))$(eval -include $(subst $(space),/,$(strip $(srcdir) $(__depth) defs.mk)))))

COMMA = ,

# Sanity check some variables
Expand All @@ -51,9 +65,6 @@ $(foreach x,$(CHECK_VARS),$(check-variable))
core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))
core_realpath = $(if $(realpath $(1)),$(realpath $(1)),$(call core_abspath,$(1)))

nullstr :=
space :=$(nullstr) # EOL

core_winabspath = $(firstword $(subst /, ,$(call core_abspath,$(1)))):$(subst $(space),,$(patsubst %,\\%,$(wordlist 2,$(words $(subst /, ,$(call core_abspath,$(1)))), $(strip $(subst /, ,$(call core_abspath,$(1)))))))

RM = rm -f
Expand Down Expand Up @@ -814,3 +825,7 @@ PLY_INCLUDE = -I$(topsrcdir)/other-licenses/ply
endif

export CL_INCLUDES_PREFIX

ifeq ($(MOZ_WIDGET_GTK),2)
MOZ_GTK2_CFLAGS := -I$(topsrcdir)/widget/gtk2/compat $(MOZ_GTK2_CFLAGS)
endif
26 changes: 13 additions & 13 deletions config/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ $(HOST_CMMOBJS): host_%.$(OBJ_SUFFIX): %.mm
$(COBJS): %.$(OBJ_SUFFIX): %.c $(call mkdir_deps,$(MDDEPDIR))
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

# DEFINES and ACDEFINES are needed here to enable conditional compilation of Q_OBJECTs:
# 'moc' only knows about #defines it gets on the command line (-D...), not in
Expand All @@ -965,51 +965,51 @@ $(ASOBJS): %.$(OBJ_SUFFIX): %.$(ASM_SUFFIX)
endif

$(SOBJS): %.$(OBJ_SUFFIX): %.S
$(AS) -o $@ $(ASFLAGS) -c $<
$(AS) -o $@ $(ASFLAGS) $(LOCAL_INCLUDES) $(TARGET_LOCAL_INCLUDES) -c $<

#
# Please keep the next two rules in sync.
#
$(CCOBJS): %.$(OBJ_SUFFIX): %.cc $(call mkdir_deps,$(MDDEPDIR))
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

$(CPPOBJS): %.$(OBJ_SUFFIX): %.cpp $(call mkdir_deps,$(MDDEPDIR))
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

$(CMMOBJS): $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm $(call mkdir_deps,$(MDDEPDIR))
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(_VPATH_SRCS)
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

$(CMOBJS): $(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m $(call mkdir_deps,$(MDDEPDIR))
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $(_VPATH_SRCS)
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

%.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
$(CCC) -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
$(CCC) -S $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

%.s: %.cc $(call mkdir_deps,$(MDDEPDIR))
$(CCC) -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
$(CCC) -S $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

%.s: %.c $(call mkdir_deps,$(MDDEPDIR))
$(CC) -S $(COMPILE_CFLAGS) $(_VPATH_SRCS)
$(CC) -S $(COMPILE_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS)

%.i: %.cpp $(call mkdir_deps,$(MDDEPDIR))
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) > $*.i
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS) > $*.i

%.i: %.cc $(call mkdir_deps,$(MDDEPDIR))
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) > $*.i
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS) > $*.i

%.i: %.c $(call mkdir_deps,$(MDDEPDIR))
$(CC) -C -E $(COMPILE_CFLAGS) $(_VPATH_SRCS) > $*.i
$(CC) -C -E $(COMPILE_CFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS) > $*.i

%.i: %.mm $(call mkdir_deps,$(MDDEPDIR))
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(_VPATH_SRCS) > $*.i
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $(TARGET_LOCAL_INCLUDES) $(_VPATH_SRCS) > $*.i

%.res: %.rc
@echo Creating Resource file: $@
Expand Down
24 changes: 16 additions & 8 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PYTHON_VERSION_MAJOR=2
PYTHON_VERSION_MINOR=5
CAIRO_VERSION=1.10
PANGO_VERSION=1.14.0
GTK2_VERSION=2.10.0
GTK2_VERSION=2.18.0
WINDRES_VERSION=2.14.90
W32API_VERSION=3.14
GNOMEVFS_VERSION=2.0
Expand Down Expand Up @@ -4435,6 +4435,8 @@ dnl ========================================================
dnl = Enable the toolkit as needed =
dnl ========================================================

MOZ_WIDGET_GTK=

case "$MOZ_WIDGET_TOOLKIT" in

cairo-windows)
Expand All @@ -4458,7 +4460,8 @@ cairo-gtk2|cairo-gtk2-x11)
TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
TK_LIBS='$(MOZ_GTK2_LIBS)'
AC_DEFINE(MOZ_WIDGET_GTK2)
AC_DEFINE(MOZ_WIDGET_GTK,2)
MOZ_WIDGET_GTK=2
AC_DEFINE_UNQUOTED(MOZ_WIDGET_GTK,$MOZ_WIDGET_GTK)
MOZ_PDF_PRINTING=1
MOZ_INSTRUMENT_EVENT_LOOP=1
;;
Expand Down Expand Up @@ -4732,6 +4735,7 @@ AC_SUBST(MOZ_ENABLE_QTMOBILITY)
AC_SUBST(MOZ_ENABLE_XREMOTE)
AC_SUBST(MOZ_GTK2_CFLAGS)
AC_SUBST(MOZ_GTK2_LIBS)
AC_SUBST(MOZ_WIDGET_GTK)
AC_SUBST(MOZ_QT_CFLAGS)
AC_SUBST(MOZ_QT_LIBS)

Expand Down Expand Up @@ -8802,8 +8806,12 @@ fi

# Generate a JSON config file for unittest harnesses etc to read
# build configuration details from in a standardized way.
OS_TARGET=${OS_TARGET} TARGET_CPU=${TARGET_CPU} MOZ_DEBUG=${MOZ_DEBUG} \
MOZ_WIDGET_TOOLKIT=${MOZ_WIDGET_TOOLKIT} UNIVERSAL_BINARY=${UNIVERSAL_BINARY} \
OS_TARGET=${OS_TARGET} \
TARGET_CPU=${TARGET_CPU} \
MOZ_DEBUG=${MOZ_DEBUG} \
MOZ_WIDGET_TOOLKIT=${MOZ_WIDGET_TOOLKIT} \
UNIVERSAL_BINARY=${UNIVERSAL_BINARY} \
MOZ_CRASHREPORTER=${MOZ_CRASHREPORTER} \
$PYTHON ${_topsrcdir}/config/writemozinfo.py ./mozinfo.json.tmp
if cmp -s ./mozinfo.json.tmp ./mozinfo.json; then
rm ./mozinfo.json.tmp
Expand Down Expand Up @@ -8888,10 +8896,10 @@ fi
# Run freetype configure script

if test "$MOZ_TREE_FREETYPE"; then
export CFLAGS="$CFLAGS -std=c99"
export CPPFLAGS="$CPPFLAGS"
export CXXFLAGS="$CXXFLAGS"
export LDFLAGS="$LDFLAGS"
export CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS -std=c99"
export CPPFLAGS="$CPPFLAGS $MOZ_DEBUG_FLAGS"
export CXXFLAGS="$CXXFLAGS $MOZ_DEBUG_FLAGS"
export LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS"
export CONFIG_FILES="unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
ac_configure_args="$ac_configure_args --host=$target --disable-shared --with-pic=yes"
AC_OUTPUT_SUBDIRS(modules/freetype2)
Expand Down
1 change: 1 addition & 0 deletions content/base/test/chrome/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ MOCHITEST_CHROME_FILES = \
test_bug599295.html \
test_bug650776.html \
test_bug650784.html \
test_bug750096.html \
test_bug752226-3.xul \
test_bug752226-4.xul \
test_bug682305.html \
Expand Down
45 changes: 45 additions & 0 deletions content/base/test/chrome/test_bug750096.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=750096
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 750096</title>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=750096">Mozilla Bug 750096</a>
<p id="display"></p>
<div id="content" style="display: none">

</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 750096 **/

SimpleTest.waitForExplicitFinish();

var u = Components.interfaces.nsIParserUtils;
var s = Components.classes["@mozilla.org/parserutils;1"]
.getService(u);

var elt = document.getElementById("content");

var embed = s.parseFragment("<embed src=\'javascript:this.fail = true;\'>", 0, false, null, elt);
var img = s.parseFragment("<img src=\'javascript:this.fail = true;\'>", 0, false, null, elt);
var video = s.parseFragment("<video src=\'javascript:this.fail = true;\'></video>", 0, false, null, elt);
var object = s.parseFragment("<object data=\'javascript:this.fail = true;\'></object>", 0, false, null, elt);
var iframe = s.parseFragment("<iframe src=\'javascript:this.fail = true;\'></iframe>", 0, false, null, elt);

setTimeout(function() {
ok(!window.fail, "Should not have failed.");
SimpleTest.finish();
}, 0);

</script>
</pre>
</body>
</html>
2 changes: 2 additions & 0 deletions content/canvas/src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ CPPSRCS += \
WebGLExtensionLoseContext.cpp \
WebGLTexelConversions.cpp \
WebGLExtensionCompressedTextureS3TC.cpp \
WebGLExtensionCompressedTextureATC.cpp \
WebGLExtensionCompressedTexturePVRTC.cpp \
WebGLExtensionDepthTexture.cpp \
WebGLElementArrayCache.cpp \
$(NULL)
Expand Down
32 changes: 32 additions & 0 deletions content/canvas/src/WebGLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,16 @@ bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext)
isSupported = true;
}
break;
case WEBGL_compressed_texture_atc:
if (gl->IsExtensionSupported(GLContext::AMD_compressed_ATC_texture)) {
isSupported = true;
}
break;
case WEBGL_compressed_texture_pvrtc:
if (gl->IsExtensionSupported(GLContext::IMG_texture_compression_pvrtc)) {
isSupported = true;
}
break;
case WEBGL_depth_texture:
if (gl->IsGLES2() &&
gl->IsExtensionSupported(GLContext::OES_packed_depth_stencil) &&
Expand Down Expand Up @@ -1024,6 +1034,18 @@ WebGLContext::GetExtension(const nsAString& aName)
if (IsExtensionSupported(WEBGL_compressed_texture_s3tc))
ext = WEBGL_compressed_texture_s3tc;
}
else if (aName.Equals(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_atc"),
nsCaseInsensitiveStringComparator()))
{
if (IsExtensionSupported(WEBGL_compressed_texture_atc))
ext = WEBGL_compressed_texture_atc;
}
else if (aName.Equals(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_pvrtc"),
nsCaseInsensitiveStringComparator()))
{
if (IsExtensionSupported(WEBGL_compressed_texture_pvrtc))
ext = WEBGL_compressed_texture_pvrtc;
}
else if (aName.Equals(NS_LITERAL_STRING("MOZ_WEBGL_depth_texture"),
nsCaseInsensitiveStringComparator()))
{
Expand All @@ -1049,6 +1071,12 @@ WebGLContext::GetExtension(const nsAString& aName)
case WEBGL_compressed_texture_s3tc:
mExtensions[ext] = new WebGLExtensionCompressedTextureS3TC(this);
break;
case WEBGL_compressed_texture_atc:
mExtensions[ext] = new WebGLExtensionCompressedTextureATC(this);
break;
case WEBGL_compressed_texture_pvrtc:
mExtensions[ext] = new WebGLExtensionCompressedTexturePVRTC(this);
break;
case WEBGL_depth_texture:
mExtensions[ext] = new WebGLExtensionDepthTexture(this);
break;
Expand Down Expand Up @@ -1570,6 +1598,10 @@ WebGLContext::GetSupportedExtensions(Nullable< nsTArray<nsString> > &retval)
arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_lose_context"));
if (IsExtensionSupported(WEBGL_compressed_texture_s3tc))
arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_s3tc"));
if (IsExtensionSupported(WEBGL_compressed_texture_atc))
arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_atc"));
if (IsExtensionSupported(WEBGL_compressed_texture_pvrtc))
arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_pvrtc"));
if (IsExtensionSupported(WEBGL_depth_texture))
arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_depth_texture"));
}
10 changes: 7 additions & 3 deletions content/canvas/src/WebGLContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,13 @@ class WebGLContext :
public WebGLRectangleObject,
public nsWrapperCache
{
friend class WebGLContextUserData;
friend class WebGLMemoryPressureObserver;
friend class WebGLMemoryMultiReporterWrapper;
friend class WebGLExtensionLoseContext;
friend class WebGLExtensionCompressedTextureS3TC;
friend class WebGLContextUserData;
friend class WebGLMemoryPressureObserver;
friend class WebGLExtensionCompressedTextureATC;
friend class WebGLExtensionCompressedTexturePVRTC;
friend class WebGLExtensionDepthTexture;

enum {
Expand Down Expand Up @@ -1170,6 +1172,8 @@ class WebGLContext :
EXT_texture_filter_anisotropic,
WEBGL_lose_context,
WEBGL_compressed_texture_s3tc,
WEBGL_compressed_texture_atc,
WEBGL_compressed_texture_pvrtc,
WEBGL_depth_texture,
WebGLExtensionID_number_of_extensions,
WebGLExtensionID_unknown_extension
Expand Down Expand Up @@ -1209,7 +1213,7 @@ class WebGLContext :
bool ValidateGLSLString(const nsAString& string, const char *info);

bool ValidateTexImage2DTarget(WebGLenum target, WebGLsizei width, WebGLsizei height, const char* info);
bool ValidateCompressedTextureSize(WebGLint level, WebGLenum format, WebGLsizei width, WebGLsizei height, uint32_t byteLength, const char* info);
bool ValidateCompressedTextureSize(WebGLenum target, WebGLint level, WebGLenum format, WebGLsizei width, WebGLsizei height, uint32_t byteLength, const char* info);
bool ValidateLevelWidthHeightForTarget(WebGLenum target, WebGLint level, WebGLsizei width, WebGLsizei height, const char* info);

static uint32_t GetBitsPerTexel(WebGLenum format, WebGLenum type);
Expand Down
Loading

0 comments on commit 51e1eb4

Please sign in to comment.