Commit 8e043c4c authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

COLGROUP / COL: Setting |span| IDL value should reflect to |span| attribute as is.

We don't need a special handling for 0 value.

https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#clamped-to-the-range
> On setting, it behaves the same as setting a regular reflected unsigned integer.

Bug: 745376
Change-Id: I6dead5b474324cd19e811c950971e5804532508a
Reviewed-on: https://chromium-review.googlesource.com/575738Reviewed-by: default avatarTakayoshi Kochi <kochi@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487445}
parent 4418a7af
......@@ -32,10 +32,7 @@ PASS colgroup.accessKey: 32 tests
PASS colgroup.tabIndex: 24 tests
PASS colgroup.span: 11 tests
FAIL colgroup.span: setAttribute() to 4294967296 assert_equals: IDL get expected 1000 but got 1
PASS colgroup.span: 44 tests
FAIL colgroup.span: IDL set to 0 assert_equals: getAttribute() expected "0" but got "1"
PASS colgroup.span: 3 tests
FAIL colgroup.span: IDL set to "-0" assert_equals: getAttribute() expected "0" but got "1"
PASS colgroup.span: 49 tests
FAIL colgroup.span: IDL set to 2147483648 assert_equals: getAttribute() expected "1" but got "0"
FAIL colgroup.span: IDL set to 4294967295 assert_equals: getAttribute() expected "1" but got "0"
PASS colgroup.span: 2 tests
......@@ -53,10 +50,7 @@ PASS col.accessKey: 32 tests
PASS col.tabIndex: 24 tests
PASS col.span: 11 tests
FAIL col.span: setAttribute() to 4294967296 assert_equals: IDL get expected 1000 but got 1
PASS col.span: 44 tests
FAIL col.span: IDL set to 0 assert_equals: getAttribute() expected "0" but got "1"
PASS col.span: 3 tests
FAIL col.span: IDL set to "-0" assert_equals: getAttribute() expected "0" but got "1"
PASS col.span: 49 tests
FAIL col.span: IDL set to 2147483648 assert_equals: getAttribute() expected "1" but got "0"
FAIL col.span: IDL set to 4294967295 assert_equals: getAttribute() expected "1" but got "0"
PASS col.span: 2 tests
......
......@@ -100,7 +100,7 @@ HTMLTableColElement::AdditionalPresentationAttributeStyle() {
}
void HTMLTableColElement::setSpan(unsigned n) {
SetUnsignedIntegralAttribute(spanAttr, n ? n : 1);
SetUnsignedIntegralAttribute(spanAttr, n);
}
const AtomicString& HTMLTableColElement::Width() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment