| 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 system to generate | 6 """This module provides shared functionality for the system to generate |
| 7 Dart:html APIs from the IDL database.""" | 7 Dart:html APIs from the IDL database.""" |
| 8 | 8 |
| 9 import emitter | 9 import emitter |
| 10 import logging | 10 import logging |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 'svg': _svg_element_constructors, | 288 'svg': _svg_element_constructors, |
| 289 'typed_data': {}, | 289 'typed_data': {}, |
| 290 'web_audio': {}, | 290 'web_audio': {}, |
| 291 'web_gl': {}, | 291 'web_gl': {}, |
| 292 'web_sql': {}, | 292 'web_sql': {}, |
| 293 } | 293 } |
| 294 | 294 |
| 295 _factory_ctr_strings = { | 295 _factory_ctr_strings = { |
| 296 'html': { | 296 'html': { |
| 297 'provider_name': 'document', | 297 'provider_name': 'document', |
| 298 'constructor_name': '$dom_createElement' | 298 'constructor_name': 'createElement' |
| 299 }, | 299 }, |
| 300 'indexed_db': { | 300 'indexed_db': { |
| 301 'provider_name': 'document', | 301 'provider_name': 'document', |
| 302 'constructor_name': '$dom_createElement' | 302 'constructor_name': 'createElement' |
| 303 }, | 303 }, |
| 304 'svg': { | 304 'svg': { |
| 305 'provider_name': '_SvgElementFactoryProvider', | 305 'provider_name': '_SvgElementFactoryProvider', |
| 306 'constructor_name': 'createSvgElement_tag', | 306 'constructor_name': 'createSvgElement_tag', |
| 307 }, | 307 }, |
| 308 'typed_data': { | 308 'typed_data': { |
| 309 'provider_name': 'document', | 309 'provider_name': 'document', |
| 310 'constructor_name': '$dom_createElement' | 310 'constructor_name': 'createElement' |
| 311 }, | 311 }, |
| 312 'web_audio': { | 312 'web_audio': { |
| 313 'provider_name': 'document', | 313 'provider_name': 'document', |
| 314 'constructor_name': '$dom_createElement' | 314 'constructor_name': 'createElement' |
| 315 }, | 315 }, |
| 316 'web_gl': { | 316 'web_gl': { |
| 317 'provider_name': 'document', | 317 'provider_name': 'document', |
| 318 'constructor_name': '$dom_createElement' | 318 'constructor_name': 'createElement' |
| 319 }, | 319 }, |
| 320 'web_sql': { | 320 'web_sql': { |
| 321 'provider_name': 'document', | 321 'provider_name': 'document', |
| 322 'constructor_name': '$dom_createElement' | 322 'constructor_name': 'createElement' |
| 323 }, | 323 }, |
| 324 } | 324 } |
| 325 | 325 |
| 326 def ElementConstructorInfos(typename, element_constructors, | 326 def ElementConstructorInfos(typename, element_constructors, |
| 327 factory_provider_name='_Elements'): | 327 factory_provider_name='_Elements'): |
| 328 """Returns list of ElementConstructorInfos about the convenience constructors | 328 """Returns list of ElementConstructorInfos about the convenience constructors |
| 329 for an Element or SvgElement.""" | 329 for an Element or SvgElement.""" |
| 330 # TODO(sra): Handle multiple and named constructors. | 330 # TODO(sra): Handle multiple and named constructors. |
| 331 if typename not in element_constructors: | 331 if typename not in element_constructors: |
| 332 return [] | 332 return [] |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 for library_name in libraries: | 1227 for library_name in libraries: |
| 1228 self._libraries[library_name] = DartLibrary( | 1228 self._libraries[library_name] = DartLibrary( |
| 1229 library_name, template_loader, library_type, output_dir) | 1229 library_name, template_loader, library_type, output_dir) |
| 1230 | 1230 |
| 1231 def AddFile(self, basename, library_name, path): | 1231 def AddFile(self, basename, library_name, path): |
| 1232 self._libraries[library_name].AddFile(path) | 1232 self._libraries[library_name].AddFile(path) |
| 1233 | 1233 |
| 1234 def Emit(self, emitter, auxiliary_dir): | 1234 def Emit(self, emitter, auxiliary_dir): |
| 1235 for lib in self._libraries.values(): | 1235 for lib in self._libraries.values(): |
| 1236 lib.Emit(emitter, auxiliary_dir) | 1236 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |