| 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 systems to generate | 6 """This module provides shared functionality for systems to generate |
| 7 Dart APIs from the IDL database.""" | 7 Dart APIs from the IDL database.""" |
| 8 | 8 |
| 9 import copy | 9 import copy |
| 10 import json | 10 import json |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 'WebGLLoseContext': 'WebGLLoseContext,WebGLExtensionLoseContext', | 156 'WebGLLoseContext': 'WebGLLoseContext,WebGLExtensionLoseContext', |
| 157 | 157 |
| 158 'CSSKeyframeRule': | 158 'CSSKeyframeRule': |
| 159 'CSSKeyframeRule,MozCSSKeyframeRule,WebKitCSSKeyframeRule', | 159 'CSSKeyframeRule,MozCSSKeyframeRule,WebKitCSSKeyframeRule', |
| 160 | 160 |
| 161 'CSSKeyframesRule': | 161 'CSSKeyframesRule': |
| 162 'CSSKeyframesRule,MozCSSKeyframesRule,WebKitCSSKeyframesRule', | 162 'CSSKeyframesRule,MozCSSKeyframesRule,WebKitCSSKeyframesRule', |
| 163 | 163 |
| 164 'WheelEvent': 'WheelEvent,MouseWheelEvent,MouseScrollEvent', | 164 'WheelEvent': 'WheelEvent,MouseWheelEvent,MouseScrollEvent', |
| 165 | 165 |
| 166 'XMLHttpRequestUpload': 'XMLHttpRequestUpload,XMLHttpRequestEventTarget', | |
| 167 | |
| 168 }, dart2jsOnly=True) | 166 }, dart2jsOnly=True) |
| 169 | 167 |
| 170 def IsRegisteredType(type_name): | 168 def IsRegisteredType(type_name): |
| 171 return type_name in _idl_type_registry | 169 return type_name in _idl_type_registry |
| 172 | 170 |
| 173 def MakeNativeSpec(javascript_binding_name): | 171 def MakeNativeSpec(javascript_binding_name): |
| 174 if javascript_binding_name in _dart2js_dom_custom_native_specs: | 172 if javascript_binding_name in _dart2js_dom_custom_native_specs: |
| 175 return _dart2js_dom_custom_native_specs[javascript_binding_name] | 173 return _dart2js_dom_custom_native_specs[javascript_binding_name] |
| 176 else: | 174 else: |
| 177 # Make the class 'hidden' so it is dynamically patched at runtime. This | 175 # Make the class 'hidden' so it is dynamically patched at runtime. This |
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 if type_data.clazz == 'BasicTypedList': | 1271 if type_data.clazz == 'BasicTypedList': |
| 1274 if type_name == 'ArrayBuffer': | 1272 if type_name == 'ArrayBuffer': |
| 1275 dart_interface_name = 'ByteBuffer' | 1273 dart_interface_name = 'ByteBuffer' |
| 1276 else: | 1274 else: |
| 1277 dart_interface_name = self._renamer.RenameInterfaceId(type_name) | 1275 dart_interface_name = self._renamer.RenameInterfaceId(type_name) |
| 1278 return BasicTypedListIDLTypeInfo( | 1276 return BasicTypedListIDLTypeInfo( |
| 1279 type_name, type_data, dart_interface_name, self) | 1277 type_name, type_data, dart_interface_name, self) |
| 1280 | 1278 |
| 1281 class_name = '%sIDLTypeInfo' % type_data.clazz | 1279 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1282 return globals()[class_name](type_name, type_data) | 1280 return globals()[class_name](type_name, type_data) |
| OLD | NEW |