| Index: Source/bindings/templates/interface.h
|
| diff --git a/Source/bindings/templates/interface.h b/Source/bindings/templates/interface.h
|
| index 208a6a513ab64718e87ae065f8daaefec743d59d..ef849e9db3d92657caf10b5095943f68c2b9217a 100644
|
| --- a/Source/bindings/templates/interface.h
|
| +++ b/Source/bindings/templates/interface.h
|
| @@ -167,23 +167,9 @@ public:
|
| static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*){% if conditionally_enabled_methods %};
|
| {% else %} { }
|
| {% endif %}
|
| - {# Element wrappers #}
|
| - {% if interface_name == 'HTMLElement' %}
|
| - friend v8::Handle<v8::Object> createV8HTMLWrapper(HTMLElement*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - friend v8::Handle<v8::Object> createV8HTMLDirectWrapper(HTMLElement*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - {% elif interface_name == 'SVGElement' %}
|
| - friend v8::Handle<v8::Object> createV8SVGWrapper(SVGElement*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - friend v8::Handle<v8::Object> createV8SVGDirectWrapper(SVGElement*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - friend v8::Handle<v8::Object> createV8SVGFallbackWrapper(SVGElement*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - {% elif interface_name == 'HTMLUnknownElement' %}
|
| - friend v8::Handle<v8::Object> createV8HTMLFallbackWrapper(HTMLUnknownElement*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - {% elif interface_name == 'Element' %}
|
| - // This is a performance optimization hack. See V8Element::wrap.
|
| - friend v8::Handle<v8::Object> wrap(Node*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| - {% endif %}
|
|
|
| private:
|
| - {% if not has_custom_to_v8 %}
|
| + {% if not has_custom_to_v8 and not is_script_wrappable %}
|
| friend v8::Handle<v8::Object> wrap({{cpp_class}}*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| static v8::Handle<v8::Object> createWrapper({{pass_cpp_type}}, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| {% endif %}
|
| @@ -211,7 +197,14 @@ inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class}}
|
| v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
|
| }
|
| {% else %}{# has_custom_to_v8 #}
|
| +{% if is_script_wrappable %}
|
| +inline v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| +{
|
| + return impl->wrap(creationContext, isolate);
|
| +}
|
| +{% else %}
|
| v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate*);
|
| +{% endif %}
|
|
|
| inline v8::Handle<v8::Value> toV8({{cpp_class}}* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| {
|
|
|