| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """This module provides shared functionality for the systems to generate | 6 """This module provides shared functionality for the systems to generate |
| 7 native binding from the IDL database.""" | 7 native binding from the IDL database.""" |
| 8 | 8 |
| 9 import emitter | 9 import emitter |
| 10 import os | 10 import os |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 _cpp_import_map = { | 126 _cpp_import_map = { |
| 127 'ImageBitmapFactories' : 'modules/imagebitmap/ImageBitmapFactories', | 127 'ImageBitmapFactories' : 'modules/imagebitmap/ImageBitmapFactories', |
| 128 'ScreenOrientation' : 'modules/screen_orientation/ScreenOrientation' | 128 'ScreenOrientation' : 'modules/screen_orientation/ScreenOrientation' |
| 129 } | 129 } |
| 130 | 130 |
| 131 _cpp_overloaded_callback_map = { | 131 _cpp_overloaded_callback_map = { |
| 132 ('DOMURL', 'createObjectUrlFromSourceCallback'): 'URLMediaSource', | 132 ('DOMURL', 'createObjectUrlFromSourceCallback'): 'URLMediaSource', |
| 133 ('DOMURL', 'createObjectUrlFromStreamCallback'): 'URLMediaStream', | 133 ('DOMURL', 'createObjectUrlFromStreamCallback'): 'URLMediaStream', |
| 134 ('DOMURL', '_createObjectUrlFromWebKitSourceCallback'): 'URLMediaSource', | 134 ('DOMURL', '_createObjectUrlFromWebKitSourceCallback'): 'URLMediaSource', |
| 135 ('DOMURL', '_createObjectURL_2Callback'): 'URLMediaSource', | 135 ('DOMURL', '_createObjectURL_2Callback'): 'URLMediaSource', |
| 136 ('DOMURL', '_createObjectURL_3Callback'): 'URLMediaSource', | 136 ('DOMURL', '_createObjectURL_3Callback'): 'URLMediaStream', |
| 137 ('DOMURL', '_createObjectURL_4Callback'): 'URLMediaStream', | |
| 138 } | 137 } |
| 139 | 138 |
| 140 _cpp_partial_map = {} | 139 _cpp_partial_map = {} |
| 141 | 140 |
| 142 _cpp_no_auto_scope_list = set([ | 141 _cpp_no_auto_scope_list = set([ |
| 143 ('Document', 'body', 'Getter'), | 142 ('Document', 'body', 'Getter'), |
| 144 ('Document', 'getElementById', 'Callback'), | 143 ('Document', 'getElementById', 'Callback'), |
| 145 ('Document', 'getElementsByName', 'Callback'), | 144 ('Document', 'getElementsByName', 'Callback'), |
| 146 ('Document', 'getElementsByTagName', 'Callback'), | 145 ('Document', 'getElementsByTagName', 'Callback'), |
| 147 ('Element', 'getAttribute', 'Callback'), | 146 ('Element', 'getAttribute', 'Callback'), |
| (...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 e.Emit("};\n"); | 1781 e.Emit("};\n"); |
| 1783 e.Emit('\n'); | 1782 e.Emit('\n'); |
| 1784 e.Emit('} // namespace WebCore\n'); | 1783 e.Emit('} // namespace WebCore\n'); |
| 1785 | 1784 |
| 1786 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): | 1785 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): |
| 1787 return ( | 1786 return ( |
| 1788 interface.id.endswith('Event') and | 1787 interface.id.endswith('Event') and |
| 1789 operation.id.startswith('init') and | 1788 operation.id.startswith('init') and |
| 1790 argument.ext_attrs.get('Default') == 'Undefined' and | 1789 argument.ext_attrs.get('Default') == 'Undefined' and |
| 1791 argument.type.id == 'DOMString') | 1790 argument.type.id == 'DOMString') |
| OLD | NEW |