| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # coding=utf-8 | 2 # coding=utf-8 |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 is_active_dom_object = 'ActiveDOMObject' in extended_attributes | 115 is_active_dom_object = 'ActiveDOMObject' in extended_attributes |
| 116 | 116 |
| 117 # [CheckSecurity] | 117 # [CheckSecurity] |
| 118 is_check_security = 'CheckSecurity' in extended_attributes | 118 is_check_security = 'CheckSecurity' in extended_attributes |
| 119 if is_check_security: | 119 if is_check_security: |
| 120 includes.add('bindings/core/v8/BindingSecurity.h') | 120 includes.add('bindings/core/v8/BindingSecurity.h') |
| 121 | 121 |
| 122 # [DependentLifetime] | 122 # [DependentLifetime] |
| 123 is_dependent_lifetime = 'DependentLifetime' in extended_attributes | 123 is_dependent_lifetime = 'DependentLifetime' in extended_attributes |
| 124 | 124 |
| 125 # [PrimaryGlobal] and [Global] |
| 126 is_global = ('PrimaryGlobal' in extended_attributes or |
| 127 'Global' in extended_attributes) |
| 128 |
| 125 # [MeasureAs] | 129 # [MeasureAs] |
| 126 is_measure_as = 'MeasureAs' in extended_attributes | 130 is_measure_as = 'MeasureAs' in extended_attributes |
| 127 if is_measure_as: | 131 if is_measure_as: |
| 128 includes.add('core/frame/UseCounter.h') | 132 includes.add('core/frame/UseCounter.h') |
| 129 | 133 |
| 130 # [SetWrapperReferenceFrom] | 134 # [SetWrapperReferenceFrom] |
| 131 set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFro
m') | 135 set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFro
m') |
| 132 if set_wrapper_reference_from: | 136 if set_wrapper_reference_from: |
| 133 includes.update(['bindings/core/v8/V8GCController.h', | 137 includes.update(['bindings/core/v8/V8GCController.h', |
| 134 'core/dom/Element.h']) | 138 'core/dom/Element.h']) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter
face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] | 180 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter
face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] |
| 177 'has_partial_interface': len(interface.partial_interfaces) > 0, | 181 'has_partial_interface': len(interface.partial_interfaces) > 0, |
| 178 'has_visit_dom_wrapper': has_visit_dom_wrapper, | 182 'has_visit_dom_wrapper': has_visit_dom_wrapper, |
| 179 'header_includes': header_includes, | 183 'header_includes': header_includes, |
| 180 'interface_name': interface.name, | 184 'interface_name': interface.name, |
| 181 'is_active_dom_object': is_active_dom_object, | 185 'is_active_dom_object': is_active_dom_object, |
| 182 'is_array_buffer_or_view': is_array_buffer_or_view, | 186 'is_array_buffer_or_view': is_array_buffer_or_view, |
| 183 'is_check_security': is_check_security, | 187 'is_check_security': is_check_security, |
| 184 'is_event_target': is_event_target, | 188 'is_event_target': is_event_target, |
| 185 'is_exception': interface.is_exception, | 189 'is_exception': interface.is_exception, |
| 190 'is_global': is_global, |
| 186 'is_node': inherits_interface(interface.name, 'Node'), | 191 'is_node': inherits_interface(interface.name, 'Node'), |
| 187 'is_partial': interface.is_partial, | 192 'is_partial': interface.is_partial, |
| 188 'is_typed_array_type': is_typed_array_type, | 193 'is_typed_array_type': is_typed_array_type, |
| 189 'lifetime': 'Dependent' | 194 'lifetime': 'Dependent' |
| 190 if (has_visit_dom_wrapper or | 195 if (has_visit_dom_wrapper or |
| 191 is_active_dom_object or | 196 is_active_dom_object or |
| 192 is_dependent_lifetime) | 197 is_dependent_lifetime) |
| 193 else 'Independent', | 198 else 'Independent', |
| 194 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] | 199 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] |
| 195 'parent_interface': parent_interface, | 200 'parent_interface': parent_interface, |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 | 585 |
| 581 context.update({ | 586 context.update({ |
| 582 'indexed_property_getter': property_getter(interface.indexed_property_ge
tter, ['index']), | 587 'indexed_property_getter': property_getter(interface.indexed_property_ge
tter, ['index']), |
| 583 'indexed_property_setter': property_setter(interface.indexed_property_se
tter, interface), | 588 'indexed_property_setter': property_setter(interface.indexed_property_se
tter, interface), |
| 584 'indexed_property_deleter': property_deleter(interface.indexed_property_
deleter), | 589 'indexed_property_deleter': property_deleter(interface.indexed_property_
deleter), |
| 585 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, | 590 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, |
| 586 'named_property_getter': property_getter(interface.named_property_getter
, ['propertyName']), | 591 'named_property_getter': property_getter(interface.named_property_getter
, ['propertyName']), |
| 587 'named_property_setter': property_setter(interface.named_property_setter
, interface), | 592 'named_property_setter': property_setter(interface.named_property_setter
, interface), |
| 588 'named_property_deleter': property_deleter(interface.named_property_dele
ter), | 593 'named_property_deleter': property_deleter(interface.named_property_dele
ter), |
| 589 }) | 594 }) |
| 595 context.update({ |
| 596 'has_named_properties_object': is_global and context['named_property_get
ter'], |
| 597 }) |
| 590 | 598 |
| 591 return context | 599 return context |
| 592 | 600 |
| 593 | 601 |
| 594 # [DeprecateAs], [Reflect], [RuntimeEnabled] | 602 # [DeprecateAs], [Reflect], [RuntimeEnabled] |
| 595 def constant_context(constant, interface): | 603 def constant_context(constant, interface): |
| 596 extended_attributes = constant.extended_attributes | 604 extended_attributes = constant.extended_attributes |
| 597 return { | 605 return { |
| 598 'cpp_class': extended_attributes.get('PartialInterfaceImplementedAs'), | 606 'cpp_class': extended_attributes.get('PartialInterfaceImplementedAs'), |
| 599 'deprecate_as': v8_utilities.deprecate_as(constant), # [DeprecateAs] | 607 'deprecate_as': v8_utilities.deprecate_as(constant), # [DeprecateAs] |
| (...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 | 1375 |
| 1368 extended_attributes = deleter.extended_attributes | 1376 extended_attributes = deleter.extended_attributes |
| 1369 idl_type = deleter.idl_type | 1377 idl_type = deleter.idl_type |
| 1370 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1378 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1371 return { | 1379 return { |
| 1372 'is_call_with_script_state': is_call_with_script_state, | 1380 'is_call_with_script_state': is_call_with_script_state, |
| 1373 'is_custom': 'Custom' in extended_attributes, | 1381 'is_custom': 'Custom' in extended_attributes, |
| 1374 'is_raises_exception': 'RaisesException' in extended_attributes, | 1382 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1375 'name': cpp_name(deleter), | 1383 'name': cpp_name(deleter), |
| 1376 } | 1384 } |
| OLD | NEW |