HTMLTableSectionElement improvements

'thead' and 'tfoot' now create instances of HTMLTableSectionElement

HTMLTableSectionElement.rows has been implemented
This commit is contained in:
Corey Farwell 2015-09-26 14:57:25 -04:00
parent e40dd3843f
commit adbcb5345c
10 changed files with 109 additions and 43 deletions

View file

@ -17743,6 +17743,18 @@
"path": "html/semantics/tabular-data/the-tbody-element/insertRow.html",
"url": "/html/semantics/tabular-data/the-tbody-element/insertRow.html"
},
{
"path": "html/semantics/tabular-data/the-tbody-element/rows.html",
"url": "/html/semantics/tabular-data/the-tbody-element/rows.html"
},
{
"path": "html/semantics/tabular-data/the-tfoot-element/rows.html",
"url": "/html/semantics/tabular-data/the-tfoot-element/rows.html"
},
{
"path": "html/semantics/tabular-data/the-thead-element/rows.html",
"url": "/html/semantics/tabular-data/the-thead-element/rows.html"
},
{
"path": "html/semantics/tabular-data/the-tr-element/cells.html",
"url": "/html/semantics/tabular-data/the-tr-element/cells.html"
@ -34616,4 +34628,4 @@
"rev": "0159b3ec9ba5355a3340621226e02ae026effd7f",
"url_base": "/",
"version": 2
}
}

View file

@ -4668,9 +4668,6 @@
[HTMLTableSectionElement interface: existence and properties of interface object]
expected: FAIL
[HTMLTableSectionElement interface: attribute rows]
expected: FAIL
[HTMLTableSectionElement interface: operation insertRow(long)]
expected: FAIL
@ -4689,9 +4686,6 @@
[HTMLTableSectionElement interface: attribute vAlign]
expected: FAIL
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "rows" with the proper type (0)]
expected: FAIL
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "insertRow" with the proper type (1)]
expected: FAIL
@ -4716,15 +4710,6 @@
[HTMLTableSectionElement interface: document.createElement("tbody") must inherit property "vAlign" with the proper type (6)]
expected: FAIL
[HTMLTableSectionElement must be primary interface of document.createElement("thead")]
expected: FAIL
[Stringification of document.createElement("thead")]
expected: FAIL
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "rows" with the proper type (0)]
expected: FAIL
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "insertRow" with the proper type (1)]
expected: FAIL
@ -4749,15 +4734,6 @@
[HTMLTableSectionElement interface: document.createElement("thead") must inherit property "vAlign" with the proper type (6)]
expected: FAIL
[HTMLTableSectionElement must be primary interface of document.createElement("tfoot")]
expected: FAIL
[Stringification of document.createElement("tfoot")]
expected: FAIL
[HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "rows" with the proper type (0)]
expected: FAIL
[HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "insertRow" with the proper type (1)]
expected: FAIL

View file

@ -18,12 +18,6 @@
[Interfaces for plaintext]
expected: FAIL
[Interfaces for tfoot]
expected: FAIL
[Interfaces for thead]
expected: FAIL
[Interfaces for xmp]
expected: FAIL
@ -51,12 +45,6 @@
[Interfaces for PLAINTEXT]
expected: FAIL
[Interfaces for TFOOT]
expected: FAIL
[Interfaces for THEAD]
expected: FAIL
[Interfaces for XMP]
expected: FAIL

View file

@ -0,0 +1,22 @@
// https://html.spec.whatwg.org/multipage/#dom-tbody-rows
function testRowsAttribute(localName) {
var elem = document.createElement(localName);
assert_equals(elem.rows.length, 0);
// Child <p> should *not* count as a row
elem.appendChild(document.createElement("p"));
assert_equals(elem.rows.length, 0);
// Child <tr> should count as a row
var childTr = document.createElement("tr");
elem.appendChild(childTr);
assert_equals(elem.rows.length, 1);
// Nested table with child <tr> should *not* count as a row
var nested = document.createElement(localName);
nested.appendChild(document.createElement("tr"));
var nestedTable = document.createElement("table");
nestedTable.appendChild(nested);
childTr.appendChild(nestedTable);
assert_equals(elem.rows.length, 1);
}

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>'tbody' element, 'rows' attribute</title>
<link rel="author" title="Corey Farwell" href="mailto:coreyf@rwell.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/semantics/tabular-data/html-table-section-element.js"></script>
<div id ="log"></div>
<script>
test(function () {
testRowsAttribute('tbody');
});
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>'tfoot' element, 'rows' attribute</title>
<link rel="author" title="Corey Farwell" href="mailto:coreyf@rwell.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/semantics/tabular-data/html-table-section-element.js"></script>
<div id ="log"></div>
<script>
test(function () {
testRowsAttribute('tfoot');
});
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>'thead' element, 'rows' attribute</title>
<link rel="author" title="Corey Farwell" href="mailto:coreyf@rwell.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/semantics/tabular-data/html-table-section-element.js"></script>
<div id ="log"></div>
<script>
test(function () {
testRowsAttribute('thead');
});
</script>