Closed
Bug 614725
Opened 14 years ago
Closed 12 years ago
createElement should do ASCII lowercasing
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: bzbarsky, Assigned: ehoogeveen)
References
Details
The relevant code:
PRBool needsLowercase = IsHTML() && !IsLowercaseASCII(aTagName);
nsAutoString lcTagName;
if (needsLowercase) {
ToLowerCase(aTagName, lcTagName);
}
Can we just always call the ASCII ToLowerCase on the input string and be done with it?
![]() |
Reporter | |
Updated•14 years ago
|
Assignee: nobody → bzbarsky
Priority: -- → P3
I don't feel strongly, but whatever we do should be put in Web DOM Core.
The IsLowercaseASCII check definitely feels silly.
If we do always lowercase, it'd make sense to me to hook things up to tables which ensures that svg and mathml elements can be created as well.
![]() |
Reporter | |
Comment 2•14 years ago
|
||
Oh, by "always" I meant "whenever IsHTML()". As in, get rid of the IsLowercaseASCII thing, and change the way we do the lowercasing to do ascii-only.
That said, IsLowercaseASCII was added in bug 566466. Maybe we have performance data indicating it helps?
Comment 3•14 years ago
|
||
I added IsLowercaseASCII because of performance reasons. We want to avoid
extra allocations and memcopying.
Another option would be to change ToLowerCase so that it doesn't always
effectively memcpy.
Comment 4•14 years ago
|
||
![]() |
Reporter | |
Comment 5•12 years ago
|
||
This got fixed in bug 492931.
Assignee: bzbarsky → emanuel.hoogeveen
Status: NEW → RESOLVED
Closed: 12 years ago
Depends on: 492931
Priority: P3 → --
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
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
•