HTMLElement::nodeName should not upper case non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=153231
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaselined the test now that all test cases pass.
* web-platform-tests/dom/nodes/Document-createElement-expected.txt:
Source/WebCore:
Use the newly added convertToASCIIUppercase to generate the string for tagName and nodeName.
Test: fast/dom/Element/tagName-must-be-ASCII-uppercase-in-HTML-document.html
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::localNameUpper): Use convertToASCIIUppercase.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::nodeName): Use convertToASCIIUppercase.
Source/WTF:
Added convertToASCIIUppercase to AtomicString, String, and StringImpl.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::convertASCIICase): Generalized from convertToASCIILowercase.
(WTF::AtomicString::convertToASCIILowercase):
(WTF::AtomicString::convertToASCIIUppercase):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::convertASCIICase): Generalized from convertToASCIILowercase.
(WTF::StringImpl::convertToASCIILowercase):
(WTF::StringImpl::convertToASCIIUppercase):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WTF::String::convertToASCIIUppercase): Added.
* wtf/text/WTFString.h:
LayoutTests:
Added a regression test since the rebaselined W3C test case is very simple and doesn't all permutations.
* fast/dom/Element/tagName-must-be-ASCII-uppercase-in-HTML-document-expected.txt: Added.
* fast/dom/Element/tagName-must-be-ASCII-uppercase-in-HTML-document.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@195501
268f45cc-cd09-0410-ab3c-
d52691b4dbfc