Index: Source/core/dom/CustomElementRegistry.cpp |
diff --git a/Source/core/dom/CustomElementRegistry.cpp b/Source/core/dom/CustomElementRegistry.cpp |
index b734c82a94060ef722df0b1be55276ad6768be78..00d6d71b81a83c162260942c46d270913c9cd859 100644 |
--- a/Source/core/dom/CustomElementRegistry.cpp |
+++ b/Source/core/dom/CustomElementRegistry.cpp |
@@ -78,16 +78,13 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume |
return 0; |
} |
- if (!constructorBuilder->validateOptions(type, es)) |
- return 0; |
- |
QualifiedName tagName = nullQName(); |
- if (!constructorBuilder->findTagName(type, tagName)) { |
- CustomElementException::throwException(CustomElementException::PrototypeDoesNotExtendHTMLElementSVGElementNamespace, type, es); |
+ if (!constructorBuilder->validateOptions(type, tagName, es)) |
return 0; |
- } |
+ |
ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.namespaceURI() == SVGNames::svgNamespaceURI); |
+ // FIXME: This should be done earlier in validateOptions. |
if (m_registeredTypeNames.contains(type)) { |
CustomElementException::throwException(CustomElementException::TypeAlreadyRegistered, type, es); |
return 0; |