Bug 266406: nsAttrValue has too big default boundries when parsing integers.
r+sr=jst git-svn-id: svn://10.0.0.236/trunk@168231 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
a2ed40f18e
commit
9b2f861866
@ -59,7 +59,7 @@ class nsISVGValue;
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_BITS 5
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_MASK (PtrBits((1 << NS_ATTRVALUE_INTEGERTYPE_BITS) - 1))
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_MULTIPLIER (1 << NS_ATTRVALUE_INTEGERTYPE_BITS)
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_MAXVALUE ((1 << (32 - NS_ATTRVALUE_INTEGERTYPE_BITS)) - 1)
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_MAXVALUE ((1 << (31 - NS_ATTRVALUE_INTEGERTYPE_BITS)) - 1)
|
||||
#define NS_ATTRVALUE_INTEGERTYPE_MINVALUE (-NS_ATTRVALUE_INTEGERTYPE_MAXVALUE - 1)
|
||||
|
||||
class nsAttrValue {
|
||||
|
||||
@ -2649,27 +2649,29 @@ nsGenericElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify)
|
||||
* aChild is one of aNode's ancestors. -- jst@citec.fi
|
||||
*/
|
||||
|
||||
static PRBool
|
||||
isSelfOrAncestor(nsIContent *aNode, nsIContent *aChild)
|
||||
/* static */
|
||||
PRBool
|
||||
nsGenericElement::isSelfOrAncestor(nsIContent *aNode,
|
||||
nsIContent *aPossibleAncestor)
|
||||
{
|
||||
NS_PRECONDITION(aNode, "Must have a node");
|
||||
|
||||
if (aNode == aChild)
|
||||
if (aNode == aPossibleAncestor)
|
||||
return PR_TRUE;
|
||||
|
||||
/*
|
||||
* If aChild doesn't have children it can't be our ancestor
|
||||
*/
|
||||
if (aChild->GetChildCount() == 0) {
|
||||
if (aPossibleAncestor->GetChildCount() == 0) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
for (nsIContent* ancestor = aNode->GetParent();
|
||||
ancestor;
|
||||
ancestor = ancestor->GetParent()) {
|
||||
if (ancestor == aChild) {
|
||||
if (ancestor == aPossibleAncestor) {
|
||||
/*
|
||||
* We found aChild as one of our ancestors
|
||||
* We found aPossibleAncestor as one of our ancestors
|
||||
*/
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
@ -619,6 +619,13 @@ public:
|
||||
|
||||
static PRBool ShouldFocus(nsIContent *aContent);
|
||||
|
||||
/**
|
||||
* Checks if a node is the ancestor of another.
|
||||
*/
|
||||
static PRBool isSelfOrAncestor(nsIContent *aNode,
|
||||
nsIContent *aPossibleAncestor);
|
||||
|
||||
|
||||
static nsresult InitHashes();
|
||||
|
||||
static PLDHashTable sEventListenerManagersHash;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user