| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 'Window.requestAnimationFrame', | 67 'Window.requestAnimationFrame', |
| 68 'Window.webkitCancelAnimationFrame', | 68 'Window.webkitCancelAnimationFrame', |
| 69 'Window.webkitRequestAnimationFrame', | 69 'Window.webkitRequestAnimationFrame', |
| 70 'WorkerContext.indexedDB', | 70 'WorkerContext.indexedDB', |
| 71 ]) | 71 ]) |
| 72 | 72 |
| 73 js_support_checks = { | 73 js_support_checks = { |
| 74 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", | 74 'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')", |
| 75 'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')", | 75 'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')", |
| 76 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", | 76 'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')", |
| 77 'HashChangeEvent': "Event._isTypeSupported('HashChangeEvent')", |
| 77 'HTMLContentElement': "Element.isTagSupported('content')", | 78 'HTMLContentElement': "Element.isTagSupported('content')", |
| 78 'HTMLDataListElement': "Element.isTagSupported('datalist')", | 79 'HTMLDataListElement': "Element.isTagSupported('datalist')", |
| 79 'HTMLDetailsElement': "Element.isTagSupported('details')", | 80 'HTMLDetailsElement': "Element.isTagSupported('details')", |
| 80 'HTMLEmbedElement': "Element.isTagSupported('embed')", | 81 'HTMLEmbedElement': "Element.isTagSupported('embed')", |
| 81 # IE creates keygen as Block elements | 82 # IE creates keygen as Block elements |
| 82 'HTMLKeygenElement': "Element.isTagSupported('keygen') " | 83 'HTMLKeygenElement': "Element.isTagSupported('keygen') " |
| 83 "&& (new Element.tag('keygen') is KeygenElement)", | 84 "&& (new Element.tag('keygen') is KeygenElement)", |
| 84 'HTMLMeterElement': "Element.isTagSupported('meter')", | 85 'HTMLMeterElement': "Element.isTagSupported('meter')", |
| 85 'HTMLObjectElement': "Element.isTagSupported('object')", | 86 'HTMLObjectElement': "Element.isTagSupported('object')", |
| 86 'HTMLOutputElement': "Element.isTagSupported('output')", | 87 'HTMLOutputElement': "Element.isTagSupported('output')", |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 for library_name in libraries: | 1050 for library_name in libraries: |
| 1050 self._libraries[library_name] = DartLibrary( | 1051 self._libraries[library_name] = DartLibrary( |
| 1051 library_name, template_loader, library_type, output_dir) | 1052 library_name, template_loader, library_type, output_dir) |
| 1052 | 1053 |
| 1053 def AddFile(self, basename, library_name, path): | 1054 def AddFile(self, basename, library_name, path): |
| 1054 self._libraries[library_name].AddFile(path) | 1055 self._libraries[library_name].AddFile(path) |
| 1055 | 1056 |
| 1056 def Emit(self, emitter, auxiliary_dir): | 1057 def Emit(self, emitter, auxiliary_dir): |
| 1057 for lib in self._libraries.values(): | 1058 for lib in self._libraries.values(): |
| 1058 lib.Emit(emitter, auxiliary_dir) | 1059 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |