Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: sky/engine/core/dom/custom/CustomElementRegistry.cpp

Issue 831993005: Remove custom element type extensions. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/dom/custom/CustomElementRegistry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/custom/CustomElementRegistry.cpp
diff --git a/sky/engine/core/dom/custom/CustomElementRegistry.cpp b/sky/engine/core/dom/custom/CustomElementRegistry.cpp
index 81e1adba4ed509aa5f3c7e820be6e0312e6118f6..ab3839d83c127db291f79e8768037c04e9c6ff99 100644
--- a/sky/engine/core/dom/custom/CustomElementRegistry.cpp
+++ b/sky/engine/core/dom/custom/CustomElementRegistry.cpp
@@ -79,7 +79,7 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
return 0;
}
- if (m_registeredTypeNames.contains(type)) {
+ if (m_definitions.contains(type)) {
CustomElementException::throwException(CustomElementException::TypeAlreadyRegistered, type, exceptionState);
return 0;
}
@@ -99,14 +99,13 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
return 0;
}
- const CustomElementDescriptor descriptor(type, tagName.localName());
+ const CustomElementDescriptor descriptor(tagName.localName());
RefPtr<CustomElementDefinition> definition = CustomElementDefinition::create(descriptor, lifecycleCallbacks);
if (!constructorBuilder->createConstructor(document, definition.get(), exceptionState))
return 0;
m_definitions.add(descriptor, definition);
- m_registeredTypeNames.add(descriptor.type());
if (!constructorBuilder->didRegisterDefinition(definition.get())) {
CustomElementException::throwException(CustomElementException::ContextDestroyedRegisteringDefinition, type, exceptionState);
« no previous file with comments | « sky/engine/core/dom/custom/CustomElementRegistry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698