| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 31fa3eaf232ae0fcb181779ffe66f2b9ab14d0ea..709c24f8b7d843630ba2687ccabbd927ebbecf6f 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -758,6 +758,11 @@ void Document::childrenChanged(const ChildrenChange& change)
|
| m_documentElement = ElementTraversal::firstWithin(*this);
|
| }
|
|
|
| +AtomicString Document::convertLocalName(const AtomicString& name)
|
| +{
|
| + return isHTMLDocument() ? name.lower() : name;
|
| +}
|
| +
|
| PassRefPtrWillBeRawPtr<Element> Document::createElement(const AtomicString& name, ExceptionState& exceptionState)
|
| {
|
| if (!isValidName(name)) {
|
| @@ -766,7 +771,7 @@ PassRefPtrWillBeRawPtr<Element> Document::createElement(const AtomicString& name
|
| }
|
|
|
| if (isXHTMLDocument() || isHTMLDocument())
|
| - return HTMLElementFactory::createHTMLElement(isHTMLDocument() ? name.lower() : name, *this, 0, false);
|
| + return HTMLElementFactory::createHTMLElement(convertLocalName(name), *this, 0, false);
|
|
|
| return Element::create(QualifiedName(nullAtom, name, nullAtom), this);
|
| }
|
| @@ -781,7 +786,7 @@ PassRefPtrWillBeRawPtr<Element> Document::createElement(const AtomicString& loca
|
| RefPtrWillBeRawPtr<Element> element;
|
|
|
| if (CustomElement::isValidName(localName) && registrationContext()) {
|
| - element = registrationContext()->createCustomTagElement(*this, QualifiedName(nullAtom, localName, xhtmlNamespaceURI));
|
| + element = registrationContext()->createCustomTagElement(*this, QualifiedName(nullAtom, convertLocalName(localName), xhtmlNamespaceURI));
|
| } else {
|
| element = createElement(localName, exceptionState);
|
| if (exceptionState.hadException())
|
|
|