| 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 os | 10 import os |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 'HTMLKeygenElement': "Element.isTagSupported('keygen') " | 78 'HTMLKeygenElement': "Element.isTagSupported('keygen') " |
| 79 "&& (new Element.tag('keygen') is KeygenElement)", | 79 "&& (new Element.tag('keygen') is KeygenElement)", |
| 80 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" | 80 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" |
| 81 "&& (new Element.tag('marquee') is MarqueeElement)", | 81 "&& (new Element.tag('marquee') is MarqueeElement)", |
| 82 'HTMLMeterElement': "Element.isTagSupported('meter')", | 82 'HTMLMeterElement': "Element.isTagSupported('meter')", |
| 83 'HTMLObjectElement': "Element.isTagSupported('object')", | 83 'HTMLObjectElement': "Element.isTagSupported('object')", |
| 84 'HTMLOutputElement': "Element.isTagSupported('output')", | 84 'HTMLOutputElement': "Element.isTagSupported('output')", |
| 85 'HTMLProgressElement': "Element.isTagSupported('progress')", | 85 'HTMLProgressElement': "Element.isTagSupported('progress')", |
| 86 'HTMLShadowElement': "Element.isTagSupported('shadow')", | 86 'HTMLShadowElement': "Element.isTagSupported('shadow')", |
| 87 'HTMLTrackElement': "Element.isTagSupported('track')", | 87 'HTMLTrackElement': "Element.isTagSupported('track')", |
| 88 'Performance': "JS('bool', '!!(window.performance)')", |
| 88 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", | 89 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", |
| 89 } | 90 } |
| 90 | 91 |
| 91 # Classes that offer only static methods, and therefore we should suppress | 92 # Classes that offer only static methods, and therefore we should suppress |
| 92 # constructor creation. | 93 # constructor creation. |
| 93 _static_classes = set(['Url']) | 94 _static_classes = set(['Url']) |
| 94 | 95 |
| 95 # Information for generating element constructors. | 96 # Information for generating element constructors. |
| 96 # | 97 # |
| 97 # TODO(sra): maybe remove all the argument complexity and use cascades. | 98 # TODO(sra): maybe remove all the argument complexity and use cascades. |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 for library_name in libraries: | 1036 for library_name in libraries: |
| 1036 self._libraries[library_name] = DartLibrary( | 1037 self._libraries[library_name] = DartLibrary( |
| 1037 library_name, template_loader, library_type, output_dir) | 1038 library_name, template_loader, library_type, output_dir) |
| 1038 | 1039 |
| 1039 def AddFile(self, basename, library_name, path): | 1040 def AddFile(self, basename, library_name, path): |
| 1040 self._libraries[library_name].AddFile(path) | 1041 self._libraries[library_name].AddFile(path) |
| 1041 | 1042 |
| 1042 def Emit(self, emitter, auxiliary_dir): | 1043 def Emit(self, emitter, auxiliary_dir): |
| 1043 for lib in self._libraries.values(): | 1044 for lib in self._libraries.values(): |
| 1044 lib.Emit(emitter, auxiliary_dir) | 1045 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |