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

Unified Diff: Source/core/scripts/make_names.pl

Issue 14776002: Create wrappers for unresolved Custom Elements at the correct type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/scripts/make_names.pl
diff --git a/Source/core/scripts/make_names.pl b/Source/core/scripts/make_names.pl
index 27316bd61dee95b23f8da2740b4c07814ef7a50d..4a97fdcce22c217e4d31e8b7ca048dce99039c72 100755
--- a/Source/core/scripts/make_names.pl
+++ b/Source/core/scripts/make_names.pl
@@ -897,11 +897,10 @@ print F <<END
if (!document)
return 0;
- if (document->registry()) {
- if (RefPtr<Element> element = document->registry()->tryToCreateCustomTagElement(qName)) {
- ASSERT(element->is$parameters{namespace}Element());
- return static_pointer_cast<$parameters{namespace}Element>(element.release());
- }
+ if (CustomElementRegistry::isCustomTagName(qName.localName())) {
+ RefPtr<Element> element = document->ensureCustomElementRegistry()->createCustomTagElement(qName);
+ ASSERT(element->is$parameters{namespace}Element());
+ return static_pointer_cast<$parameters{namespace}Element>(element.release());
}
if (!gFunctionMap)
@@ -1153,9 +1152,9 @@ END
print F <<END
}
- if (CustomElementHelpers::hasDefinition(element))
- return CustomElementHelpers::wrap(element, creationContext, isolate);
Create$parameters{namespace}ElementWrapperFunction createWrapperFunction = map.get(element->localName().impl());
+ if (CustomElementHelpers::isCustomElement(element))
+ return CustomElementHelpers::wrap(element, creationContext, isolate, CustomElementHelpers::CreateWrapperFunction(createWrapperFunction));
if (createWrapperFunction)
{
END
« Source/core/dom/Document.cpp ('K') | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698