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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl

Issue 2424693002: Custom Elements: Complete HTMLConstructor Algorithm (Closed)
Patch Set: Redefinition guard Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 {% extends 'interface_base.cpp.tmpl' %} 1 {% extends 'interface_base.cpp.tmpl' %}
2 2
3 {% set has_prepare_prototype_and_interface_object = 3 {% set has_prepare_prototype_and_interface_object =
4 unscopables or has_conditional_attributes_on_prototype or 4 unscopables or has_conditional_attributes_on_prototype or
5 methods | conditionally_exposed(is_partial) %} 5 methods | conditionally_exposed(is_partial) %}
6 {% set prepare_prototype_and_interface_object_func = 6 {% set prepare_prototype_and_interface_object_func =
7 '%s::preparePrototypeAndInterfaceObject' % v8_class 7 '%s::preparePrototypeAndInterfaceObject' % v8_class
8 if has_prepare_prototype_and_interface_object 8 if has_prepare_prototype_and_interface_object
9 else 'nullptr' %} 9 else 'nullptr' %}
10 10
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 660 }
661 661
662 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) { 662 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) {
663 v8SetReturnValue(info, info.Holder()); 663 v8SetReturnValue(info, info.Holder());
664 return; 664 return;
665 } 665 }
666 666
667 {% if has_custom_constructor %} 667 {% if has_custom_constructor %}
668 {{v8_class}}::constructorCustom(info); 668 {{v8_class}}::constructorCustom(info);
669 {% elif has_html_constructor %} 669 {% elif has_html_constructor %}
670 {{v8_class}}::HTMLConstructor(info); 670 V8HTMLConstructor::htmlConstructor(info, {{v8_class}}::wrapperTypeInfo, HTML ElementType::k{{interface_name}});
671 {% else %} 671 {% else %}
672 {{cpp_class}}V8Internal::constructor(info); 672 {{cpp_class}}V8Internal::constructor(info);
673 {% endif %} 673 {% endif %}
674 } 674 }
675 675
676 {% endif %} 676 {% endif %}
677 {% endblock %} 677 {% endblock %}
678 678
679 679
680 {##############################################################################} 680 {##############################################################################}
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 992
993 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 993 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
994 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 994 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
995 { 995 {
996 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 996 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
997 } 997 }
998 998
999 {% endfor %} 999 {% endfor %}
1000 {% endif %} 1000 {% endif %}
1001 {% endblock %} 1001 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698