Bug 8133 - HTMLCollection of RefTable.rows[] sequential order should be according to the display (logical) order, not document order
Summary: HTMLCollection of RefTable.rows[] sequential order should be according to the...
Status: VERIFIED DUPLICATE of bug 4571
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 416.x
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.gtalbot.org/BrowserBugsSec...
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-01 19:34 PST by Gérard Talbot
Modified: 2008-03-21 09:07 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot 2006-04-01 19:34:11 PST
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.
Comment 1 Maciej Stachowiak 2007-09-29 19:18:55 PDT
Duplicate of 4571.

*** This bug has been marked as a duplicate of 4571 ***