| 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 b4f3645f135ab7d580657005588c50beaee12d1b..4b34259d3e223206fedec88428d459d5df00aaae 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -640,8 +640,11 @@ Element* Document::createElement(const AtomicString& name, ExceptionState& excep
|
| return nullptr;
|
| }
|
|
|
| - if (isXHTMLDocument() || isHTMLDocument())
|
| + if (isXHTMLDocument() || isHTMLDocument()) {
|
| + if (CustomElement::shouldCreateCustomElement(*this, name))
|
| + return CustomElement::createCustomElement(*this, name, CreatedByCreateElement, exceptionState);
|
| return HTMLElementFactory::createHTMLElement(convertLocalName(name), *this, 0, CreatedByCreateElement);
|
| + }
|
|
|
| return Element::create(QualifiedName(nullAtom, name, nullAtom), this);
|
| }
|
| @@ -656,7 +659,7 @@ Element* Document::createElement(const AtomicString& localName, const AtomicStri
|
| Element* element;
|
|
|
| if (CustomElement::shouldCreateCustomElement(*this, localName)) {
|
| - element = CustomElement::createCustomElement(*this, localName, CreatedByCreateElement);
|
| + element = CustomElement::createCustomElement(*this, localName, CreatedByCreateElement, exceptionState);
|
| } else if (V0CustomElement::isValidName(localName) && registrationContext()) {
|
| element = registrationContext()->createCustomTagElement(*this, QualifiedName(nullAtom, convertLocalName(localName), xhtmlNamespaceURI));
|
| } else {
|
| @@ -692,7 +695,7 @@ Element* Document::createElementNS(const AtomicString& namespaceURI, const Atomi
|
| if (qName == QualifiedName::null())
|
| return nullptr;
|
|
|
| - return createElement(qName, CreatedByCreateElement);
|
| + return createElement(qName, CreatedByCreateElement, exceptionState);
|
| }
|
|
|
| Element* Document::createElementNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, ExceptionState& exceptionState)
|
| @@ -703,7 +706,7 @@ Element* Document::createElementNS(const AtomicString& namespaceURI, const Atomi
|
|
|
| Element* element;
|
| if (CustomElement::shouldCreateCustomElement(*this, qName))
|
| - element = CustomElement::createCustomElement(*this, qName, CreatedByCreateElement);
|
| + element = CustomElement::createCustomElement(*this, qName, CreatedByCreateElement, exceptionState);
|
| else if (V0CustomElement::isValidName(qName.localName()) && registrationContext())
|
| element = registrationContext()->createCustomTagElement(*this, qName);
|
| else
|
| @@ -986,6 +989,13 @@ Element* Document::createElement(const QualifiedName& qName, CreateElementFlags
|
| return e;
|
| }
|
|
|
| +Element* Document::createElement(const QualifiedName& qName, CreateElementFlags flags, ExceptionState& exceptionState)
|
| +{
|
| + if (CustomElement::shouldCreateCustomElement(*this, qName))
|
| + return CustomElement::createCustomElement(*this, qName, flags, exceptionState);
|
| + return createElement(qName, flags);
|
| +}
|
| +
|
| String Document::readyState() const
|
| {
|
| DEFINE_STATIC_LOCAL(const String, loading, ("loading"));
|
|
|