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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", | 73 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", |
74 'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')", | 74 'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')", |
75 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", | 75 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", |
76 'HTMLContentElement': "Element.isTagSupported('content')", | 76 'HTMLContentElement': "Element.isTagSupported('content')", |
77 'HTMLDataListElement': "Element.isTagSupported('datalist')", | 77 'HTMLDataListElement': "Element.isTagSupported('datalist')", |
78 'HTMLDetailsElement': "Element.isTagSupported('details')", | 78 'HTMLDetailsElement': "Element.isTagSupported('details')", |
79 'HTMLEmbedElement': "Element.isTagSupported('embed')", | 79 'HTMLEmbedElement': "Element.isTagSupported('embed')", |
80 # IE creates keygen as Block elements | 80 # IE creates keygen as Block elements |
81 'HTMLKeygenElement': "Element.isTagSupported('keygen') " | 81 'HTMLKeygenElement': "Element.isTagSupported('keygen') " |
82 "&& (new Element.tag('keygen') is KeygenElement)", | 82 "&& (new Element.tag('keygen') is KeygenElement)", |
83 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" | |
84 "&& (new Element.tag('marquee') is MarqueeElement)", | |
85 'HTMLMeterElement': "Element.isTagSupported('meter')", | 83 'HTMLMeterElement': "Element.isTagSupported('meter')", |
86 'HTMLObjectElement': "Element.isTagSupported('object')", | 84 'HTMLObjectElement': "Element.isTagSupported('object')", |
87 'HTMLOutputElement': "Element.isTagSupported('output')", | 85 'HTMLOutputElement': "Element.isTagSupported('output')", |
88 'HTMLProgressElement': "Element.isTagSupported('progress')", | 86 'HTMLProgressElement': "Element.isTagSupported('progress')", |
89 'HTMLShadowElement': "Element.isTagSupported('shadow')", | 87 'HTMLShadowElement': "Element.isTagSupported('shadow')", |
90 'HTMLTrackElement': "Element.isTagSupported('track')", | 88 'HTMLTrackElement': "Element.isTagSupported('track')", |
91 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", | 89 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", |
92 'Performance': "JS('bool', '!!(window.performance)')", | 90 'Performance': "JS('bool', '!!(window.performance)')", |
93 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", | 91 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", |
94 } | 92 } |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 for library_name in libraries: | 1046 for library_name in libraries: |
1049 self._libraries[library_name] = DartLibrary( | 1047 self._libraries[library_name] = DartLibrary( |
1050 library_name, template_loader, library_type, output_dir) | 1048 library_name, template_loader, library_type, output_dir) |
1051 | 1049 |
1052 def AddFile(self, basename, library_name, path): | 1050 def AddFile(self, basename, library_name, path): |
1053 self._libraries[library_name].AddFile(path) | 1051 self._libraries[library_name].AddFile(path) |
1054 | 1052 |
1055 def Emit(self, emitter, auxiliary_dir): | 1053 def Emit(self, emitter, auxiliary_dir): |
1056 for lib in self._libraries.values(): | 1054 for lib in self._libraries.values(): |
1057 lib.Emit(emitter, auxiliary_dir) | 1055 lib.Emit(emitter, auxiliary_dir) |
OLD | NEW |