| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index befc759a2ea9f8666df3a87a1cae6533485487f8..92f55d65b9abc21088948626d22fcd93e9fc2fb2 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -678,12 +678,14 @@ Element* Document::createElement(const AtomicString& name,
|
| // 2. If the context object is an HTML document, let localName be
|
| // converted to ASCII lowercase.
|
| AtomicString localName = convertLocalName(name);
|
| - if (CustomElement::shouldCreateCustomElement(localName))
|
| - return CustomElement::createCustomElementSync(*this, localName);
|
| + if (CustomElement::shouldCreateCustomElement(localName)) {
|
| + return CustomElement::createCustomElementSync(
|
| + *this,
|
| + QualifiedName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI));
|
| + }
|
| return HTMLElementFactory::createHTMLElement(localName, *this, 0,
|
| CreatedByCreateElement);
|
| }
|
| -
|
| return Element::create(QualifiedName(nullAtom, name, nullAtom), this);
|
| }
|
|
|
| @@ -755,8 +757,8 @@ Element* Document::createElement(const AtomicString& localName,
|
| Element* element;
|
|
|
| if (definition) {
|
| - element =
|
| - CustomElement::createCustomElementSync(*this, convertedLocalName, name);
|
| + element = CustomElement::createCustomElementSync(*this, convertedLocalName,
|
| + definition);
|
| } else if (V0CustomElement::isValidName(localName) && registrationContext()) {
|
| element = registrationContext()->createCustomTagElement(
|
| *this, QualifiedName(nullAtom, convertedLocalName, xhtmlNamespaceURI));
|
| @@ -862,7 +864,7 @@ Element* Document::createElementNS(const AtomicString& namespaceURI,
|
| isV1 && RuntimeEnabledFeatures::customElementsBuiltinEnabled();
|
|
|
| if (CustomElement::shouldCreateCustomElement(qName) || shouldCreateBuiltin) {
|
| - element = CustomElement::createCustomElementSync(*this, qName, is);
|
| + element = CustomElement::createCustomElementSync(*this, qName, definition);
|
| } else if (V0CustomElement::isValidName(qName.localName()) &&
|
| registrationContext()) {
|
| element = registrationContext()->createCustomTagElement(*this, qName);
|
|
|