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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 'Window.location', | 63 'Window.location', |
64 'Window.open', | 64 'Window.open', |
65 'Window.requestAnimationFrame', | 65 'Window.requestAnimationFrame', |
66 'Window.webkitCancelAnimationFrame', | 66 'Window.webkitCancelAnimationFrame', |
67 'Window.webkitRequestAnimationFrame', | 67 'Window.webkitRequestAnimationFrame', |
68 'WorkerContext.indexedDB', | 68 'WorkerContext.indexedDB', |
69 ]) | 69 ]) |
70 | 70 |
71 js_support_checks = { | 71 js_support_checks = { |
72 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", | 72 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", |
73 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", | |
74 'HTMLContentElement': "Element.isTagSupported('content')", | 73 'HTMLContentElement': "Element.isTagSupported('content')", |
75 'HTMLDataListElement': "Element.isTagSupported('datalist')", | 74 'HTMLDataListElement': "Element.isTagSupported('datalist')", |
76 'HTMLDetailsElement': "Element.isTagSupported('details')", | 75 'HTMLDetailsElement': "Element.isTagSupported('details')", |
77 'HTMLEmbedElement': "Element.isTagSupported('embed')", | 76 'HTMLEmbedElement': "Element.isTagSupported('embed')", |
78 # IE creates keygen as Block elements | 77 # IE creates keygen as Block elements |
79 'HTMLKeygenElement': "Element.isTagSupported('keygen') " | 78 'HTMLKeygenElement': "Element.isTagSupported('keygen') " |
80 "&& (new Element.tag('keygen') is KeygenElement)", | 79 "&& (new Element.tag('keygen') is KeygenElement)", |
81 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" | 80 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" |
82 "&& (new Element.tag('marquee') is MarqueeElement)", | 81 "&& (new Element.tag('marquee') is MarqueeElement)", |
83 'HTMLMeterElement': "Element.isTagSupported('meter')", | 82 'HTMLMeterElement': "Element.isTagSupported('meter')", |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 for library_name in libraries: | 1036 for library_name in libraries: |
1038 self._libraries[library_name] = DartLibrary( | 1037 self._libraries[library_name] = DartLibrary( |
1039 library_name, template_loader, library_type, output_dir) | 1038 library_name, template_loader, library_type, output_dir) |
1040 | 1039 |
1041 def AddFile(self, basename, library_name, path): | 1040 def AddFile(self, basename, library_name, path): |
1042 self._libraries[library_name].AddFile(path) | 1041 self._libraries[library_name].AddFile(path) |
1043 | 1042 |
1044 def Emit(self, emitter, auxiliary_dir): | 1043 def Emit(self, emitter, auxiliary_dir): |
1045 for lib in self._libraries.values(): | 1044 for lib in self._libraries.values(): |
1046 lib.Emit(emitter, auxiliary_dir) | 1045 lib.Emit(emitter, auxiliary_dir) |
OLD | NEW |