| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 is_document = inherits_interface(interface.name, 'Document') | 86 is_document = inherits_interface(interface.name, 'Document') |
| 87 if is_document: | 87 if is_document: |
| 88 includes.update(['bindings/v8/ScriptController.h', | 88 includes.update(['bindings/v8/ScriptController.h', |
| 89 'bindings/v8/V8WindowShell.h', | 89 'bindings/v8/V8WindowShell.h', |
| 90 'core/frame/LocalFrame.h']) | 90 'core/frame/LocalFrame.h']) |
| 91 | 91 |
| 92 # [ActiveDOMObject] | 92 # [ActiveDOMObject] |
| 93 is_active_dom_object = 'ActiveDOMObject' in extended_attributes | 93 is_active_dom_object = 'ActiveDOMObject' in extended_attributes |
| 94 | 94 |
| 95 # [CheckSecurity] | 95 # [CheckSecurity=Frame] |
| 96 is_check_security = 'CheckSecurity' in extended_attributes | 96 is_check_security_for_frame = has_extended_attribute_value( |
| 97 if is_check_security: | 97 interface, 'CheckSecurity', 'Frame') |
| 98 if is_check_security_for_frame: |
| 98 includes.add('bindings/v8/BindingSecurity.h') | 99 includes.add('bindings/v8/BindingSecurity.h') |
| 99 | 100 |
| 100 # [DependentLifetime] | 101 # [DependentLifetime] |
| 101 is_dependent_lifetime = 'DependentLifetime' in extended_attributes | 102 is_dependent_lifetime = 'DependentLifetime' in extended_attributes |
| 102 | 103 |
| 103 # [MeasureAs] | 104 # [MeasureAs] |
| 104 is_measure_as = 'MeasureAs' in extended_attributes | 105 is_measure_as = 'MeasureAs' in extended_attributes |
| 105 if is_measure_as: | 106 if is_measure_as: |
| 106 includes.add('core/frame/UseCounter.h') | 107 includes.add('core/frame/UseCounter.h') |
| 107 | 108 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 'cpp_class': cpp_name(interface), | 147 'cpp_class': cpp_name(interface), |
| 147 'gc_type': this_gc_type, | 148 'gc_type': this_gc_type, |
| 148 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter
face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] | 149 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter
face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] |
| 149 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'T
oV8'), # [Custom=ToV8] | 150 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'T
oV8'), # [Custom=ToV8] |
| 150 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr
ap'), # [Custom=Wrap] | 151 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr
ap'), # [Custom=Wrap] |
| 151 'has_visit_dom_wrapper': has_visit_dom_wrapper, | 152 'has_visit_dom_wrapper': has_visit_dom_wrapper, |
| 152 'header_includes': header_includes, | 153 'header_includes': header_includes, |
| 153 'interface_name': interface.name, | 154 'interface_name': interface.name, |
| 154 'is_active_dom_object': is_active_dom_object, | 155 'is_active_dom_object': is_active_dom_object, |
| 155 'is_audio_buffer': is_audio_buffer, | 156 'is_audio_buffer': is_audio_buffer, |
| 156 'is_check_security': is_check_security, | 157 'is_check_security_for_frame': is_check_security_for_frame, |
| 157 'is_dependent_lifetime': is_dependent_lifetime, | 158 'is_dependent_lifetime': is_dependent_lifetime, |
| 158 'is_document': is_document, | 159 'is_document': is_document, |
| 159 'is_event_target': inherits_interface(interface.name, 'EventTarget'), | 160 'is_event_target': inherits_interface(interface.name, 'EventTarget'), |
| 160 'is_exception': interface.is_exception, | 161 'is_exception': interface.is_exception, |
| 161 'is_node': inherits_interface(interface.name, 'Node'), | 162 'is_node': inherits_interface(interface.name, 'Node'), |
| 162 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] | 163 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] |
| 163 'parent_interface': parent_interface, | 164 'parent_interface': parent_interface, |
| 164 'pass_cpp_type': cpp_template_type( | 165 'pass_cpp_type': cpp_template_type( |
| 165 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type), | 166 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type), |
| 166 cpp_name(interface)), | 167 cpp_name(interface)), |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 deleter = next( | 1092 deleter = next( |
| 1092 method | 1093 method |
| 1093 for method in interface.operations | 1094 for method in interface.operations |
| 1094 if ('deleter' in method.specials and | 1095 if ('deleter' in method.specials and |
| 1095 len(method.arguments) == 1 and | 1096 len(method.arguments) == 1 and |
| 1096 str(method.arguments[0].idl_type) == 'DOMString')) | 1097 str(method.arguments[0].idl_type) == 'DOMString')) |
| 1097 except StopIteration: | 1098 except StopIteration: |
| 1098 return None | 1099 return None |
| 1099 | 1100 |
| 1100 return property_deleter(deleter) | 1101 return property_deleter(deleter) |
| OLD | NEW |