Hi all, I'm having an issue with [DOMHTMLTableRowElement rowIndex] returning -1 when I call it on a row. The DOM specification does not say anything about rowIndex returning negative indices. I thought that perhaps it was returning -1 for the last row in a table, but it looks like it's also returning -1 for the second row in a table with four rows.
I've checked that the element I'm calling rowIndex on is actually a DOMHTMLTableRowElement. Its parent is a DOMHTMLTableElement with no header and no footer, and checking the length of the DOMHTMLTableElement's rows property gives 4. If I check the 2nd element (index 1) of the DOMHTMLTableElement, it returns the DOMHTMLTableRowElement that I'm looking at. More concretely, from the debugger: (row is a DOMHTMLTableRowElement, tableRoot is a DOMHTMLTableElement) (gdb) p (long)[row rowIndex] $4 = -1 (gdb) p (int)[[tableRoot rows] length] $5 = 4 (gdb) po [row parentNode] <DOMHTMLTableElement [TABLE]: 0x14d00ae0 ''> (gdb) po tableRoot <DOMHTMLTableElement [TABLE]: 0x14d00ae0 ''> (gdb) po row <DOMHTMLTableRowElement [TR]: 0x14cfb480 ''> (gdb) po [[tableRoot rows] item:1] <DOMHTMLTableRowElement [TR]: 0x14cfb480 ''> Can anyone tell me why rowIndex is returning -1? Thanks! -Jing
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-dev