Commit e0c0b3ff authored by Rob Buis's avatar Rob Buis Committed by Commit Bot

Make headers td.headers accept null as string

Nothing in the spec [1] mentions having to convert JS null to a
null/empty string internally and the wpt test indicates we should
just do the default, i.e. stringify to "null", so remove the
TreatNullAs extended attribute.

Behavior matches Firefox and Edge.

[1] https://html.spec.whatwg.org/#dom-tdth-headers

Bug: 651762

Change-Id: I400d86bfa19702cef4607c2ae0d21a2becf7ee0a
Reviewed-on: https://chromium-review.googlesource.com/776237Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Commit-Queue: Rob Buis <rob.buis@samsung.com>
Cr-Commit-Position: refs/heads/master@{#517852}
parent 8de2c837
This is a testharness.js-based test. This is a testharness.js-based test.
Found 4894 tests; 4882 PASS, 12 FAIL, 0 TIMEOUT, 0 NOTRUN. Found 4894 tests; 4884 PASS, 10 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS table.title: 32 tests PASS table.title: 32 tests
PASS table.lang: 32 tests PASS table.lang: 32 tests
PASS table.dir: 62 tests PASS table.dir: 62 tests
...@@ -113,9 +113,7 @@ NOTRUN test ...@@ -113,9 +113,7 @@ NOTRUN test
PASS td.rowSpan: 3 tests PASS td.rowSpan: 3 tests
NOTRUN test NOTRUN test
PASS td.rowSpan: 4 tests PASS td.rowSpan: 4 tests
PASS td.headers: 29 tests PASS td.headers: 32 tests
NOTRUN test
PASS td.headers: 2 tests
PASS td.scope: 72 tests PASS td.scope: 72 tests
PASS td.abbr: 32 tests PASS td.abbr: 32 tests
PASS td.align: 32 tests PASS td.align: 32 tests
...@@ -145,9 +143,7 @@ NOTRUN test ...@@ -145,9 +143,7 @@ NOTRUN test
PASS th.rowSpan: 3 tests PASS th.rowSpan: 3 tests
NOTRUN test NOTRUN test
PASS th.rowSpan: 4 tests PASS th.rowSpan: 4 tests
PASS th.headers: 29 tests PASS th.headers: 32 tests
NOTRUN test
PASS th.headers: 2 tests
PASS th.scope: 72 tests PASS th.scope: 72 tests
PASS th.abbr: 32 tests PASS th.abbr: 32 tests
PASS th.align: 32 tests PASS th.align: 32 tests
......
...@@ -241,7 +241,7 @@ TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.ax ...@@ -241,7 +241,7 @@ TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.ax
TEST SUCCEEDED: The value was the empty string. [tested HTMLTableCellElement.bgColor] TEST SUCCEEDED: The value was the empty string. [tested HTMLTableCellElement.bgColor]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.ch] TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.ch]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.chOff] TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.chOff]
TEST SUCCEEDED: The value was the empty string. [tested HTMLTableCellElement.headers] TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.headers]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.height] TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.height]
TEST SUCCEEDED: The value was the empty string. [tested HTMLTableCellElement.scope] TEST SUCCEEDED: The value was the empty string. [tested HTMLTableCellElement.scope]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.vAlign] TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.vAlign]
......
...@@ -565,7 +565,7 @@ ...@@ -565,7 +565,7 @@
{name: 'bgColor', expectedNull: ''}, {name: 'bgColor', expectedNull: ''},
{name: 'ch', expectedNull: 'null'}, {name: 'ch', expectedNull: 'null'},
{name: 'chOff', expectedNull: 'null'}, {name: 'chOff', expectedNull: 'null'},
{name: 'headers', expectedNull: ''}, {name: 'headers', expectedNull: 'null'},
{name: 'height', expectedNull: 'null'}, {name: 'height', expectedNull: 'null'},
{name: 'scope', expectedNull: ''}, {name: 'scope', expectedNull: ''},
{name: 'vAlign', expectedNull: 'null'}, {name: 'vAlign', expectedNull: 'null'},
......
...@@ -25,7 +25,7 @@ interface HTMLTableCellElement : HTMLElement { ...@@ -25,7 +25,7 @@ interface HTMLTableCellElement : HTMLElement {
[CEReactions] attribute unsigned long rowSpan; [CEReactions] attribute unsigned long rowSpan;
// TODO(foolip): headers should be a [PutForwards=value] readonly attribute // TODO(foolip): headers should be a [PutForwards=value] readonly attribute
// DOMTokenList. // DOMTokenList.
[CEReactions, Reflect, TreatNullAs=NullString] attribute DOMString headers; [CEReactions, Reflect] attribute DOMString headers;
readonly attribute long cellIndex; readonly attribute long cellIndex;
// obsolete members // obsolete members
......
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