Bug 1142478. Fix integer attribute parsing to not lose track of leading zeroes. r=sicking

This commit is contained in:
Boris Zbarsky
2015-03-12 21:46:57 -04:00
parent 9b0b4fd84e
commit 94d5a86690
5 changed files with 92 additions and 10 deletions

View File

@@ -390,7 +390,7 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
// quirks mode does not honor the special html 4 value of 0
if (val > MAX_COLSPAN || val < 0 ||
(0 == val && InNavQuirksMode(OwnerDoc()))) {
aResult.SetTo(1);
aResult.SetTo(1, &aValue);
}
}
return res;
@@ -401,7 +401,7 @@ HTMLTableCellElement::ParseAttribute(int32_t aNamespaceID,
int32_t val = aResult.GetIntegerValue();
// quirks mode does not honor the special html 4 value of 0
if (val < 0 || (0 == val && InNavQuirksMode(OwnerDoc()))) {
aResult.SetTo(1);
aResult.SetTo(1, &aValue);
}
}
return res;