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

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

Issue 841873006: All documents should have a RegistrationContext. (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 | « no previous file | sky/engine/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a351ec9ce466cd214ab7dfd423c9d26701e93beb..f8e6ca6fb957aaac38c73a2af6087ec5933c28fe 100644
--- a/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -81,8 +81,8 @@ PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}
if (ConstructorFunction function = g_constructors->get(localName))
return function(document, createdByParser);
- if (document.registrationContext() && CustomElement::isValidName(localName)) {
- RefPtr<Element> element = document.registrationContext()->createCustomTagElement(document, QualifiedName(localName));
+ if (CustomElement::isValidName(localName)) {
+ RefPtr<Element> element = document.registrationContext().createCustomTagElement(document, QualifiedName(localName));
ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element());
return static_pointer_cast<{{namespace}}Element>(element.release());
}
« no previous file with comments | « no previous file | sky/engine/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698