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

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

Issue 23717043: Implement Custom Elements 'extends' option. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/core/dom/CustomElementRegistry.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 1b4b2b4bcdb5604a72e1c827f3fc092939962b5e..1748ca622556f0e51a6b58cace840ff2c936e84e 100755
--- a/Source/core/scripts/make_names.pl
+++ b/Source/core/scripts/make_names.pl
@@ -1144,13 +1144,19 @@ END
END
;
}
+
+ my $fallbackWrapper = $parameters{fallbackInterfaceName};
+ if ($parameters{namespace} eq "SVG") {
+ $fallbackWrapper = "SVGElement";
+ }
+
print F <<END
}
-const QualifiedName* find$parameters{namespace}TagNameOfV8Type(const WrapperTypeInfo* type)
+WrapperTypeInfo* findWrapperTypeFor$parameters{namespace}TagName(const AtomicString& name)
{
- typedef HashMap<const WrapperTypeInfo*, const QualifiedName*> TypeNameMap;
- DEFINE_STATIC_LOCAL(TypeNameMap, map, ());
+ typedef HashMap<WTF::StringImpl*, WrapperTypeInfo*> NameTypeMap;
+ DEFINE_STATIC_LOCAL(NameTypeMap, map, ());
if (map.isEmpty()) {
END
;
@@ -1164,7 +1170,7 @@ END
}
my $JSInterfaceName = $enabledTags{$tagName}{JSInterfaceName};
- print F " map.set(WrapperTypeTraits<${JSInterfaceName}>::info(), &${tagName}Tag);\n";
+ print F " map.set(${tagName}Tag.localName().impl(), WrapperTypeTraits<${JSInterfaceName}>::info());\n";
if ($conditional) {
print F "#endif\n";
@@ -1175,7 +1181,10 @@ END
print F <<END
}
- return map.get(type);
+ if (WrapperTypeInfo* result = map.get(name.impl()))
+ return result;
+
+ return WrapperTypeTraits<$fallbackWrapper>::info();
}
END
@@ -1210,7 +1219,8 @@ namespace WebCore {
class $parameters{namespace}Element;
- const QualifiedName* find$parameters{namespace}TagNameOfV8Type(const WrapperTypeInfo*);
+ WrapperTypeInfo* findWrapperTypeFor$parameters{namespace}TagName(const AtomicString& name);
+
v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
inline v8::Handle<v8::Object> createV8$parameters{namespace}DirectWrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
« no previous file with comments | « Source/core/dom/CustomElementRegistry.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698