diff --git a/dom/html/HTMLTableColElement.cpp b/dom/html/HTMLTableColElement.cpp index 823aa43510b0..ee5101419895 100644 --- a/dom/html/HTMLTableColElement.cpp +++ b/dom/html/HTMLTableColElement.cpp @@ -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) { diff --git a/dom/html/HTMLTableColElement.h b/dom/html/HTMLTableColElement.h index 4c85981cc311..5b430b18b8e8 100644 --- a/dom/html/HTMLTableColElement.h +++ b/dom/html/HTMLTableColElement.h @@ -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) diff --git a/testing/web-platform/meta/html/dom/reflection-tabular.html.ini b/testing/web-platform/meta/html/dom/reflection-tabular.html.ini deleted file mode 100644 index 0a2e1c5c4c5e..000000000000 --- a/testing/web-platform/meta/html/dom/reflection-tabular.html.ini +++ /dev/null @@ -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 -