Closed Bug 75667 Opened 24 years ago Closed 24 years ago

HTMLTableRowElement.ch does not return anything.

Categories

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

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: desale, Assigned: jst)

References

()

Details

(Whiteboard: [HAVE FIX])

Attachments

(4 files)

BUILDS: 2001-04-10-04 [Win95] 2001-04-10-04 [Mac] 2001-04-10-14 {Linux] STEPS TO REPRODUCE: 1] Please visit URL above. 2] Click button "Show me HTMLTableRowElement.ch" EXPECTED RESULTS: alert should show 2 messages like following document.getElementsByTagName('TR')[1].attributes[1].nodeValue = '.' document.getElementsByTagName('TR')[1].ch = '.' ACTUAL RESULTS: alert shows 2 messages like following document.getElementsByTagName('TR')[1].attributes[1].nodeValue = '.' document.getElementsByTagName('TR')[1].ch = '' So "ch" value is missing when we try to access "HTMLTableRowElement.ch" pasting code used for testcaseat above URL. HTML CODE START <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <TABLE border="1"> <THEAD> <TR><TH>The decimal points should line up </THEAD> <TBODY> <TR align="char" char="."><TD>$1</TD> <TR><TD>$10.50</TD> <TR><TD>$1,000.30</TD> </TBODY> </TABLE> <br><br> <script> <!-- function showch(){ var t=document.getElementsByTagName('TR')[1].attributes[1].nodeValue; var z=document.getElementsByTagName('TR')[1].ch; alert("document.getElementsByTagName('TR')[1].attributes[1].nodeValue = '" + t +"'"); alert("document.getElementsByTagName('TR')[1].ch ='" + z + "'"); } //--> </script> <FORM NAME="secondform"> EXPECTED RESULTS: alert should show 2 messages like following<br> document.getElementsByTagName('TR')[1].attributes[1].nodeValue = '.'<br> document.getElementsByTagName('TR')[1].ch = '.'<br><br> ACTUAL RESULTS: alert shows 2 messages like following<br> document.getElementsByTagName('TR')[1].attributes[1].nodeValue = '.'<br> document.getElementsByTagName('TR')[1].ch = ''<br> So "ch" value is missing when we try to access "HTMLTableRowElement.ch"<br><br> <INPUT TYPE="button" NAME="but1" VALUE="Show me HTMLTableRowElement.ch" onclick="showch();"> </FORM> </BODY> </HTML> HTML CODE END
Future.
Target Milestone: --- → Future
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
Likewise for all getAttribute methods on the HTMLTableRowElement. They all return nothing. However, directly addressing the attribute such as HTMLTableRowElement.sectionRowIndex returns the correct value. For example: var tr = document.getElementById("tr2"); tr.getAttribute("sectionRowIndex") returns nothing but calling tr.sectionRowIndex returns the correct value. Both methods above work correctly in IE (5.5 and 6.0). I've attached a test case that demonstrates this.
That would be another bug, please file it separately, thanks :-)
I think this happens because .ch returns the value of the "ch" attribute which doesn't exist. Easy enough to fix if we change NS_IMPL_STRING_ATTRIBUTE to a usual getter/setter that points to the char attribute (is that how .ch is supposed to work? always get the value of the char attribute?)
Fabian, yes, repalcing the last argument to NS_IMPL_STRING_ATTR with an atom name whose value is "char" would fix this.
Adding keyword fun. I allowed myself to change your target milestone; if you don't want this bug on your radar (which was kinda my point ;-) I can assign the bug to myself.
Keywords: patch, review
Whiteboard: [HAVE FIX]
Target Milestone: Future → mozilla0.9.6
Comment on attachment 52901 [details] [diff] [review] Change ch->_char for the nsHTMLAtom in all places where we did this mistake please do this on nsHTMLTableColGroupElement too, r=sicking
Attachment #52901 - Flags: review+
sicking, jst, could you review please? Thanks in advance
Comment on attachment 53427 [details] [diff] [review] include changes to nsHTMLTableColGroupElement sr=jst
Attachment #53427 - Flags: superreview+
Comment on attachment 53427 [details] [diff] [review] include changes to nsHTMLTableColGroupElement r=sicking
Attachment #53427 - Flags: review+
Attached file testcase attached
Looks like Jonas checked this one in. Marking FIXED.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 85824 has been marked as a duplicate of this bug. ***
reopening bug. load the testcase id 53583 fails on win2k 2001-10-17-18
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oww that hurts, how is this possible? I swear it worked when developing the patch.
Actually, worksforme in build 2001102603 win2k. The build you have should the fix so .. straaaange
will test it with the latest build and post my comments.
works for the testcase for the build 2001-10-25-03. strangely it did not work for the build 2001-10-17-18.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Marking FIXED again, thanks for the followup
verified fixed. build 2001-12-07-10.
Status: RESOLVED → VERIFIED
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: