OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 # [CustomElementCallbacks], [Reflect] | 68 # [CustomElementCallbacks], [Reflect] |
69 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s | 69 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s |
70 is_reflect = 'Reflect' in extended_attributes | 70 is_reflect = 'Reflect' in extended_attributes |
71 if is_custom_element_callbacks or is_reflect: | 71 if is_custom_element_callbacks or is_reflect: |
72 includes.add('core/dom/custom/CustomElementCallbackDispatcher.h') | 72 includes.add('core/dom/custom/CustomElementCallbackDispatcher.h') |
73 # [RaisesException], [RaisesException=Setter] | 73 # [RaisesException], [RaisesException=Setter] |
74 is_setter_raises_exception = ( | 74 is_setter_raises_exception = ( |
75 'RaisesException' in extended_attributes and | 75 'RaisesException' in extended_attributes and |
76 extended_attributes['RaisesException'] in [None, 'Setter']) | 76 extended_attributes['RaisesException'] in [None, 'Setter']) |
77 # [StrictTypeChecking] | 77 # [DartStrictTypeChecking] |
78 has_strict_type_checking = ( | 78 has_strict_type_checking = ( |
79 ('StrictTypeChecking' in extended_attributes or | 79 ('DartStrictTypeChecking' in extended_attributes or |
80 'StrictTypeChecking' in interface.extended_attributes) and | 80 'DartStrictTypeChecking' in interface.extended_attributes) and |
81 idl_type.is_wrapper_type) | 81 idl_type.is_wrapper_type) |
82 | 82 |
83 if (base_idl_type == 'EventHandler' and | 83 if (base_idl_type == 'EventHandler' and |
84 interface.name in ['Window', 'WorkerGlobalScope'] and | 84 interface.name in ['Window', 'WorkerGlobalScope'] and |
85 attribute.name == 'onerror'): | 85 attribute.name == 'onerror'): |
86 includes.add('bindings/v8/V8ErrorHandler.h') | 86 includes.add('bindings/v8/V8ErrorHandler.h') |
87 | 87 |
88 is_auto_scope = not 'DartNoAutoScope' in extended_attributes | 88 is_auto_scope = not 'DartNoAutoScope' in extended_attributes |
89 contents = { | 89 contents = { |
90 'access_control_list': access_control_list(attribute), | 90 'access_control_list': access_control_list(attribute), |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 lambda self: DartUtilities.strip_suffix(self.base_type, 'Constructor')) | 463 lambda self: DartUtilities.strip_suffix(self.base_type, 'Constructor')) |
464 | 464 |
465 | 465 |
466 def is_constructor_attribute(attribute): | 466 def is_constructor_attribute(attribute): |
467 # FIXME: replace this with [ConstructorAttribute] extended attribute | 467 # FIXME: replace this with [ConstructorAttribute] extended attribute |
468 return attribute.idl_type.base_type.endswith('Constructor') | 468 return attribute.idl_type.base_type.endswith('Constructor') |
469 | 469 |
470 | 470 |
471 def generate_constructor_getter(interface, attribute, contents): | 471 def generate_constructor_getter(interface, attribute, contents): |
472 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 472 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
OLD | NEW |