Closed Bug 9213 Opened 25 years ago Closed 25 years ago

DOM can't see the value contained in tHead of a Table

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jcarpenter0524, Assigned: vidur)

References

Details

(Whiteboard: [TESTCASE] patch added)

Attachments

(2 files)

Build: 1999-07-01-08-M8 All platforms - In the spec for HTMLTableElement under tHead it says: "Returns the table's THEAD, or null if none exists." - Using the following code, I get "null" - I am uncertain whether I should be getting the actual value in tHead, or if I should be getting "[object HTMLTableSectionElement]", but I know I should not be getting "null" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>test</TITLE></HEAD> <BODY> <TABLE border=1> <THEAD>tHead text</THEAD> <TR><TD>The spec says: </TD> <TD>Returns the table's THEAD, or null if none exists.</TD></TR> <TR><TD>stuff</TD> <TD>More stuff</TD></TR> </TABLE> <SCRIPT TYPE="text/javascript"> document.write(oList=document.firstChild.childNodes[1].childNodes[2].tHead); </SCRIPT> </BODY></HTML>
QA Contact: gerardok → janc
same goes for tFoot
Oops, the previous code had an error, this is the correct HTML code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>test</TITLE></HEAD> <BODY> <TABLE border=1> <THEAD><TR>tHead text</TR></THEAD> <TR><TD>The spec says: </TD> <TD>Returns the table's THEAD, or null if none exists.</TD></TR> <TR><TD>stuff</TD> <TD>More stuff</TD></TR> </TABLE> <SCRIPT TYPE="text/javascript"> document.write(document.firstChild.childNodes[1].childNodes[2].tHead); </SCRIPT> </BODY></HTML>
Attached file Demonstration of error (deleted) —
Whiteboard: [TESTCASE] tHead (and tFoot) properties not implemented
Directly accessing a thead works - document.getElementsByTagName( "thead" )[0]; Using the tHead property doesn't - tablenode.tHead; Tested on Win98 19990816 nightly build
Do we need this for beta? Tentatively saying ``yes''.
Target Milestone: M11 → M12
Moving to M12.
This is the problem: nsHTMLTableElement::GetTHead iterates over all children of the table and compares the tagnames until it finds a <thead> tag. The problem is that the tagnames are retrieved using GetTagName and compared to the thead tag in nsHTMLAtoms. The former returns elements in upper case and the latter contains elements in lower case. Inserting theadAsString.ToUpperCase() after nsHTMLAtoms::thead->ToString(theadAsString); fixes the problem but it should maybe be fixed elsewhere? (There is a new implementation in the method commented out there because GetElementsByTagName wasn't implemented, maybe this can be uncommented now?)
Blocks: 19509
Moving off M12 radar for the time being. One or more might get back once I get a chance to really look at them.
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Whiteboard: [TESTCASE] tHead (and tFoot) properties not implemented → [TESTCASE] tHead (and tFoot) properties not implemented [WIP]
working on it...
Attached patch patch that fixes this problem (deleted) — Splinter Review
Whiteboard: [TESTCASE] tHead (and tFoot) properties not implemented [WIP] → [TESTCASE] patch added
I added a patch that fixes this bug for thead and tfoot. added some extra error checking while I was at it. only took a few minutes, since GetElementsByTagName has been implemented. awaiting your review, v.
*** Bug 22678 has been marked as a duplicate of this bug. ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed on 1/18/2000.
*** Bug 39214 has been marked as a duplicate of this bug. ***
Component: DOM Level 1 → DOM HTML
QA Contact: janc → desale
QA contact Update
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
verified on build 2001-06-21-11-0.9.1 (windows 2000)...marking as verified
Status: RESOLVED → VERIFIED
verified on linux
verified on linux
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: