| 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 4f5b5487a41e44be3ab0c5a37125580e3c592af0..7b6ec96a39617dda4ec4cca5e72a6402e4db8928 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -629,11 +629,8 @@ Element* Document::createElement(const AtomicString& name, ExceptionState& excep
|
| return nullptr;
|
| }
|
|
|
| - if (isXHTMLDocument() || isHTMLDocument()) {
|
| - if (CustomElement::shouldCreateCustomElement(name))
|
| - return CustomElement::createCustomElementSync(*this, name, exceptionState);
|
| - return HTMLElementFactory::createHTMLElement(convertLocalName(name), *this, 0, CreatedByCreateElement);
|
| - }
|
| + if (isXHTMLDocument() || isHTMLDocument())
|
| + return HTMLElementFactory::createHTMLElement(convertLocalName(name), *this, 0, &exceptionState, CreatedByCreateElement);
|
|
|
| return Element::create(QualifiedName(nullAtom, name, nullAtom), this);
|
| }
|
| @@ -648,7 +645,7 @@ Element* Document::createElement(const AtomicString& localName, const AtomicStri
|
| Element* element;
|
|
|
| if (CustomElement::shouldCreateCustomElement(localName)) {
|
| - element = CustomElement::createCustomElementSync(*this, localName, exceptionState);
|
| + element = CustomElement::createCustomElementSync(*this, localName, &exceptionState);
|
| } else if (V0CustomElement::isValidName(localName) && registrationContext()) {
|
| element = registrationContext()->createCustomTagElement(*this, QualifiedName(nullAtom, convertLocalName(localName), xhtmlNamespaceURI));
|
| } else {
|
| @@ -685,7 +682,7 @@ Element* Document::createElementNS(const AtomicString& namespaceURI, const Atomi
|
| return nullptr;
|
|
|
| if (CustomElement::shouldCreateCustomElement(qName))
|
| - return CustomElement::createCustomElementSync(*this, qName, exceptionState);
|
| + return CustomElement::createCustomElementSync(*this, qName, &exceptionState);
|
| return createElement(qName, CreatedByCreateElement);
|
| }
|
|
|
| @@ -697,7 +694,7 @@ Element* Document::createElementNS(const AtomicString& namespaceURI, const Atomi
|
|
|
| Element* element;
|
| if (CustomElement::shouldCreateCustomElement(qName))
|
| - element = CustomElement::createCustomElementSync(*this, qName, exceptionState);
|
| + element = CustomElement::createCustomElementSync(*this, qName, &exceptionState);
|
| else if (V0CustomElement::isValidName(qName.localName()) && registrationContext())
|
| element = registrationContext()->createCustomTagElement(*this, qName);
|
| else
|
| @@ -963,7 +960,7 @@ Element* Document::createElement(const QualifiedName& qName, CreateElementFlags
|
|
|
| // FIXME: Use registered namespaces and look up in a hash to find the right factory.
|
| if (qName.namespaceURI() == xhtmlNamespaceURI)
|
| - e = HTMLElementFactory::createHTMLElement(qName.localName(), *this, 0, flags);
|
| + e = HTMLElementFactory::createHTMLElement(qName.localName(), *this, 0, 0, flags);
|
| else if (qName.namespaceURI() == SVGNames::svgNamespaceURI)
|
| e = SVGElementFactory::createSVGElement(qName.localName(), *this, flags);
|
|
|
|
|