Bug 1269415 - Allow negative <pre width> values; r=jst

This aligns with the spec and all other UAs, although it's less logical.
This commit is contained in:
Aryeh Gregor 2016-05-05 20:20:42 +03:00
parent 2896a22e79
commit 86ae6362c9
2 changed files with 1 additions and 16 deletions

View File

@ -37,7 +37,7 @@ HTMLPreElement::ParseAttribute(int32_t aNamespaceID,
{
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::width) {
return aResult.ParseIntWithBounds(aValue, 0);
return aResult.ParseIntValue(aValue);
}
}

View File

@ -36,24 +36,9 @@
[pre.tabIndex: IDL set to -2147483648 followed by IDL get]
expected: FAIL
[pre.width: setAttribute() to -36 followed by IDL get]
expected: FAIL
[pre.width: setAttribute() to -1 followed by IDL get]
expected: FAIL
[pre.width: setAttribute() to -2147483648 followed by IDL get]
expected: FAIL
[pre.width: setAttribute() to "-1" followed by IDL get]
expected: FAIL
[pre.width: IDL set to -36 followed by IDL get]
expected: FAIL
[pre.width: IDL set to -1 followed by IDL get]
expected: FAIL
[pre.width: IDL set to -2147483648 followed by IDL get]
expected: FAIL