Chromium Code Reviews
DescriptionUse the correct case converter for |localName| and |tagName|
Per spec[1], document.createElement should set |localName|
to ASCII lowercase when context object is an HTML document.
Now the AtomicString::lower() was used,
but it converts characters more than ASCII into lowercase.
So we should use AtomicString::lowerASCII() instead.
Besides, per spec[2], Element.tagName should be set to ASCII
uppercase when context object is in HTML namespace and its node
document is an HTML document.
Now we are using (Atomic)String::upper() due to lack of
ASCII uppercase support. So (Atomic)String::upperASCII() is
added to solve this issue, and AtomicString::upper() is removed
since it's not used anymore.
Tests were changed accordingly
[1]: https://dom.spec.whatwg.org/#dom-document-createelement
[2]: https://dom.spec.whatwg.org/#dom-element-tagname
BUG=685012
Review-Url: https://codereview.chromium.org/2723053002
Cr-Commit-Position: refs/heads/master@{#454059}
Committed: https://chromium.googlesource.com/chromium/src/+/1337a0b763dc552f6eeadb17df348429b34a3501
Patch Set 1 #
Total comments: 4
Patch Set 2 : Correct the case converter for |localName| and |tagName| #Patch Set 3 : Oops... #Messages
Total messages: 17 (10 generated)
|