| 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 monitored | 10 import monitored |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 'SVGTSpanElement': 'tspan', | 253 'SVGTSpanElement': 'tspan', |
| 254 'SVGUseElement': 'use', | 254 'SVGUseElement': 'use', |
| 255 'SVGViewElement': 'view', | 255 'SVGViewElement': 'view', |
| 256 'SVGVKernElement': 'vkern', | 256 'SVGVKernElement': 'vkern', |
| 257 }) | 257 }) |
| 258 | 258 |
| 259 _element_constructors = { | 259 _element_constructors = { |
| 260 'html': _html_element_constructors, | 260 'html': _html_element_constructors, |
| 261 'indexed_db': {}, | 261 'indexed_db': {}, |
| 262 'svg': _svg_element_constructors, | 262 'svg': _svg_element_constructors, |
| 263 'typeddata': {}, |
| 263 'web_audio': {}, | 264 'web_audio': {}, |
| 264 'web_sql': {}, | 265 'web_sql': {}, |
| 265 } | 266 } |
| 266 | 267 |
| 267 _factory_ctr_strings = { | 268 _factory_ctr_strings = { |
| 268 'html': { | 269 'html': { |
| 269 'provider_name': 'document', | 270 'provider_name': 'document', |
| 270 'constructor_name': '$dom_createElement' | 271 'constructor_name': '$dom_createElement' |
| 271 }, | 272 }, |
| 272 'indexed_db': { | 273 'indexed_db': { |
| 273 'provider_name': 'document', | 274 'provider_name': 'document', |
| 274 'constructor_name': '$dom_createElement' | 275 'constructor_name': '$dom_createElement' |
| 275 }, | 276 }, |
| 276 'svg': { | 277 'svg': { |
| 277 'provider_name': '_SvgElementFactoryProvider', | 278 'provider_name': '_SvgElementFactoryProvider', |
| 278 'constructor_name': 'createSvgElement_tag', | 279 'constructor_name': 'createSvgElement_tag', |
| 279 }, | 280 }, |
| 281 'typeddata': { |
| 282 'provider_name': 'document', |
| 283 'constructor_name': '$dom_createElement' |
| 284 }, |
| 280 'web_audio': { | 285 'web_audio': { |
| 281 'provider_name': 'document', | 286 'provider_name': 'document', |
| 282 'constructor_name': '$dom_createElement' | 287 'constructor_name': '$dom_createElement' |
| 283 }, | 288 }, |
| 284 'web_sql': { | 289 'web_sql': { |
| 285 'provider_name': 'document', | 290 'provider_name': 'document', |
| 286 'constructor_name': '$dom_createElement' | 291 'constructor_name': '$dom_createElement' |
| 287 }, | 292 }, |
| 288 } | 293 } |
| 289 | 294 |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 for library_name in libraries: | 1142 for library_name in libraries: |
| 1138 self._libraries[library_name] = DartLibrary( | 1143 self._libraries[library_name] = DartLibrary( |
| 1139 library_name, template_loader, library_type, output_dir) | 1144 library_name, template_loader, library_type, output_dir) |
| 1140 | 1145 |
| 1141 def AddFile(self, basename, library_name, path): | 1146 def AddFile(self, basename, library_name, path): |
| 1142 self._libraries[library_name].AddFile(path) | 1147 self._libraries[library_name].AddFile(path) |
| 1143 | 1148 |
| 1144 def Emit(self, emitter, auxiliary_dir): | 1149 def Emit(self, emitter, auxiliary_dir): |
| 1145 for lib in self._libraries.values(): | 1150 for lib in self._libraries.values(): |
| 1146 lib.Emit(emitter, auxiliary_dir) | 1151 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |