Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: tools/dom/scripts/generator.py

Issue 235573006: Validate native tags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698