Closed
Bug 264609
Opened 21 years ago
Closed 21 years ago
getElementsByTagName methods should be consistant
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha5
People
(Reporter: yan.morin, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file)
3.94 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041010 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041010 Firefox/0.10.1
Depending one the content-type sent by the browser, getElementsByTagName with
XHTML is not consistant when you send him a capitalize tagName.
In text/html, he should lowercase all tagName.
In application/xhtml+xml, he shouldn't lowercase tagName
Reproducible: Always
Steps to Reproduce:
1. do a document.getElementsByTagName('CAPITALIZE_TAG') in application/xhtml+xml
or
2. do a element.getElementsByTagNameNS('*','CAPITALIZE_TAG') in text/html
Actual Results:
with my test case:
text/html: 4, 0, 4, 4
application/xhtml+xml: 1, 1, 3, 1
text/xml: 1, 1, 1, 1
application/xml: 1, 1, 1, 1
Expected Results:
with my test case:
text/html: 4, 4, 4, 4
application/xhtml+xml: 1, 1, 1, 1
text/xml: 1, 1, 1, 1
application/xml: 1, 1, 1, 1
http://lxr.mozilla.org/aviarybranch/source/content/html/document/src/nsHTMLDocument.cpp#1501
VS
http://lxr.mozilla.org/aviarybranch/source/content/html/document/src/nsHTMLDocument.cpp#2490
And
"Since XHTML is based on XML, in XHTML everything is case sensitive"
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-5353782642
![]() |
Assignee | |
Comment 1•21 years ago
|
||
![]() |
Assignee | |
Comment 2•21 years ago
|
||
Comment on attachment 163177 [details] [diff] [review]
Patch
jst? Thoughts?
The document change is definitely right. The element change, I don't know.
getElementsByTagNameNS is sorta wacky in tag-soup...
Attachment #163177 -
Flags: superreview?(jst)
Attachment #163177 -
Flags: review?(jst)
Comment 3•21 years ago
|
||
Comment on attachment 163177 [details] [diff] [review]
Patch
r+sr=jst
Attachment #163177 -
Flags: superreview?(jst)
Attachment #163177 -
Flags: superreview+
Attachment #163177 -
Flags: review?(jst)
Attachment #163177 -
Flags: review+
![]() |
Assignee | |
Comment 4•21 years ago
|
||
Taking.
Assignee: general → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla1.8alpha5
![]() |
Assignee | |
Comment 5•21 years ago
|
||
Fixed. Yan Morin, thank you for pointing out the code in question and for the
excellent testcase!
![]() |
Assignee | |
Comment 6•21 years ago
|
||
er... actually fixed. As of comment 5, so for 1.8a5.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•