| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } for constructor in interface.custom_constructors] | 292 } for constructor in interface.custom_constructors] |
| 293 | 293 |
| 294 # [HTMLConstructor] | 294 # [HTMLConstructor] |
| 295 has_html_constructor = 'HTMLConstructor' in extended_attributes | 295 has_html_constructor = 'HTMLConstructor' in extended_attributes |
| 296 # https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors | 296 # https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors |
| 297 if has_html_constructor: | 297 if has_html_constructor: |
| 298 if ('Constructor' in extended_attributes) or ('NoInterfaceObject' in ext
ended_attributes): | 298 if ('Constructor' in extended_attributes) or ('NoInterfaceObject' in ext
ended_attributes): |
| 299 raise Exception('[Constructor] and [NoInterfaceObject] MUST NOT be' | 299 raise Exception('[Constructor] and [NoInterfaceObject] MUST NOT be' |
| 300 ' specified with [HTMLConstructor]: ' | 300 ' specified with [HTMLConstructor]: ' |
| 301 '%s' % interface.name) | 301 '%s' % interface.name) |
| 302 includes.add('bindings/core/v8/V8HTMLConstructor.h') |
| 302 | 303 |
| 303 # [NamedConstructor] | 304 # [NamedConstructor] |
| 304 named_constructor = named_constructor_context(interface) | 305 named_constructor = named_constructor_context(interface) |
| 305 | 306 |
| 306 if constructors or custom_constructors or has_html_constructor or named_cons
tructor: | 307 if constructors or custom_constructors or named_constructor: |
| 307 if interface.is_partial: | 308 if interface.is_partial: |
| 308 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' | 309 raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' |
| 309 ' specified on partial interface definitions: ' | 310 ' specified on partial interface definitions: ' |
| 310 '%s' % interface.name) | 311 '%s' % interface.name) |
| 311 | 312 |
| 312 includes.add('bindings/core/v8/V8ObjectConstructor.h') | 313 includes.add('bindings/core/v8/V8ObjectConstructor.h') |
| 313 includes.add('core/frame/LocalDOMWindow.h') | 314 includes.add('core/frame/LocalDOMWindow.h') |
| 314 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: | 315 elif 'Measure' in extended_attributes or 'MeasureAs' in extended_attributes: |
| 315 if not interface.is_partial: | 316 if not interface.is_partial: |
| 316 raise Exception('[Measure] or [MeasureAs] specified for interface wi
thout a constructor: ' | 317 raise Exception('[Measure] or [MeasureAs] specified for interface wi
thout a constructor: ' |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1449 extended_attributes = deleter.extended_attributes | 1450 extended_attributes = deleter.extended_attributes |
| 1450 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1451 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1451 is_ce_reactions = 'CEReactions' in extended_attributes | 1452 is_ce_reactions = 'CEReactions' in extended_attributes |
| 1452 return { | 1453 return { |
| 1453 'is_call_with_script_state': is_call_with_script_state, | 1454 'is_call_with_script_state': is_call_with_script_state, |
| 1454 'is_ce_reactions': is_ce_reactions, | 1455 'is_ce_reactions': is_ce_reactions, |
| 1455 'is_custom': 'Custom' in extended_attributes, | 1456 'is_custom': 'Custom' in extended_attributes, |
| 1456 'is_raises_exception': 'RaisesException' in extended_attributes, | 1457 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1457 'name': cpp_name(deleter), | 1458 'name': cpp_name(deleter), |
| 1458 } | 1459 } |
| OLD | NEW |