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)')", |
73 'HTMLContentElement': "Element.isTagSupported('content')", | 74 'HTMLContentElement': "Element.isTagSupported('content')", |
74 'HTMLDataListElement': "Element.isTagSupported('datalist')", | 75 'HTMLDataListElement': "Element.isTagSupported('datalist')", |
75 'HTMLDetailsElement': "Element.isTagSupported('details')", | 76 'HTMLDetailsElement': "Element.isTagSupported('details')", |
76 'HTMLEmbedElement': "Element.isTagSupported('embed')", | 77 'HTMLEmbedElement': "Element.isTagSupported('embed')", |
77 # IE creates keygen as Block elements | 78 # IE creates keygen as Block elements |
78 'HTMLKeygenElement': "Element.isTagSupported('keygen') " | 79 'HTMLKeygenElement': "Element.isTagSupported('keygen') " |
79 "&& (new Element.tag('keygen') is KeygenElement)", | 80 "&& (new Element.tag('keygen') is KeygenElement)", |
80 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" | 81 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" |
81 "&& (new Element.tag('marquee') is MarqueeElement)", | 82 "&& (new Element.tag('marquee') is MarqueeElement)", |
82 'HTMLMeterElement': "Element.isTagSupported('meter')", | 83 'HTMLMeterElement': "Element.isTagSupported('meter')", |
(...skipping 952 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 |