Bug 8133
Summary: | HTMLCollection of RefTable.rows[] sequential order should be according to the display (logical) order, not document order | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gérard Talbot (no longer involved) <browserbugs2> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | VERIFIED DUPLICATE | ||
Severity: | Normal | CC: | ian |
Priority: | P2 | ||
Version: | 416.x | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://www.gtalbot.org/BrowserBugsSection/Opera9Bugs/Opera7BugDOM2RowsSequentialOrder.html |
Gérard Talbot (no longer involved)
In a HTML document,
1. <thead>
2. <tfoot>
3. <tbody>
is the document order (or coding order) of the table.
But the logical (display order) of the rows of a table is
1. <thead>
2. <tbody>
3. <tfoot>
The problem that occurs is when one creates an HTML collection of the rows of a table. Which order should be used when creating the collection of rows? A discussion in W3C mailing list and a subsequent modification/clarification in DOM 2 HTML has settled/took care of this question:
{
rowIndex of type long, readonly, modified in DOM Level 2
This is in logical order and not in document order. The rowIndex does take into account sections (THEAD, TFOOT, or TBODY) within the table, placing THEAD rows first in the index, followed by TBODY rows, followed by TFOOT rows.
}
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-67347567
Safari 2.02 (416.13) chooses the document order...which is the wrong order.
Steps to reproduce:
1- Load the provided URL
2- Click the button labelled
document.getElementById("idTable").rows[3].cells[2].childNodes[0].nodeValue
Actual results in Safari 2.02 (416.13):
The alert says "Your browser FAILED this test"
Expected results:
The alert should say "Your browser PASSED this test"
I searched for a duplicate and couldn't find one. The component could be Tables but I think it's HTML DOM.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Maciej Stachowiak
Duplicate of 4571.
*** This bug has been marked as a duplicate of 4571 ***