Skip to content

Commit

Permalink
Merge mozilla-central to mozilla-inbound
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Morley committed Aug 9, 2012
2 parents ba5fa5d + a2ad246 commit 28d769f
Show file tree
Hide file tree
Showing 155 changed files with 444 additions and 439 deletions.
4 changes: 2 additions & 2 deletions caps/src/nsPrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ nsPrincipal::InitFromPersistent(const char* aPrefName,

const char* ordinalBegin = PL_strpbrk(aPrefName, "1234567890");
if (ordinalBegin) {
PRIntn n = atoi(ordinalBegin);
int n = atoi(ordinalBegin);
if (sCapabilitiesOrdinal <= n) {
sCapabilitiesOrdinal = n + 1;
}
Expand Down Expand Up @@ -1122,7 +1122,7 @@ nsPrincipal::Read(nsIObjectInputStream* aStream)

const char* ordinalBegin = PL_strpbrk(mPrefName.get(), "1234567890");
if (ordinalBegin) {
PRIntn n = atoi(ordinalBegin);
int n = atoi(ordinalBegin);
if (sCapabilitiesOrdinal <= n) {
sCapabilitiesOrdinal = n + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion content/base/src/nsContentSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern PRLogModuleInfo* gContentSinkLogModuleInfo;
#define SINK_TRACE_REFLOW 0x2
#define SINK_ALWAYS_REFLOW 0x4

#define SINK_LOG_TEST(_lm, _bit) (PRIntn((_lm)->level) & (_bit))
#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->level) & (_bit))

#define SINK_TRACE(_lm, _bit, _args) \
PR_BEGIN_MACRO \
Expand Down
6 changes: 3 additions & 3 deletions content/base/src/nsNodeInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
}


PRIntn
int
nsNodeInfoManager::NodeInfoInnerKeyCompare(const void *key1, const void *key2)
{
NS_ASSERTION(key1 && key2, "Null key passed to NodeInfoInnerKeyCompare!");
Expand Down Expand Up @@ -183,8 +183,8 @@ nsNodeInfoManager::Init(nsIDocument *aDocument)
}

// static
PRIntn
nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex, void *arg)
int
nsNodeInfoManager::DropNodeInfoDocument(PLHashEntry *he, int hashIndex, void *arg)
{
static_cast<nsINodeInfo*>(he->value)->mDocument = nullptr;
return HT_ENUMERATE_NEXT;
Expand Down
4 changes: 2 additions & 2 deletions content/base/src/nsNodeInfoManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ class nsNodeInfoManager MOZ_FINAL : public nsISupports
void SetDocumentPrincipal(nsIPrincipal *aPrincipal);

private:
static PRIntn NodeInfoInnerKeyCompare(const void *key1, const void *key2);
static int NodeInfoInnerKeyCompare(const void *key1, const void *key2);
static PLHashNumber GetNodeInfoInnerHashValue(const void *key);
static PRIntn DropNodeInfoDocument(PLHashEntry *he, PRIntn hashIndex,
static int DropNodeInfoDocument(PLHashEntry *he, int hashIndex,
void *arg);

PLHashTable *mNodeInfoHash;
Expand Down
7 changes: 7 additions & 0 deletions content/canvas/crashtests/727547.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>
<canvas></canvas>
<script>
var canvas = document.body.firstChild,
gl = canvas.getContext("experimental-webgl");
gl.texImage2D(0, 0, 0, 0, 0, { width: 10, height: 10, data: 7 });
</script>
1 change: 1 addition & 0 deletions content/canvas/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load 360293-1.html
load 421715-1.html
load 553938-1.html
load 647480.html
load 727547.html
load 0px-size-font-667225.html
load texImage2D.html
load 729116.html
Expand Down
4 changes: 2 additions & 2 deletions content/events/src/nsDOMSimpleGestureEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ nsDOMSimpleGestureEvent::GetDirection(PRUint32 *aDirection)

/* readonly attribute float delta; */
NS_IMETHODIMP
nsDOMSimpleGestureEvent::GetDelta(PRFloat64 *aDelta)
nsDOMSimpleGestureEvent::GetDelta(double *aDelta)
{
NS_ENSURE_ARG_POINTER(aDelta);
*aDelta = static_cast<nsSimpleGestureEvent*>(mEvent)->delta;
Expand Down Expand Up @@ -83,7 +83,7 @@ nsDOMSimpleGestureEvent::InitSimpleGestureEvent(const nsAString& aTypeArg,
PRUint16 aButton,
nsIDOMEventTarget* aRelatedTarget,
PRUint32 aDirectionArg,
PRFloat64 aDeltaArg,
double aDeltaArg,
PRUint32 aClickCountArg)
{
nsresult rv = nsDOMMouseEvent::InitMouseEvent(aTypeArg,
Expand Down
1 change: 1 addition & 0 deletions content/html/content/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ MOCHITEST_FILES = \
test_bug745685.html \
test_input_file_picker.html \
test_bug763626.html \
test_bug780993.html \
$(NULL)

MOCHITEST_BROWSER_FILES = \
Expand Down
39 changes: 39 additions & 0 deletions content/html/content/test/test_bug780993.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!doctype html>
<meta charset=utf-8>
<title>Test for bug 780993</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
var select = document.createElement("select");
var option = document.createElement("option");
select.appendChild(option);
assert_equals(select[0], option);
select[0] = null;
assert_equals(option.parentNode, null);
assert_equals(select[0], null);
}, "Should be able to set select[n] to null.");
test(function() {
var select = document.createElement("select");
var option = document.createElement("option");
var option2 = document.createElement("option");
select.appendChild(option);
assert_equals(select[0], option);
select[0] = option2;
assert_equals(option.parentNode, null);
assert_equals(option2.parentNode, select);
assert_equals(select[0], option2);
}, "Should be able to set select[n] to an option element");
test(function() {
var select = document.createElement("select");
var option = document.createElement("option");
select.appendChild(option);
assert_equals(select[0], option);
assert_throws(null, function() {
select[0] = 42;
});
assert_equals(option.parentNode, select);
assert_equals(select[0], option);
}, "Should not be able to set select[n] to a primitive.");
</script>
4 changes: 2 additions & 2 deletions content/media/plugins/nsMediaPluginReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class nsMediaPluginReader : public nsBuiltinDecoderReader
{
nsCString mType;
MPAPI::Decoder *mPlugin;
PRBool mHasAudio;
PRBool mHasVideo;
bool mHasAudio;
bool mHasVideo;
nsIntRect mPicture;
nsIntSize mInitialFrame;
int64_t mVideoSeekTimeUs;
Expand Down
2 changes: 1 addition & 1 deletion content/xslt/src/base/txDouble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void txDouble::toString(double aValue, nsAString& aDest)
const int buflen = 20;
char buf[buflen];

PRIntn intDigits, sign;
int intDigits, sign;
char* endp;
PR_dtoa(aValue, 0, 0, &intDigits, &sign, &endp, buf, buflen - 1);

Expand Down
2 changes: 1 addition & 1 deletion content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ txXPathNodeUtils::getBaseURI(const txXPathNode& aNode, nsAString& aURI)
}

/* static */
PRIntn
int
txXPathNodeUtils::comparePosition(const txXPathNode& aNode,
const txXPathNode& aOtherNode)
{
Expand Down
4 changes: 2 additions & 2 deletions content/xslt/src/xpath/txNodeSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ txNodeSet::findPosition(const txXPathNode& aNode, txXPathNode* aFirst,
// If we search 2 nodes or less there is no point in further divides
txXPathNode* pos = aFirst;
for (; pos < aLast; ++pos) {
PRIntn cmp = txXPathNodeUtils::comparePosition(aNode, *pos);
int cmp = txXPathNodeUtils::comparePosition(aNode, *pos);
if (cmp < 0) {
return pos;
}
Expand All @@ -583,7 +583,7 @@ txNodeSet::findPosition(const txXPathNode& aNode, txXPathNode* aFirst,

// (cannot add two pointers)
txXPathNode* midpos = aFirst + (aLast - aFirst) / 2;
PRIntn cmp = txXPathNodeUtils::comparePosition(aNode, *midpos);
int cmp = txXPathNodeUtils::comparePosition(aNode, *midpos);
if (cmp == 0) {
aDupe = true;

Expand Down
4 changes: 2 additions & 2 deletions content/xslt/src/xpath/txXPathTreeWalker.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class txXPathNodeUtils
const txXPathNode& aBase, nsAString& aResult);
static void release(txXPathNode* aNode);
static void getBaseURI(const txXPathNode& aNode, nsAString& aURI);
static PRIntn comparePosition(const txXPathNode& aNode,
const txXPathNode& aOtherNode);
static int comparePosition(const txXPathNode& aNode,
const txXPathNode& aOtherNode);
static bool localNameEquals(const txXPathNode& aNode,
nsIAtom* aLocalName);
static bool isRoot(const txXPathNode& aNode);
Expand Down
2 changes: 1 addition & 1 deletion content/xslt/src/xslt/txFormatNumberFunctionCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
char* buf = new char[bufsize];
NS_ENSURE_TRUE(buf, NS_ERROR_OUT_OF_MEMORY);

PRIntn bufIntDigits, sign;
int bufIntDigits, sign;
char* endp;
PR_dtoa(value, 0, 0, &bufIntDigits, &sign, &endp, buf, bufsize-1);

Expand Down
2 changes: 1 addition & 1 deletion content/xul/templates/src/nsRuleNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Instantiation::Hash(const void* aKey)
}


PRIntn
int
Instantiation::Compare(const void* aLeft, const void* aRight)
{
const Instantiation* left = static_cast<const Instantiation*>(aLeft);
Expand Down
2 changes: 1 addition & 1 deletion content/xul/templates/src/nsRuleNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class Instantiation
return !Equals(aInstantiation); }

static PLHashNumber Hash(const void* aKey);
static PRIntn Compare(const void* aLeft, const void* aRight);
static int Compare(const void* aLeft, const void* aRight);
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ nsXULTemplateQueryProcessorStorage::CompileQuery(nsIXULTemplateBuilder* aBuilder
rv = NS_ERROR_ILLEGAL_VALUE;
PRInt32 valInt32 = 0;
PRInt64 valInt64 = 0;
PRFloat64 valFloat = 0;
double valFloat = 0;

switch (typeValue) {
case 0:
Expand Down
Loading

0 comments on commit 28d769f

Please sign in to comment.