Index: Source/core/dom/CustomElementRegistrationContext.cpp |
diff --git a/Source/core/dom/CustomElementRegistrationContext.cpp b/Source/core/dom/CustomElementRegistrationContext.cpp |
index 4cc4e68a86426c33c22e1e47b35d9762fca8f80a..6c4133f970275e819a8bed3d10334ea6e8a9b850 100644 |
--- a/Source/core/dom/CustomElementRegistrationContext.cpp |
+++ b/Source/core/dom/CustomElementRegistrationContext.cpp |
@@ -58,13 +58,10 @@ void CustomElementRegistrationContext::registerElement(Document* document, Custo |
didResolveElement(definition, *it); |
} |
-PassRefPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Document* document, const QualifiedName& tagName, CreationMode mode) |
+PassRefPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Document& document, const QualifiedName& tagName, CreationMode mode) |
{ |
ASSERT(CustomElement::isValidName(tagName.localName())); |
- if (!document) |
- return 0; |
- |
RefPtr<Element> element; |
if (HTMLNames::xhtmlNamespaceURI == tagName.namespaceURI()) { |
@@ -73,7 +70,7 @@ PassRefPtr<Element> CustomElementRegistrationContext::createCustomTagElement(Doc |
element = SVGUnknownElement::create(tagName, document); |
} else { |
// XML elements are not custom elements, so return early. |
- return Element::create(tagName, document); |
+ return Element::create(tagName, &document); |
} |
element->setCustomElementState(mode == CreatedByParser ? Element::WaitingForParser : Element::WaitingForUpgrade); |