Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / table / rowindex.html
blob30bf57f7d7c0afe22e3963bfddc84c03df71ead6
1 <head>
3 <style>
5 body, table { font-family: "Lucida Grande"; font-size: 10px }
7 </style>
9 <script>
11 function labelRows()
13 rows = document.getElementsByTagName("tr");
14 for (i = 0; i < rows.length; ++i)
15 rows[i].innerHTML += "<td>" + rows[i].id + "</td><td>rowIndex = " + rows[i].rowIndex + "</td>"
18 </script>
20 </head>
22 <body onload="labelRows()">
24 <p>This tests rowIndex, in particular in cases where the table sections are in different orders.</p>
26 <p>A: This table has the header and footer before the body ("normal" order).</p>
28 <table border=1>
29 <thead><tr id="table A, header"></tr></thead>
30 <tfoot><tr id="table A, footer"></tr></tfoot>
31 <tbody><tr id="table A, body"></tr></tbody>
32 </table>
34 <p>B: This table has the footer before the body and both before the header.</p>
36 <table border=1>
37 <tfoot><tr id="table B, footer"></tr></tfoot>
38 <tbody><tr id="table B, body"></tr></tbody>
39 <thead><tr id="table B, header"></tr></thead>
40 </table>
42 <p>C: This table has two footers before two bodies before two heads. The rows inside the extra footers and heads don't get row indices at all.</p>
44 <table border=1>
45 <tfoot><tr id="table C, footer A row A"></tr><tr id="table C, footer A row B"></tr></tfoot>
46 <tfoot><tr id="table C, footer B row A"></tr><tr id="table C, footer B row B"></tr></tfoot>
47 <tbody><tr id="table C, body A row A"></tr><tr id="table C, body A row B"></tr></tfoot>
48 <tbody><tr id="table C, body B row A"></tr><tr id="table C, body B row B"></tr></tfoot>
49 <thead><tr id="table C, header A row A"></tr><tr id="table C, header A row B"></tr></tfoot>
50 <thead><tr id="table C, header B row A"></tr><tr id="table C, header B row B"></tr></tfoot>
51 </table>
53 </body>