Closed
Bug 10173
Opened 25 years ago
Closed 24 years ago
DOM comparison of [CI] align attribute fails when comparing upper and lower case.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: jcarpenter0524, Assigned: vidur)
Details
(Keywords: platform-parity, testcase)
Attachments
(2 files)
Overview Description: According to DOM Level-1 spec., HTML Section, "...the return value of an attribute that is a value list (e.g., left|right|center) is always capitalized..." However, the return value for HTMLTableElement.align is always lower case. Testcase: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>test</TITLE></HEAD> <BODY> <P>The return value should be capitalized as "Right". <BR> <TABLE BORDER=1 ALIGN="RIGHT"> <TR><TD>cell data</TD><TD>cell data</TD></TR> <TR><TD>cell data</TD><TD>cell data</TD></TR> </TABLE> <SCRIPT TYPE="text/javascript"> var oList=document.firstChild.childNodes[1].childNodes[2].align; document.write("Return Value = " + oList); </SCRIPT> </BODY></HTML> Actual Results: The return value is "right" Expected Results: The return value should be "Right" Build Date & Platforms Bug Found: 1999-07-19-12-M9 WinNT, Win98, MacPPC, Linux
Reporter | ||
Updated•25 years ago
|
QA Contact: gerardok → janc
Comment 1•25 years ago
|
||
Updated•25 years ago
|
Whiteboard: [TESTCASE]
Target Milestone: M15
Should the return be ``RIGHT'' or ``Right''? I suspect the former, but I'm going to drag David into this one as well. =) Not for beta, I don't think.
No, it should be "Right". However, a getAttribute() should return "RIGHT", I think. There are special case rules in the HTML DOM, for backwards compatibility (with what?). See http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-642250288
Reporter | ||
Updated•25 years ago
|
Summary: DOM returns wrong case for align attribute of HTMLTableElement → DOM comparison of [CI] align attribute fails when comparing upper and lower case.
Reporter | ||
Comment 4•25 years ago
|
||
dbaron is absolutely correct about the return value. I wrote this bug incorrectly. The bug is not what DOM returns, but whether it accepts "RIGHT" "Right" "right" and "riGHt" as the same thing in a comparison. The align attribute should be case insensitive (as I understand it anyway.) I'm attaching a new test case as the original is now invalid. The same thing is happening for bgColor in tables, if this is a bug, is it the same one or a separate one? (rewording summary to reflect bug)
Reporter | ||
Comment 5•25 years ago
|
||
Two problems here: * I don't see any align attributes in your test case (I didn't look too closely, but...) * More importantly (if I understand what you're trying to say correctly, which i may not), the case insensitivity doesn't extend to JavaScript. The attribute is case insensitive w.r.t. HTML (and therefore CSS). However, the DOM defines the case of the return value, and JavaScript string equality operations just compare strings, and are therefore case sensitive.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•25 years ago
|
||
Fix checked in on 11/16/1999. The revised testcase is incorrect. We should always return a value that has the first letter uppercased.
Comment 8•25 years ago
|
||
fyi, this cause breakage. see bug #19068
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
OS: All → Windows 98
Hardware: All → PC
Summary: DOM comparison of [CI] align attribute fails when comparing upper and lower case. → [PP]DOM comparison of [CI] align attribute fails when comparing upper and lower case.
Reporter | ||
Updated•25 years ago
|
Resolution: FIXED → ---
Reporter | ||
Comment 9•25 years ago
|
||
DOM now returns all lower case on Windows only. Mac and Linux now return correct result.
Assignee | ||
Comment 10•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Comment 11•25 years ago
|
||
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Updated•25 years ago
|
Summary: [PP]DOM comparison of [CI] align attribute fails when comparing upper and lower case. → DOM comparison of [CI] align attribute fails when comparing upper and lower case.
Whiteboard: [TESTCASE]
Reporter | ||
Comment 12•24 years ago
|
||
This bug is now fixed. Marking fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•