Index: Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl |
diff --git a/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl b/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl |
index 746c64085c047840432acc6d6cc590878e336ec5..669fb90faa8526d105ba7744c9b0b9e3afd8b041 100644 |
--- a/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl |
+++ b/Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl |
@@ -22,53 +22,6 @@ namespace blink { |
using namespace {{namespace}}Names; |
-typedef v8::Handle<v8::Object> (*Create{{namespace}}ElementWrapperFunction)({{namespace}}Element*, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
- |
-static v8::Handle<v8::Object> create{{namespace}}ElementWrapper({{namespace}}Element*, v8::Handle<v8::Object>, v8::Isolate*) |
-{ |
- ASSERT_NOT_REACHED(); |
- return v8::Handle<v8::Object>(); |
-} |
-{% for js_interface, list in tags|sort|selectattr('has_js_interface')|groupby('js_interface') %} |
-{% filter enable_conditional(list[0].Conditional) %} |
-static v8::Handle<v8::Object> create{{js_interface}}Wrapper({{namespace}}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
-{ |
- {% if list[0].runtimeEnabled %} |
- if (!RuntimeEnabledFeatures::{{list[0].runtimeEnabled}}Enabled()) |
haraken
2014/09/04 02:17:46
It is wrong to just remove this code. We need to f
Yuki
2014/09/04 04:47:29
Hmm. If the element is not runtime-enabled, then
haraken
2014/09/04 04:54:52
What happens if:
<div id="foo">
<audio></audio>
<
Yuki
2014/09/04 14:10:14
As talked offline, if the runtime flag is not enab
|
- return createV8{{namespace}}FallbackWrapper(to{{fallback_js_interface}}(element), creationContext, isolate); |
- {% endif %} |
- return wrap(static_cast<{{js_interface}}*>(element), creationContext, isolate); |
-} |
-{% endfilter %} |
-{% endfor %} |
- |
-v8::Handle<v8::Object> createV8{{namespace}}Wrapper({{namespace}}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
-{ |
- typedef HashMap<StringImpl*, Create{{namespace}}ElementWrapperFunction> FunctionMap; |
- DEFINE_STATIC_LOCAL(FunctionMap, map, ()); |
- if (map.isEmpty()) { |
- {% for tag in tags|sort %} |
- {% filter enable_conditional(tag.Conditional) %} |
- map.set({{tag|symbol}}Tag.localName().impl(), create{{tag.js_interface}}Wrapper); |
- {% endfilter %} |
- {% endfor %} |
- } |
- |
- Create{{namespace}}ElementWrapperFunction createWrapperFunction = map.get(element->localName().impl()); |
- if (createWrapperFunction == create{{namespace}}ElementWrapper) |
- createWrapperFunction = createV8{{namespace}}DirectWrapper; |
haraken
2014/09/04 02:17:46
I think it's correct to just remove createV8HTMLDi
Yuki
2014/09/04 04:47:29
That's right. In addition, it must be fine to use
haraken
2014/09/04 04:54:52
There is no V8T for the classes that had been usin
Yuki
2014/09/04 14:10:14
Yes, there are such cases. In those cases, they a
|
- if (element->isCustomElement()) |
- return CustomElementWrapper<{{namespace}}Element, V8{{namespace}}Element>::wrap(element, creationContext, isolate, createWrapperFunction); |
- |
- if (createWrapperFunction) |
- return createWrapperFunction(element, creationContext, isolate); |
- {% if fallback_js_interface == namespace + 'Element' %} |
- return V8{{fallback_js_interface}}::createWrapper(element, creationContext, isolate); |
- {% else %} |
- return wrap(to{{fallback_js_interface}}(element), creationContext, isolate); |
- {% endif %} |
-} |
- |
const WrapperTypeInfo* findWrapperTypeFor{{namespace}}TagName(const AtomicString& name) |
{ |
typedef HashMap<StringImpl*, const WrapperTypeInfo*> NameTypeMap; |
@@ -89,4 +42,4 @@ const WrapperTypeInfo* findWrapperTypeFor{{namespace}}TagName(const AtomicString |
return &V8{{fallback_js_interface}}::wrapperTypeInfo; |
} |
-} |
+} // namespace blink |