Bug 1370835 - Match new standard for span IDL property; r=mystor

https://github.com/whatwg/html/issues/2705
https://github.com/whatwg/html/pull/2734

MozReview-Commit-ID: 7Sso9sO8f7y

--HG--
extra : rebase_source : be2560dce0619c377d570852f92efb5fad0d86ad
This commit is contained in:
Aryeh Gregor 2017-08-03 21:24:56 +03:00
Родитель 74b035b657
Коммит 7d661d1755
3 изменённых файлов: 2 добавлений и 35 удалений

Просмотреть файл

@ -44,7 +44,7 @@ HTMLTableColElement::ParseAttribute(int32_t aNamespaceID,
}
if (aAttribute == nsGkAtoms::span) {
/* protection from unrealistic large colspan values */
aResult.ParseIntWithFallback(aValue, 1, MAX_COLSPAN);
aResult.ParseClampedNonNegativeInt(aValue, 1, 1, MAX_COLSPAN);
return true;
}
if (aAttribute == nsGkAtoms::width) {

Просмотреть файл

@ -27,8 +27,7 @@ public:
}
void SetSpan(uint32_t aSpan, ErrorResult& aError)
{
uint32_t span = aSpan ? aSpan : 1;
SetUnsignedIntAttr(nsGkAtoms::span, span, 1, aError);
SetUnsignedIntAttr(nsGkAtoms::span, aSpan, 1, aError);
}
void GetAlign(DOMString& aAlign)

Просмотреть файл

@ -1,32 +0,0 @@
[reflection-tabular.html]
type: testharness
[colgroup.span: setAttribute() to 2147483648]
expected: FAIL
[colgroup.span: setAttribute() to 4294967295]
expected: FAIL
[colgroup.span: setAttribute() to 4294967296]
expected: FAIL
[colgroup.span: IDL set to 0]
expected: FAIL
[colgroup.span: IDL set to "-0"]
expected: FAIL
[col.span: setAttribute() to 2147483648]
expected: FAIL
[col.span: setAttribute() to 4294967295]
expected: FAIL
[col.span: setAttribute() to 4294967296]
expected: FAIL
[col.span: IDL set to 0]
expected: FAIL
[col.span: IDL set to "-0"]
expected: FAIL