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

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

Issue 942933003: Remove almost all clients of isHTMLElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « no previous file | sky/engine/build/scripts/templates/ElementFactory.h.tmpl » ('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 f8e6ca6fb957aaac38c73a2af6087ec5933c28fe..77b13be2e43173d6b77a9af6a5d7ef162dc2f4d8 100644
--- a/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
+++ b/sky/engine/build/scripts/templates/ElementFactory.cpp.tmpl
@@ -71,7 +71,7 @@ static void create{{namespace}}FunctionMap()
g_constructors->set(data[i].tag.localName(), data[i].func);
}
-PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}}Element(
+PassRefPtr<Element> {{namespace}}ElementFactory::createElement(
const AtomicString& localName,
Document& document,
bool createdByParser)
@@ -81,11 +81,8 @@ PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}
if (ConstructorFunction function = g_constructors->get(localName))
return function(document, createdByParser);
- 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());
- }
+ if (CustomElement::isValidName(localName))
+ return document.registrationContext().createCustomTagElement(document, QualifiedName(localName));
return {{fallback_interface}}::create(QualifiedName(localName), document);
}
« no previous file with comments | « no previous file | sky/engine/build/scripts/templates/ElementFactory.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698