| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " | 413 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " |
| 414 "window.webkitSpeechRecognition)')", | 414 "window.webkitSpeechRecognition)')", |
| 415 'SVGExternalResourcesRequired': ('supported(SvgElement element)', | 415 'SVGExternalResourcesRequired': ('supported(SvgElement element)', |
| 416 "JS('bool', '#.externalResourcesRequired !== undefined && " | 416 "JS('bool', '#.externalResourcesRequired !== undefined && " |
| 417 "#.externalResourcesRequired.animVal !== undefined', " | 417 "#.externalResourcesRequired.animVal !== undefined', " |
| 418 "element, element)"), | 418 "element, element)"), |
| 419 'SVGLangSpace': ('supported(SvgElement element)', | 419 'SVGLangSpace': ('supported(SvgElement element)', |
| 420 "JS('bool', '#.xmlspace !== undefined && #.xmllang !== undefined', " | 420 "JS('bool', '#.xmlspace !== undefined && #.xmllang !== undefined', " |
| 421 "element, element)"), | 421 "element, element)"), |
| 422 'TouchList': "JS('bool', '!!document.createTouchList')", | 422 'TouchList': "JS('bool', '!!document.createTouchList')", |
| 423 'XMLHttpRequestProgressEvent': | |
| 424 "Device.isEventTypeSupported('XMLHttpRequestProgressEvent')", | |
| 425 'WebGLRenderingContext': "JS('bool', '!!(window.WebGLRenderingContext)')", | 423 'WebGLRenderingContext': "JS('bool', '!!(window.WebGLRenderingContext)')", |
| 426 'WebKitPoint': "JS('bool', '!!(window.WebKitPoint)')", | 424 'WebKitPoint': "JS('bool', '!!(window.WebKitPoint)')", |
| 427 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", | 425 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", |
| 428 'Worker': "JS('bool', '(typeof window.Worker != \"undefined\")')", | 426 'Worker': "JS('bool', '(typeof window.Worker != \"undefined\")')", |
| 429 'XSLTProcessor': "JS('bool', '!!(window.XSLTProcessor)')", | 427 'XSLTProcessor': "JS('bool', '!!(window.XSLTProcessor)')", |
| 430 }.items() + | 428 }.items() + |
| 431 dict((key, | 429 dict((key, |
| 432 SvgSupportStr(_svg_element_constructors[key]) if key.startswith('SVG') | 430 SvgSupportStr(_svg_element_constructors[key]) if key.startswith('SVG') |
| 433 else ElemSupportStr(_html_element_constructors[key])) for key in | 431 else ElemSupportStr(_html_element_constructors[key])) for key in |
| 434 _js_support_checks_basic_element_with_constructors + | 432 _js_support_checks_basic_element_with_constructors + |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 for library_name in libraries: | 1225 for library_name in libraries: |
| 1228 self._libraries[library_name] = DartLibrary( | 1226 self._libraries[library_name] = DartLibrary( |
| 1229 library_name, template_loader, library_type, output_dir) | 1227 library_name, template_loader, library_type, output_dir) |
| 1230 | 1228 |
| 1231 def AddFile(self, basename, library_name, path): | 1229 def AddFile(self, basename, library_name, path): |
| 1232 self._libraries[library_name].AddFile(path) | 1230 self._libraries[library_name].AddFile(path) |
| 1233 | 1231 |
| 1234 def Emit(self, emitter, auxiliary_dir): | 1232 def Emit(self, emitter, auxiliary_dir): |
| 1235 for lib in self._libraries.values(): | 1233 for lib in self._libraries.values(): |
| 1236 lib.Emit(emitter, auxiliary_dir) | 1234 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |