Merge inbound to m-c.

This commit is contained in:
Ryan VanderMeulen 2013-08-26 09:15:57 -04:00
commit 67ea288979
51 changed files with 440 additions and 351 deletions

View File

@ -65,7 +65,7 @@ def InvokeClWithDependencyGeneration(cmdline):
cl = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
mk = Makefile()
rule = mk.create_rule(target)
rule = mk.create_rule([target])
rule.add_dependencies([normcase(source)])
for line in cl.stdout:
# cl -showIncludes prefixes every header with "Note: including file:"

View File

@ -43,7 +43,7 @@ public:
: AudioNodeEngine(aNode)
, mSource(nullptr)
, mDestination(static_cast<AudioNodeStream*> (aDestination->Stream()))
, mStart(0)
, mStart(-1)
, mStop(TRACK_TICKS_MAX)
// Keep the default values in sync with OscillatorNode::OscillatorNode.
, mFrequency(440.f)
@ -245,6 +245,11 @@ public:
MOZ_ASSERT(mSource == aStream, "Invalid source stream");
TrackTicks ticks = aStream->GetCurrentPosition();
if (mStart == -1) {
ComputeSilence(aOutput);
return;
}
if (ticks + WEBAUDIO_BLOCK_SIZE < mStart) {
// We're not playing yet.
ComputeSilence(aOutput);

View File

@ -78,6 +78,7 @@ MOCHITEST_FILES := \
test_offlineDestinationChannelCountLess.html \
test_offlineDestinationChannelCountMore.html \
test_oscillatorNode.html \
test_oscillatorNodeStart.html \
test_pannerNode.html \
test_pannerNode_equalPower.html \
test_periodicWave.html \

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test the OscillatorNode interface</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="webaudio.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
var context = new AudioContext();
var osc = context.createOscillator();
var sp = context.createScriptProcessor();
osc.connect(sp);
sp.onaudioprocess = function (e) {
var input = e.inputBuffer.getChannelData(0);
var isSilent = true;
for (var i = 0; i < input.length; i++) {
if (input[i] != 0.0) {
isSilent = false;
}
}
sp.onaudioprocess = null;
ok(isSilent, "OscillatorNode should be silent before calling start.");
SimpleTest.finish();
}
});
</script>
</pre>
</body>
</html>

View File

@ -9,5 +9,7 @@ load 570884.html
# Plugin arch is going to change anyway with OOP content so skipping
# this test for now is OK.
skip-if(browserIsRemote||!haveTestPlugin||http.platform!="X11"||!testPluginIsOOP()) load 598862.html
load 626602-1.html
# SkiaGL is causing a compositor hang here, disable temporarily while that gets resolved in bug 908363
skip-if(Android) load 626602-1.html
load 752340.html

View File

@ -62,13 +62,17 @@ ImageDataSerializer::InitializeBufferInfo(gfx::IntSize aSize,
info->format = aFormat;
}
static inline uint32_t
ComputeStride(gfx::SurfaceFormat aFormat, uint32_t aWidth)
{
return gfx::GetAlignedStride<4>(gfx::BytesPerPixel(aFormat) * aWidth);
}
uint32_t
ImageDataSerializer::ComputeMinBufferSize(gfx::IntSize aSize,
gfx::SurfaceFormat aFormat)
{
// Note that at the moment we pack the image data with the minimum possible
// stride, we may decide to change that if we want aligned stride.
uint32_t bufsize = aSize.height * gfx::BytesPerPixel(aFormat) * aSize.width;
uint32_t bufsize = aSize.height * ComputeStride(aFormat, aSize.width);
return SurfaceBufferInfo::GetOffset()
+ gfx::GetAlignedStride<16>(bufsize);
}
@ -107,8 +111,7 @@ ImageDataSerializerBase::GetAsThebesSurface()
{
MOZ_ASSERT(IsValid());
SurfaceBufferInfo* info = GetBufferInfo(mData);
uint32_t stride = gfxASurface::BytesPerPixel(
gfx::SurfaceFormatToImageFormat(GetFormat())) * info->width;
uint32_t stride = ComputeStride(GetFormat(), info->width);
gfxIntSize size(info->width, info->height);
RefPtr<gfxImageSurface> surf =
new gfxImageSurface(GetData(), size, stride,
@ -122,8 +125,7 @@ ImageDataSerializerBase::GetAsSurface()
MOZ_ASSERT(IsValid());
SurfaceBufferInfo* info = GetBufferInfo(mData);
gfx::IntSize size(info->width, info->height);
uint32_t stride = gfxASurface::BytesPerPixel(
gfx::SurfaceFormatToImageFormat(GetFormat())) * info->width;
uint32_t stride = ComputeStride(GetFormat(), info->width);
RefPtr<gfx::DataSourceSurface> surf =
gfx::Factory::CreateWrappingDataSourceSurface(GetData(), stride, size, GetFormat());
return surf.forget();

View File

@ -21,22 +21,29 @@ bool ots_svg_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
OpenTypeSVG *svg = new OpenTypeSVG;
file->svg = svg;
std::map<uint32_t, uint32_t> doc_locations;
typedef std::map<uint32_t, uint32_t>::iterator lociter_t;
uint16_t version;
uint16_t index_length;
if (!table.ReadU16(&version) ||
!table.ReadU16(&index_length)) {
if (!table.ReadU16(&version)) {
NONFATAL_FAILURE("Couldn't read SVG table header");
}
if (version != 1) {
if (version != 0) {
NONFATAL_FAILURE("Unknown SVG table version");
}
uint32_t max_address = 0;
uint32_t total_docs_length = 0;
uint32_t doc_index_offset;
if (!table.ReadU32(&doc_index_offset)) {
NONFATAL_FAILURE("Couldn't read doc index offset from SVG table header");
}
if (doc_index_offset == 0 || doc_index_offset >= length) {
NONFATAL_FAILURE("Invalid doc index offset");
}
uint32_t color_palettes_offset;
if (!table.ReadU32(&color_palettes_offset)) {
NONFATAL_FAILURE("Couldn't read color palettes offset from SVG table header");
}
if (color_palettes_offset >= length) {
NONFATAL_FAILURE("Invalid doc index offset");
}
uint16_t start_glyph;
uint16_t end_glyph;
@ -44,6 +51,15 @@ bool ots_svg_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
uint32_t doc_length;
uint16_t last_end_glyph = 0;
table.set_offset(doc_index_offset);
uint16_t index_length;
if (!table.ReadU16(&index_length)) {
NONFATAL_FAILURE("Couldn't read SVG documents index");
}
if (index_length == 0) {
NONFATAL_FAILURE("Zero-length documents index");
}
for (uint16_t i = 0; i < index_length; i++) {
if (!table.ReadU16(&start_glyph) ||
!table.ReadU16(&end_glyph) ||
@ -60,42 +76,16 @@ bool ots_svg_parse(OpenTypeFile *file, const uint8_t *data, size_t length) {
NONFATAL_FAILURE("SVG table index range overlapping or not sorted");
}
if (doc_locations.find(doc_offset) != doc_locations.end()) {
if (doc_locations[doc_offset] != doc_length) {
NONFATAL_FAILURE("SVG table contains overlapping document range");
}
} else {
doc_locations[doc_offset] = doc_length;
total_docs_length += doc_length;
if (doc_offset + doc_length > max_address) {
max_address = doc_offset + doc_length;
}
}
if (doc_offset > 1024 * 1024 * 1024 ||
doc_length > 1024 * 1024 * 1024 ||
total_docs_length > 1024 * 1024 * 1024) {
doc_length > 1024 * 1024 * 1024) {
NONFATAL_FAILURE("Bad SVG document length");
}
last_end_glyph = end_glyph;
}
uint32_t last_end = 4 + 12 * index_length;
for (lociter_t iter = doc_locations.begin();
iter != doc_locations.end(); ++iter) {
if (iter->first != last_end) {
NONFATAL_FAILURE("SVG table contains overlapping document range");
if (uint64_t(doc_index_offset) + doc_offset + doc_length > length) {
NONFATAL_FAILURE("SVG table document overflows table");
}
last_end = iter->first + iter->second;
}
if (max_address != length) {
NONFATAL_FAILURE("Bad SVG document length");
}
if (!table.Skip(total_docs_length)) {
NONFATAL_FAILURE("SVG table is too short");
last_end_glyph = end_glyph;
}
svg->data = data;

View File

@ -264,16 +264,9 @@ gfxFontEntry::TryGetSVGData()
return false;
}
hb_blob_t *cmapTable = GetFontTable(TRUETYPE_TAG('c','m','a','p'));
if (!cmapTable) {
NS_NOTREACHED("using a font with no cmap!");
hb_blob_destroy(svgTable);
return false;
}
// gfxSVGGlyphs will hb_blob_destroy() the tables when it is finished
// with them.
mSVGGlyphs = new gfxSVGGlyphs(svgTable, cmapTable);
// gfxSVGGlyphs will hb_blob_destroy() the table when it is finished
// with it.
mSVGGlyphs = new gfxSVGGlyphs(svgTable);
}
return !!mSVGGlyphs;

View File

@ -1364,8 +1364,9 @@ gfxPlatform::InitBackendPrefs(uint32_t aCanvasBitmask, uint32_t aContentBitmask)
mPreferredCanvasBackend = BACKEND_CAIRO;
}
mFallbackCanvasBackend = GetCanvasBackendPref(aCanvasBitmask & ~(1 << mPreferredCanvasBackend));
mContentBackend = GetContentBackendPref(aContentBitmask);
mContentBackendBitmask = aContentBitmask;
mContentBackend = GetContentBackendPref(mContentBackendBitmask);
}
/* static */ BackendType
@ -1375,16 +1376,17 @@ gfxPlatform::GetCanvasBackendPref(uint32_t aBackendBitmask)
}
/* static */ BackendType
gfxPlatform::GetContentBackendPref(uint32_t aBackendBitmask)
gfxPlatform::GetContentBackendPref(uint32_t &aBackendBitmask)
{
return GetBackendPref("gfx.content.azure.enabled", "gfx.content.azure.backends", aBackendBitmask);
}
/* static */ BackendType
gfxPlatform::GetBackendPref(const char* aEnabledPrefName, const char* aBackendPrefName, uint32_t aBackendBitmask)
gfxPlatform::GetBackendPref(const char* aEnabledPrefName, const char* aBackendPrefName, uint32_t &aBackendBitmask)
{
if (aEnabledPrefName &&
!Preferences::GetBool(aEnabledPrefName, false)) {
aBackendBitmask = 0;
return BACKEND_NONE;
}
@ -1394,13 +1396,20 @@ gfxPlatform::GetBackendPref(const char* aEnabledPrefName, const char* aBackendPr
ParseString(prefString, ',', backendList);
}
uint32_t allowedBackends = 0;
BackendType result = BACKEND_NONE;
for (uint32_t i = 0; i < backendList.Length(); ++i) {
BackendType result = BackendTypeForName(backendList[i]);
if ((1 << result) & aBackendBitmask) {
return result;
BackendType type = BackendTypeForName(backendList[i]);
if ((1 << type) & aBackendBitmask) {
allowedBackends |= (1 << type);
if (result == BACKEND_NONE) {
result = type;
}
}
}
return BACKEND_NONE;
aBackendBitmask = allowedBackends;
return result;
}
bool

View File

@ -637,17 +637,19 @@ protected:
* returns the first backend named in the pref gfx.content.azure.backend
* which is a component of aBackendBitmask, a bitmask of backend types
*/
static mozilla::gfx::BackendType GetContentBackendPref(uint32_t aBackendBitmask);
static mozilla::gfx::BackendType GetContentBackendPref(uint32_t &aBackendBitmask);
/**
* If aEnabledPrefName is non-null, checks the aEnabledPrefName pref and
* returns BACKEND_NONE if the pref is not enabled.
* Otherwise it will return the first backend named in aBackendPrefName
* allowed by aBackendBitmask, a bitmask of backend types.
* It also modifies aBackendBitmask to only include backends that are
* allowed given the prefs.
*/
static mozilla::gfx::BackendType GetBackendPref(const char* aEnabledPrefName,
const char* aBackendPrefName,
uint32_t aBackendBitmask);
uint32_t &aBackendBitmask);
/**
* Decode the backend enumberation from a string.
*/

View File

@ -42,23 +42,33 @@ const float gfxSVGGlyphs::SVG_UNITS_PER_EM = 1000.0f;
const gfxRGBA SimpleTextObjectPaint::sZero = gfxRGBA(0.0f, 0.0f, 0.0f, 0.0f);
gfxSVGGlyphs::gfxSVGGlyphs(hb_blob_t *aSVGTable, hb_blob_t *aCmapTable)
gfxSVGGlyphs::gfxSVGGlyphs(hb_blob_t *aSVGTable)
{
mSVGData = aSVGTable;
const char* svgData = hb_blob_get_data(mSVGData, nullptr);
unsigned int length;
const char* svgData = hb_blob_get_data(mSVGData, &length);
mHeader = reinterpret_cast<const Header*>(svgData);
mIndex = reinterpret_cast<const IndexEntry*>(svgData + sizeof(Header));
mDocIndex = nullptr;
if (sizeof(Header) <= length && uint16_t(mHeader->mVersion) == 0 &&
uint64_t(mHeader->mDocIndexOffset) + 2 <= length) {
const DocIndex* docIndex = reinterpret_cast<const DocIndex*>
(svgData + mHeader->mDocIndexOffset);
// Limit the number of documents to avoid overflow
if (uint64_t(mHeader->mDocIndexOffset) + 2 +
uint16_t(docIndex->mNumEntries) * sizeof(IndexEntry) <= length) {
mDocIndex = docIndex;
}
}
mGlyphDocs.Init();
mGlyphIdMap.Init();
mCmapData = aCmapTable;
}
gfxSVGGlyphs::~gfxSVGGlyphs()
{
hb_blob_destroy(mSVGData);
hb_blob_destroy(mCmapData);
}
/*
@ -90,8 +100,13 @@ gfxSVGGlyphs::CompareIndexEntries(const void *aKey, const void *aEntry)
gfxSVGGlyphsDocument *
gfxSVGGlyphs::FindOrCreateGlyphsDocument(uint32_t aGlyphId)
{
IndexEntry *entry = (IndexEntry*)bsearch(&aGlyphId, mIndex,
uint16_t(mHeader->mIndexLength),
if (!mDocIndex) {
// Invalid table
return nullptr;
}
IndexEntry *entry = (IndexEntry*)bsearch(&aGlyphId, mDocIndex->mEntries,
uint16_t(mDocIndex->mNumEntries),
sizeof(IndexEntry),
CompareIndexEntries);
if (!entry) {
@ -101,10 +116,14 @@ gfxSVGGlyphs::FindOrCreateGlyphsDocument(uint32_t aGlyphId)
gfxSVGGlyphsDocument *result = mGlyphDocs.Get(entry->mDocOffset);
if (!result) {
const uint8_t *data = (const uint8_t*)hb_blob_get_data(mSVGData, nullptr);
result = new gfxSVGGlyphsDocument(data + entry->mDocOffset,
entry->mDocLength, mCmapData);
mGlyphDocs.Put(entry->mDocOffset, result);
unsigned int length;
const uint8_t *data = (const uint8_t*)hb_blob_get_data(mSVGData, &length);
if (entry->mDocOffset > 0 &&
uint64_t(mHeader->mDocIndexOffset) + entry->mDocOffset + entry->mDocLength <= length) {
result = new gfxSVGGlyphsDocument(data + mHeader->mDocIndexOffset + entry->mDocOffset,
entry->mDocLength);
mGlyphDocs.Put(entry->mDocOffset, result);
}
}
return result;
@ -156,20 +175,18 @@ gfxSVGGlyphsDocument::SetupPresentation()
* Walk the DOM tree to find all glyph elements and insert them into the lookup
* table
* @param aElem The element to search from
* @param aCmapTable Buffer containing the raw cmap table data
*/
void
gfxSVGGlyphsDocument::FindGlyphElements(Element *aElem, hb_blob_t *aCmapTable)
gfxSVGGlyphsDocument::FindGlyphElements(Element *aElem)
{
for (nsIContent *child = aElem->GetLastChild(); child;
child = child->GetPreviousSibling()) {
if (!child->IsElement()) {
continue;
}
FindGlyphElements(child->AsElement(), aCmapTable);
FindGlyphElements(child->AsElement());
}
InsertGlyphChar(aElem, aCmapTable);
InsertGlyphId(aElem);
}
@ -235,8 +252,7 @@ gfxSVGGlyphsDocument::GetGlyphElement(uint32_t aGlyphId)
return mGlyphIdMap.Get(aGlyphId);
}
gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t *aBuffer, uint32_t aBufLen,
hb_blob_t *aCmapTable)
gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t *aBuffer, uint32_t aBufLen)
{
mGlyphIdMap.Init();
ParseDocument(aBuffer, aBufLen);
@ -257,7 +273,7 @@ gfxSVGGlyphsDocument::gfxSVGGlyphsDocument(const uint8_t *aBuffer, uint32_t aBuf
return;
}
FindGlyphElements(root, aCmapTable);
FindGlyphElements(root);
}
static nsresult
@ -362,83 +378,28 @@ void
gfxSVGGlyphsDocument::InsertGlyphId(Element *aGlyphElement)
{
nsAutoString glyphIdStr;
if (!aGlyphElement->GetAttr(kNameSpaceID_None, nsGkAtoms::glyphid, glyphIdStr)) {
static const uint32_t glyphPrefixLength = 5;
// The maximum glyph ID is 65535 so the maximum length of the numeric part
// is 5.
if (!aGlyphElement->GetAttr(kNameSpaceID_None, nsGkAtoms::id, glyphIdStr) ||
!StringBeginsWith(glyphIdStr, NS_LITERAL_STRING("glyph")) ||
glyphIdStr.Length() > glyphPrefixLength + 5) {
return;
}
nsresult rv;
uint32_t glyphId = glyphIdStr.ToInteger(&rv);
if (NS_FAILED(rv)) {
uint32_t id = 0;
for (uint32_t i = glyphPrefixLength; i < glyphIdStr.Length(); ++i) {
PRUnichar ch = glyphIdStr.CharAt(i);
if (ch < '0' || ch > '9') {
return;
}
mGlyphIdMap.Put(glyphId, aGlyphElement);
}
// Get the Unicode character at index aPos in the string, and update aPos to
// point to the next char (i.e. advance by one or two, depending whether we
// found a surrogate pair).
// This will assert (and return junk) if the string is not well-formed UTF16.
// However, this is only used to process an attribute that comes from the
// SVG-glyph XML document, and is not exposed to modification via the DOM,
// so it must be well-formed UTF16 data (no unpaired surrogate codepoints)
// unless our Unicode handling is seriously broken.
static uint32_t
NextUSV(const nsAString& aString, uint32_t& aPos)
{
mozilla::DebugOnly<uint32_t> len = aString.Length();
NS_ASSERTION(aPos < len, "already at end of string");
uint32_t c1 = aString[aPos++];
if (NS_IS_HIGH_SURROGATE(c1)) {
NS_ASSERTION(aPos < len, "trailing high surrogate");
uint32_t c2 = aString[aPos++];
NS_ASSERTION(NS_IS_LOW_SURROGATE(c2), "isolated high surrogate");
return SURROGATE_TO_UCS4(c1, c2);
}
NS_ASSERTION(!NS_IS_LOW_SURROGATE(c1), "isolated low surrogate");
return c1;
}
void
gfxSVGGlyphsDocument::InsertGlyphChar(Element *aGlyphElement,
hb_blob_t *aCmapTable)
{
nsAutoString glyphChar;
if (!aGlyphElement->GetAttr(kNameSpaceID_None, nsGkAtoms::glyphchar,
glyphChar)) {
}
if (ch == '0' && i == glyphPrefixLength) {
return;
}
id = id * 10 + (ch - '0');
}
uint32_t charCode, varSelector = 0, len = glyphChar.Length(), index = 0;
if (!len) {
NS_WARNING("glyphchar is empty");
return;
}
charCode = NextUSV(glyphChar, index);
if (index < len) {
varSelector = NextUSV(glyphChar, index);
if (!gfxFontUtils::IsVarSelector(varSelector)) {
NS_WARNING("glyphchar contains more than one character");
return;
}
}
if (index < len) {
NS_WARNING("glyphchar contains more than one character");
return;
}
const uint8_t *data = (const uint8_t*)hb_blob_get_data(aCmapTable, &len);
uint32_t glyphId =
gfxFontUtils::MapCharToGlyph(data, len, charCode, varSelector);
if (glyphId) {
mGlyphIdMap.Put(glyphId, aGlyphElement);
}
mGlyphIdMap.Put(id, aGlyphElement);
}
void

View File

@ -33,8 +33,7 @@ class gfxSVGGlyphsDocument
typedef gfxFont::DrawMode DrawMode;
public:
gfxSVGGlyphsDocument(const uint8_t *aBuffer, uint32_t aBufLen,
hb_blob_t *aCmapTable);
gfxSVGGlyphsDocument(const uint8_t *aBuffer, uint32_t aBufLen);
Element *GetGlyphElement(uint32_t aGlyphId);
@ -49,10 +48,9 @@ private:
nsresult SetupPresentation();
void FindGlyphElements(Element *aElement, hb_blob_t *aCmapTable);
void FindGlyphElements(Element *aElement);
void InsertGlyphId(Element *aGlyphElement);
void InsertGlyphChar(Element *aGlyphElement, hb_blob_t *aCmapTable);
nsCOMPtr<nsIDocument> mDocument;
nsCOMPtr<nsIContentViewer> mViewer;
@ -78,16 +76,15 @@ public:
/**
* @param aSVGTable The SVG table from the OpenType font
* @param aCmapTable The CMAP table from the OpenType font
*
* The gfxSVGGlyphs object takes over ownership of the blob references
* that are passed in, and will hb_blob_destroy() them when finished;
* the caller should -not- destroy these references.
*/
gfxSVGGlyphs(hb_blob_t *aSVGTable, hb_blob_t *aCmapTable);
gfxSVGGlyphs(hb_blob_t *aSVGTable);
/**
* Releases our references to the SVG and cmap tables.
* Releases our references to the SVG table.
*/
~gfxSVGGlyphs();
@ -127,19 +124,24 @@ private:
nsBaseHashtable<nsUint32HashKey, Element*, Element*> mGlyphIdMap;
hb_blob_t *mSVGData;
hb_blob_t *mCmapData;
const struct Header {
mozilla::AutoSwap_PRUint16 mVersion;
mozilla::AutoSwap_PRUint16 mIndexLength;
mozilla::AutoSwap_PRUint32 mDocIndexOffset;
mozilla::AutoSwap_PRUint32 mColorPalettesOffset;
} *mHeader;
const struct IndexEntry {
struct IndexEntry {
mozilla::AutoSwap_PRUint16 mStartGlyph;
mozilla::AutoSwap_PRUint16 mEndGlyph;
mozilla::AutoSwap_PRUint32 mDocOffset;
mozilla::AutoSwap_PRUint32 mDocLength;
} *mIndex;
};
const struct DocIndex {
mozilla::AutoSwap_PRUint16 mNumEntries;
IndexEntry mEntries[1]; /* actual length = mNumEntries */
} *mDocIndex;
static int CompareIndexEntries(const void *_a, const void *_b);
};

View File

@ -502,7 +502,7 @@ gfxWindowsPlatform::UpdateRenderMode()
#endif
uint32_t canvasMask = 1 << BACKEND_CAIRO;
uint32_t contentMask = 1 << BACKEND_CAIRO;
uint32_t contentMask = 0;
if (mRenderMode == RENDER_DIRECT2D) {
canvasMask |= 1 << BACKEND_DIRECT2D;
contentMask |= 1 << BACKEND_DIRECT2D;

View File

@ -65,7 +65,7 @@ def InvokeClWithDependencyGeneration(cmdline):
cl = subprocess.Popen(cmdline, stdout=subprocess.PIPE)
mk = Makefile()
rule = mk.create_rule(target)
rule = mk.create_rule([target])
rule.add_dependencies([normcase(source)])
for line in cl.stdout:
# cl -showIncludes prefixes every header with "Note: including file:"

View File

@ -40,7 +40,11 @@ fail-if = os == "android"
[test_xpcomutils.js]
[test_unload.js]
[test_attributes.js]
# Bug 676965: test fails consistently on Android
fail-if = os == "android"
[test_params.js]
# Bug 676965: test fails consistently on Android
fail-if = os == "android"
[test_tearoffs.js]
[test_want_components.js]
[test_components.js]

View File

@ -22,31 +22,40 @@ SimpleTest.waitForExplicitFinish();
var startNow = Date.now();
var start = window.mozAnimationStartTime;
var firstListenerTime;
var secondListenerTime;
var firstListenerArg;
var secondListenerArg;
var thirdListenerTime;
function secondListener(t) {
secondListenerTime = t;
// callback arg is wallclock from mozRequestAnimationFrame
function thirdListener(t) {
thirdListenerTime = t;
// They really shouldn't be more than 100ms apart, but we can get weird
// effects on slow machines. 5 minutes is our test timeout, though.
ok(Math.abs(startNow - start) <= 5 * 60 * 1000, "Bogus animation start time");
ok(firstListenerTime >= start, "First listener should fire after start");
// FIXME: The timer filtering code makes the refresh driver call back in 0ms
// sometimes!
ok(secondListenerTime >= firstListenerTime,
ok(secondListenerArg >= firstListenerArg, // callback args from consecutive unprefixed requestAnimationFrame
"Second listener should fire after first listener");
ok(thirdListenerTime >= start, "Third listener should fire after start");
SimpleTest.finish();
}
function firstListener(t) {
firstListenerTime = t;
mozRequestAnimationFrame(secondListener);
// callback arg is from requestAnimationFrame and comparable to performance.now()
function secondListener(t) {
secondListenerArg = t;
mozRequestAnimationFrame(thirdListener);
}
function firstListener(t) {
firstListenerArg = t;
requestAnimationFrame(secondListener);
}
addLoadEvent(function() {
setTimeout(function() {
mozRequestAnimationFrame(firstListener);
requestAnimationFrame(firstListener);
}, 100);
});

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* font with the SVG glyph for the cat face U+1f431 remapped to
the BMP smiling-face character U+263a */
@font-face { font-family: foo; src: url("resources/cat_face-bmp.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x263a;</td><td>ネコ</td><td>cat face</td></tr>
</table>
</body>
</html>

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* no SVG cat-face glyph, so this should NOT match the testcases */
body { font-family: sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x263a;</td><td>ネコ</td><td>cat face</td></tr>
</table>
</body>
</html>

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* font with an SVG glyph for the cat face U+1f431 */
@font-face { font-family: foo; src: url("resources/cat_face.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x1f431;</td><td>ネコ</td><td>cat face</td></tr>
</table>
</body>
</html>

View File

@ -1,5 +1,6 @@
pref(gfx.font_rendering.opentype_svg.enabled,false) != svg-glyph-basic.svg svg-glyph-basic-ref.svg
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(Android||B2G) == svg-glyph-basic.svg svg-glyph-basic-ref.svg # bug 872487
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(Android||B2G) == svg-glyph-invalid-ids.svg svg-glyph-invalid-ids-ref.svg # bug 872487
pref(gfx.font_rendering.opentype_svg.enabled,false) != svg-glyph-positioning.svg svg-glyph-positioning-ref.svg
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(Android||B2G) == svg-glyph-positioning.svg svg-glyph-positioning-ref.svg # bug 872487
pref(gfx.font_rendering.opentype_svg.enabled,true) fails-if(winWidget) == svg-glyph-html.html svg-glyph-html-ref.svg # bug 872486
@ -18,8 +19,3 @@ pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-cachedopacity
pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-objectvalue.svg svg-glyph-objectvalue-ref.svg
pref(gfx.font_rendering.opentype_svg.enabled,true) fails == svg-glyph-mask.svg svg-glyph-mask-ref.svg # bug 872483
# test for a non-BMP character in the glyphchar attribute (bug 875629)
pref(gfx.font_rendering.opentype_svg.enabled,true) != cat_face-bmp.html cat_face-notref.html
pref(gfx.font_rendering.opentype_svg.enabled,true) == cat_face.html cat_face-bmp.html
# test for a variation sequence involving a Plane-1 char and Plane-14 variation selector (bug 875629)
pref(gfx.font_rendering.opentype_svg.enabled,true) == two_cats-var.html two_cats-ref.html

View File

@ -0,0 +1,10 @@
Fonts in this directory:
rubbish.woff contains an SVG table with the contents of rubbish.txt. This is
not a valid SVG table so no SVG glyphs will be used.
nosvg.woff is derived from the "Liberation" font. It contains no SVG table.
svg.woff is nosvg.woff with an SVG table added. The
table contains the glyph documents glyphs-base.svg, glyphs-invalid.svg,
glyphs-objectcolor.svg, glyphs-objectopacity.svg and glyphs-objectstroke.svg.

View File

@ -1,22 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!--
Basic test SVG glyphs
Covers glyph ID range 1 (L\xfe01) to 47 (M)
Covers glyph ID 46
-->
<!-- char = L -->
<g glyphid="46">
<g id="glyph46">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="red"/>
<rect x="100" y="-1000" width="100" height="100" stroke="none"
fill="turquoise" />
</g>
<!-- L with a UVS selector -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="green" glyphchar="L&#xfe01;"/>
<!-- M -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="pink" stroke="hotpink" glyphchar="M"/>
</svg>

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 349 B

View File

@ -0,0 +1,40 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!--
Test handling of invalid ids
-->
<!-- not valid: leading space not allowed -->
<g id="glyph 47">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="red"/>
</g>
<!-- not valid: leading zero not allowed -->
<g id="glyph047">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="red"/>
</g>
<!-- not valid: trailing garbage not allowed -->
<g id="glyph47xxx">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="red"/>
</g>
<!-- not valid: trailing space not allowed -->
<g id="glyph47 ">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="red"/>
</g>
<!-- not valid: floating point not allowed -->
<g id="glyph47.0">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="red"/>
</g>
<!-- char = M -->
<g id="glyph47">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="lime"/>
</g>
<!-- Ensure first glyph47 is picked -->
<g id="glyph47">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="red"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -6,19 +6,19 @@
<!-- -moz-objectfill, no stroke -->
<!-- N -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="none" fill="-moz-objectFill" glyphchar="N"/>
stroke="none" fill="-moz-objectFill" id="glyph48"/>
<!-- O -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectFill" stroke="none" glyphchar="O"/>
fill="-moz-objectFill" stroke="none" id="glyph49"/>
<!-- -moz-objectstroke -->
<!-- P -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="-moz-objectStroke" fill="burlywood" glyphchar="P"/>
stroke="-moz-objectStroke" fill="burlywood" id="glyph50"/>
<!-- both -moz-objectstroke and -moz-objectfill -->
<!-- Q -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectStroke" stroke="-moz-objectFill" glyphchar="Q"/>
fill="-moz-objectStroke" stroke="-moz-objectFill" id="glyph51"/>
</svg>

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 842 B

View File

@ -7,19 +7,19 @@
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="R"/>
stroke-opacity="-moz-objectStrokeOpacity" id="glyph52"/>
<!-- S -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="S"/>
stroke-opacity="-moz-objectFillOpacity" id="glyph53"/>
<!-- T -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="T"/>
stroke-opacity="-moz-objectStrokeOpacity" id="glyph54"/>
<!-- U -->
<!-- Test for bug where explicit `inherit' would fail for
@ -27,23 +27,23 @@
<g style="fill-opacity : -moz-objectStrokeOpacity; stroke-opacity : -moz-objectFillOpacity">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="inherit" stroke-opacity="inherit" glyphchar="U"/>
fill-opacity="inherit" stroke-opacity="inherit" id="glyph55"/>
</g>
<!-- W -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="W"/>
stroke-opacity="-moz-objectStrokeOpacity" id="glyph57"/>
<!-- X -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="X"/>
stroke-opacity="-moz-objectFillOpacity" id="glyph58"/>
<style type="text/css"><![CDATA[
#yparent {
#glyph59 {
fill-opacity : -moz-objectFillOpacity;
stroke-opacity : -moz-objectStrokeOpacity;
}
@ -52,7 +52,7 @@
}
]]></style>
<!-- Y -->
<g glyphchar="Y" id="yparent">
<g id="glyph59">
<rect x="100" y="-900" width="800" height="300" stroke="red" stroke-width="50"/>
<rect x="100" y="-400" width="800" height="300" stroke="red" stroke-width="50" id="ychild" />
</g>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -6,20 +6,20 @@
<!-- a -->
<rect x="100" y="-900" width="800" height="800" stroke="powderblue"
stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="50 50" glyphchar="a" />
stroke-dasharray="50 50" id="glyph67" />
<!-- b -->
<rect x="100" y="-900" width="800" height="800" stroke="chartreuse"
stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="-moz-objectValue" glyphchar="b" />
stroke-dasharray="-moz-objectValue" id="glyph68" />
<!-- c -->
<rect x="100" y="-900" width="800" height="800" stroke="sienna"
stroke-width="50" stroke-dasharray="50 50"
stroke-dashoffset="-moz-objectValue" glyphchar="c" />
stroke-dashoffset="-moz-objectValue" id="glyph69" />
<!-- d -->
<rect x="100" y="-900" width="800" height="800" stroke="olivedrab"
stroke-width="-moz-objectValue" stroke-dasharray="-moz-objectValue"
stroke-dashoffset="-moz-objectValue" glyphchar="d" />
stroke-dashoffset="-moz-objectValue" id="glyph70" />
</svg>

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 915 B

View File

@ -5,8 +5,4 @@
<rect x="20" y="0" width="20" height="20" stroke="none"
fill="turquoise" />
</g>
<rect x="10" y="210" width="180" height="180" stroke-width="20"
fill="pink" stroke="hotpink" />
<rect x="20" y="420" width="160" height="160" stroke-width="10"
stroke="black" fill="green" />
</svg>

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 249 B

View File

@ -14,7 +14,7 @@
]]>
</style>
<!--
Test that SVG glyphs are being drawn instead of TrueType glyphs
Test that SVG glyphs are being drawn instead of TrueType glyphs
Also testing that this does not happen if the
gfx.font_rendering.opentype_svg.enabled preference is set to true.
-->
@ -22,12 +22,4 @@
<text x="0" y="200">
L
</text>
<!-- glyphchar -->
<text x="0" y="400">
M
</text>
<!-- glyphchar with UVS selector -->
<text x="0" y="600">
L&#xfe01;
</text>
</svg>

Before

Width:  |  Height:  |  Size: 723 B

After

Width:  |  Height:  |  Size: 579 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg">
<g>
<rect x="20" y="20" width="160" height="160" stroke-width="10"
fill="lime" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 149 B

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
<![CDATA[
@font-face {
font-family: "Liberation";
src:url(resources/svg.woff);
}
text
{
font-family: Liberation;
font-size: 200px;
}
]]>
</style>
<!--
Test that the right SVG glyph is picked from a document containing various
invalid glyph IDs.
-->
<text x="0" y="200">
M
</text>
</svg>

After

Width:  |  Height:  |  Size: 448 B

View File

@ -1,15 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!-- M -->
<rect x="10" y="10" width="180" height="180" stroke-width="20"
fill="pink" stroke="hotpink" />
<!-- L -->
<rect x="220" y="20" width="160" height="160" stroke-width="10"
<rect x="20" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="red" />
<rect x="220" y="0" width="20" height="20" stroke="none"
<rect x="20" y="0" width="20" height="20" stroke="none"
fill="turquoise" />
<!-- L with UVS -->
<rect x="370" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="green" />
<!-- L -->
<rect x="170" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="red" />
<rect x="170" y="0" width="20" height="20" stroke="none"
fill="turquoise" />
<!-- L -->
<rect x="320" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="red" />
<rect x="320" y="0" width="20" height="20" stroke="none"
fill="turquoise" />
</svg>

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 633 B

View File

@ -14,10 +14,10 @@
]]>
</style>
<!--
Test that we're rendering in the right place in the middle of a
Test that we're rendering in the right place in the middle of a
text run
-->
<text x="0" y="200">
MLL&#xfe01;
LLL
</text>
</svg>

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 452 B

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
@font-face { font-family: foo; src: url("resources/two_cats.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x1f431;</td><td>ネコ</td><td>cat face</td></tr>
<tr><td>&#x1f63b;</td><td>目がハート(ネコ)</td><td>smiling cat face with heart shaped eyes</td></tr>
</table>
</body>
</html>

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
@font-face { font-family: foo; src: url("resources/two_cats.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<!-- the Plane-14 variation selector U+E0100 should change U+1F431 to the "heart shaped eyes" cat face -->
<tr><td>&#x1f431;</td><td>ネコ</td><td>cat face</td></tr>
<tr><td>&#x1f431;&#xe0100;</td><td>目がハート(ネコ)</td><td>smiling cat face with heart shaped eyes</td></tr>
</table>
</body>
</html>

View File

@ -1831,17 +1831,14 @@ nsSVGUtils::PaintSVGGlyph(Element* aElement, gfxContext* aContext,
{
nsIFrame* frame = aElement->GetPrimaryFrame();
nsISVGChildFrame* svgFrame = do_QueryFrame(frame);
MOZ_ASSERT(!frame || svgFrame, "Non SVG frame for SVG glyph");
if (svgFrame) {
nsRenderingContext context;
context.Init(frame->PresContext()->DeviceContext(), aContext);
context.AddUserData(&gfxTextObjectPaint::sUserDataKey, aObjectPaint, nullptr);
nsresult rv = svgFrame->PaintSVG(&context, nullptr);
if (NS_SUCCEEDED(rv)) {
return true;
}
if (!svgFrame) {
return false;
}
return false;
nsRenderingContext context;
context.Init(frame->PresContext()->DeviceContext(), aContext);
context.AddUserData(&gfxTextObjectPaint::sUserDataKey, aObjectPaint, nullptr);
nsresult rv = svgFrame->PaintSVG(&context, nullptr);
return NS_SUCCEEDED(rv);
}
bool
@ -1851,15 +1848,14 @@ nsSVGUtils::GetSVGGlyphExtents(Element* aElement,
{
nsIFrame* frame = aElement->GetPrimaryFrame();
nsISVGChildFrame* svgFrame = do_QueryFrame(frame);
MOZ_ASSERT(!frame || svgFrame, "Non SVG frame for SVG glyph");
if (svgFrame) {
*aResult = svgFrame->GetBBoxContribution(aSVGToAppSpace,
nsSVGUtils::eBBoxIncludeFill | nsSVGUtils::eBBoxIncludeFillGeometry |
nsSVGUtils::eBBoxIncludeStroke | nsSVGUtils::eBBoxIncludeStrokeGeometry |
nsSVGUtils::eBBoxIncludeMarkers);
return true;
if (!svgFrame) {
return false;
}
return false;
*aResult = svgFrame->GetBBoxContribution(aSVGToAppSpace,
nsSVGUtils::eBBoxIncludeFill | nsSVGUtils::eBBoxIncludeFillGeometry |
nsSVGUtils::eBBoxIncludeStroke | nsSVGUtils::eBBoxIncludeStrokeGeometry |
nsSVGUtils::eBBoxIncludeMarkers);
return true;
}
nsRect

View File

@ -3,6 +3,8 @@ head = head_channels.js head_cache.js
tail =
[test_304_responses.js]
# Bug 675039: test hangs on Android-armv6
skip-if = os == "android"
[test_cacheForOfflineUse_no-store.js]
[test_307_redirect.js]
[test_NetUtil.js]
@ -15,7 +17,11 @@ tail =
[test_authpromptwrapper.js]
[test_backgroundfilesaver.js]
[test_bug203271.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug248970_cache.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug248970_cookie.js]
[test_bug261425.js]
[test_bug263127.js]
@ -25,6 +31,8 @@ tail =
[test_bug336501.js]
[test_bug337744.js]
[test_bug365133.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug368702.js]
[test_bug369787.js]
[test_bug371473.js]
@ -43,31 +51,55 @@ tail =
[test_bug455311.js]
[test_bug455598.js]
[test_bug468426.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug468594.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug470716.js]
[test_bug479413.js]
[test_bug479485.js]
[test_bug482601.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug484684.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug490095.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug504014.js]
[test_bug510359.js]
[test_bug515583.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug528292.js]
[test_bug536324_64bit_content_length.js]
[test_bug540566.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug543805.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug553970.js]
[test_bug561042.js]
# Bug 675039: test fails on Android 4.0
skip-if = os == "android"
[test_bug561276.js]
[test_bug580508.js]
[test_bug586908.js]
[test_bug596443.js]
# Bug 675039: intermittent fail on Android
skip-if = os == "android"
[test_bug618835.js]
[test_bug633743.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug650995.js]
[test_bug652761.js]
[test_bug651100.js]
# Bug 675039: intermittent hang on Android-x86
skip-if = os == "android"
[test_bug654926.js]
[test_bug654926_doom_and_read.js]
[test_bug654926_test_seek.js]
@ -76,6 +108,8 @@ tail =
[test_bug667907.js]
[test_bug667818.js]
[test_bug669001.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_bug712914_secinfo_validation.js]
[test_bug770243.js]
[test_bug894586.js]
@ -83,6 +117,8 @@ tail =
skip-if = bits != 32
[test_doomentry.js]
[test_cacheflags.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_cache_jar.js]
[test_channel_close.js]
[test_compareURIs.js]
@ -112,6 +148,8 @@ skip-if = bits != 32
[test_freshconnection.js]
[test_gre_resources.js]
[test_gzipped_206.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_head.js]
[test_header_Accept-Language.js]
[test_headers.js]
@ -140,6 +178,8 @@ skip-if = os == "win"
[test_plaintext_sniff.js]
[test_post.js]
[test_private_necko_channel.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_private_cookie_changed.js]
[test_progress.js]
[test_protocolproxyservice.js]
@ -151,6 +191,8 @@ skip-if = os == "win"
[test_range_requests.js]
[test_readline.js]
[test_redirect-caching_canceled.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_redirect-caching_failure.js]
# Bug 675039: test fails consistently on Android
fail-if = os == "android"
@ -193,6 +235,8 @@ run-sequentially = Hardcoded hash value includes port 4444.
run-sequentially = Hardcoded hash value includes port 4444.
[test_bug826063.js]
[test_bug812167.js]
# Bug 675039: intermittent fail on Android-armv6
skip-if = os == "android"
[test_tldservice_nextsubdomain.js]
[test_about_protocol.js]
[test_bug856978.js]

View File

@ -102,12 +102,14 @@ class BackendMakeFile(object):
if self.xpt_name:
self.fh.write('XPT_NAME := %s\n' % self.xpt_name)
# We just recompile all xpidls because it's easier and less error
# prone.
self.fh.write('NONRECURSIVE_TARGETS += export\n')
self.fh.write('NONRECURSIVE_TARGETS_export += xpidl\n')
self.fh.write('NONRECURSIVE_TARGETS_export_xpidl_DIRECTORY = '
'$(DEPTH)/config/makefiles/xpidl\n')
'$(DEPTH)/config/makefiles/precompile\n')
self.fh.write('NONRECURSIVE_TARGETS_export_xpidl_TARGETS += '
'xpt/%s' % self.xpt_name)
'xpidl\n')
return self.fh.close()
@ -417,8 +419,19 @@ class RecursiveMakeBackend(CommonBackend):
for module in xpt_modules:
deps = sorted(modules[module])
idl_deps = ['$(dist_idl_dir)/%s.idl' % dep for dep in deps]
rules.extend([
'$(idl_xpt_dir)/%s.xpt:' % module,
# It may seem strange to have the .idl files listed as
# prerequisites both here and in the auto-generated .pp files.
# It is necessary to list them here to handle the case where a
# new .idl is added to an xpt. If we add a new .idl and nothing
# else has changed, the new .idl won't be referenced anywhere
# except in the command invocation. Therefore, the .xpt won't
# be rebuilt because the dependencies say it is up to date. By
# listing the .idls here, we ensure the make file has a
# reference to the new .idl. Since the new .idl presumably has
# an mtime newer than the .xpt, it will trigger xpt generation.
'$(idl_xpt_dir)/%s.xpt: %s' % (module, ' '.join(idl_deps)),
'\t@echo "$(notdir $@)"',
'\t$(idlprocess) $(basename $(notdir $@)) %s' % ' '.join(deps),
'',

View File

@ -3,8 +3,14 @@ head = head_psm.js
tail =
[test_certificate_usages.js]
# Bug 676972: test fails consistently on Android
fail-if = os == "android"
[test_signed_apps.js]
# Bug 676972: test fails consistently on Android
fail-if = os == "android"
[test_signed_apps-marketplace.js]
# Bug 676972: test fails consistently on Android
fail-if = os == "android"
[test_datasignatureverifier.js]
# Bug 676972: test hangs consistently on Android
skip-if = os == "android"
@ -17,3 +23,5 @@ skip-if = os == "android"
[test_sts_preloadlist_perwindowpb.js]
[test_sts_preloadlist_selfdestruct.js]
[test_ocsp_stapling.js]
# Bug 676972: test fails consistently on Android
fail-if = os == "android"

View File

@ -22,6 +22,8 @@ fail-if = os == "android"
[test_statement_wrapper_automatically.js]
[test_storage_aggregates.js]
[test_storage_connection.js]
# Bug 676981: test fails consistently on Android
fail-if = os == "android"
[test_storage_fulltextindex.js]
[test_storage_function.js]
[test_storage_progresshandler.js]

View File

@ -2,6 +2,7 @@
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
[include:chrome/test/unit/xpcshell.ini]
[include:intl/locale/tests/unit/xpcshell.ini]
[include:netwerk/cookie/test/unit/xpcshell.ini]
@ -46,3 +47,22 @@
[include:browser/components/privatebrowsing/test/unit/xpcshell.ini]
[include:browser/modules/test/unit/xpcshell.ini]
[include:toolkit/components/telemetry/tests/unit/xpcshell.ini]
[include:netwerk/test/unit/xpcshell.ini]
[include:intl/strres/tests/unit/xpcshell.ini]
[include:intl/unicharutil/tests/unit/xpcshell.ini]
[include:intl/uconv/tests/unit/xpcshell.ini]
[include:uriloader/exthandler/tests/unit/xpcshell.ini]
[include:services/datareporting/tests/xpcshell/xpcshell.ini]
[include:storage/test/unit/xpcshell.ini]
[include:docshell/test/unit/xpcshell.ini]
[include:js/xpconnect/tests/unit/xpcshell.ini]
[include:js/jsd/test/xpcshell.ini]
[include:browser/devtools/shared/test/unit/xpcshell.ini]
[include:browser/components/migration/tests/unit/xpcshell.ini]
[include:browser/components/places/tests/unit/xpcshell.ini]
[include:browser/components/sessionstore/test/unit/xpcshell.ini]
[include:browser/components/shell/test/unit/xpcshell.ini]
[include:browser/components/dirprovider/tests/unit/xpcshell.ini]
[include:browser/components/downloads/test/unit/xpcshell.ini]
[include:browser/components/feeds/test/unit/xpcshell.ini]
[include:security/manager/ssl/tests/unit/xpcshell.ini]

View File

@ -25,3 +25,5 @@ skip-if = os == "android"
skip-if = os == "android"
[test_store.js]
[test_well-known.js]
# Bug 905340 - http port dependency causes failure on Android 4.0
skip-if = os == "android"

View File

@ -57,6 +57,8 @@ class TimeStamp;
#ifndef MOZ_ENABLE_PROFILER_SPS
#include <stdint.h>
struct JSContext;
class JSObject;

View File

@ -8,3 +8,5 @@ tail = tail_handlerService.js
# Bug 676997: test consistently fails on Android
fail-if = os == "android"
[test_punycodeURIs.js]
# Bug 676997: test consistently fails on Android
fail-if = os == "android"

View File

@ -3359,7 +3359,16 @@ NSEvent* gLastDragMouseDownEvent = nil;
new gfxQuartzSurface(aContext, backingSize);
targetSurface->SetAllowUseAsSource(false);
nsRefPtr<gfxContext> targetContext = new gfxContext(targetSurface);
nsRefPtr<gfxContext> targetContext;
if (gfxPlatform::GetPlatform()->SupportsAzureContentForType(mozilla::gfx::BACKEND_CAIRO)) {
RefPtr<mozilla::gfx::DrawTarget> dt =
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(targetSurface,
mozilla::gfx::IntSize(backingSize.width,
backingSize.height));
targetContext = new gfxContext(dt);
} else {
targetContext = new gfxContext(targetSurface);
}
// Set up the clip region.
nsIntRegionRectIterator iter(region);

View File

@ -9,11 +9,11 @@
#include "nsISupports.h"
#include "nsColor.h"
#include "nsRect.h"
#include "nsStringGlue.h"
#include "nsEvent.h"
#include "nsCOMPtr.h"
#include "nsWidgetInitData.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsXULAppAPI.h"
#include "mozilla/layers/LayersTypes.h"

View File

@ -76,8 +76,7 @@ WinUtils::Initialize()
if (!sDwmDll && WinUtils::GetWindowsVersion() >= WinUtils::VISTA_VERSION) {
sDwmDll = ::LoadLibraryW(kDwmLibraryName);
// MSDN: "If the function succeeds, the return value is greater than 31."
if (uintptr_t(sDwmDll) > 31) {
if (sDwmDll) {
dwmExtendFrameIntoClientAreaPtr = (DwmExtendFrameIntoClientAreaProc)::GetProcAddress(sDwmDll, "DwmExtendFrameIntoClientArea");
dwmIsCompositionEnabledPtr = (DwmIsCompositionEnabledProc)::GetProcAddress(sDwmDll, "DwmIsCompositionEnabled");
dwmSetIconicThumbnailPtr = (DwmSetIconicThumbnailProc)::GetProcAddress(sDwmDll, "DwmSetIconicThumbnail");

View File

@ -7,6 +7,8 @@ tail =
[test_bug332389.js]
[test_bug333505.js]
[test_bug364285-1.js]
# Bug 902073: test fails consistently on Android x86
skip-if = os == "android"
[test_bug374754.js]
[test_bug476919.js]
# Bug 676998: test fails consistently on Android