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

Unified Diff: sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl

Issue 943013002: Implement Custom Elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: attributeChanged***d***Callback Created 5 years, 10 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
Index: sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
diff --git a/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl b/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
index 77b13be2e43173d6b77a9af6a5d7ef162dc2f4d8..658f079997a4c0f33622ad76317579572cab701c 100644
--- a/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -11,8 +11,7 @@
{% if fallback_interface %}
#include "core/{{namespace|lower}}/{{fallback_interface}}.h"
{% endif %}
-#include "core/dom/custom/CustomElement.h"
-#include "core/dom/custom/CustomElementRegistrationContext.h"
+#include "core/dom/custom2/new_custom_element_registry.h"
#include "core/dom/Document.h"
#include "core/frame/Settings.h"
#include "gen/sky/platform/RuntimeEnabledFeatures.h"
@@ -80,11 +79,7 @@ PassRefPtr<Element> {{namespace}}ElementFactory::createElement(
create{{namespace}}FunctionMap();
if (ConstructorFunction function = g_constructors->get(localName))
return function(document, createdByParser);
-
- if (CustomElement::isValidName(localName))
- return document.registrationContext().createCustomTagElement(document, QualifiedName(localName));
-
- return {{fallback_interface}}::create(QualifiedName(localName), document);
+ return document.elementRegistry().CreateElement(document, localName);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698