| 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 28 matching lines...) Expand all Loading... |
| 39 'Console.trace', | 39 'Console.trace', |
| 40 'Console.warn', | 40 'Console.warn', |
| 41 'CSSStyleDeclaration.setProperty', | 41 'CSSStyleDeclaration.setProperty', |
| 42 'Element.insertAdjacentElement', | 42 'Element.insertAdjacentElement', |
| 43 'Element.insertAdjacentHTML', | 43 'Element.insertAdjacentHTML', |
| 44 'Element.insertAdjacentText', | 44 'Element.insertAdjacentText', |
| 45 'Element.webkitMatchesSelector', | 45 'Element.webkitMatchesSelector', |
| 46 'Element.remove', | 46 'Element.remove', |
| 47 'ElementEvents.mouseWheel', | 47 'ElementEvents.mouseWheel', |
| 48 'DOMException.name', | 48 'DOMException.name', |
| 49 'HTMLCanvasElement.getContext', | |
| 50 'HTMLTableElement.createTBody', | 49 'HTMLTableElement.createTBody', |
| 51 'IDBDatabase.transaction', | 50 'IDBDatabase.transaction', |
| 52 'KeyboardEvent.initKeyboardEvent', | 51 'KeyboardEvent.initKeyboardEvent', |
| 53 'MouseEvent.offsetX', | 52 'MouseEvent.offsetX', |
| 54 'MouseEvent.offsetY', | 53 'MouseEvent.offsetY', |
| 55 'Navigator.language', | 54 'Navigator.language', |
| 56 'Navigator.webkitGetUserMedia', | 55 'Navigator.webkitGetUserMedia', |
| 57 'URL.createObjectURL', | 56 'URL.createObjectURL', |
| 58 'URL.revokeObjectURL', | 57 'URL.revokeObjectURL', |
| 59 'WheelEvent.wheelDeltaX', | 58 'WheelEvent.wheelDeltaX', |
| (...skipping 30 matching lines...) Expand all Loading... |
| 90 'HTMLShadowElement': "Element.isTagSupported('shadow')", | 89 'HTMLShadowElement': "Element.isTagSupported('shadow')", |
| 91 'HTMLTrackElement': "Element.isTagSupported('track')", | 90 'HTMLTrackElement': "Element.isTagSupported('track')", |
| 92 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')", | 91 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')", |
| 93 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')", | 92 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')", |
| 94 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", | 93 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", |
| 95 'Performance': "JS('bool', '!!(window.performance)')", | 94 'Performance': "JS('bool', '!!(window.performance)')", |
| 96 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " | 95 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || " |
| 97 "window.webkitSpeechRecognition)')", | 96 "window.webkitSpeechRecognition)')", |
| 98 'XMLHttpRequestProgressEvent': | 97 'XMLHttpRequestProgressEvent': |
| 99 "Event._isTypeSupported('XMLHttpRequestProgressEvent')", | 98 "Event._isTypeSupported('XMLHttpRequestProgressEvent')", |
| 99 'WebGLRenderingContext': "JS('bool', '!!(window.WebGLRenderingContext)')", |
| 100 'WebKitCSSMatrix': "JS('bool', '!!(window.WebKitCSSMatrix)')", | 100 'WebKitCSSMatrix': "JS('bool', '!!(window.WebKitCSSMatrix)')", |
| 101 'WebKitPoint': "JS('bool', '!!(window.WebKitPoint)')", | 101 'WebKitPoint': "JS('bool', '!!(window.WebKitPoint)')", |
| 102 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", | 102 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", |
| 103 'XSLTProcessor': "JS('bool', '!!(window.XSLTProcessor)')", | 103 'XSLTProcessor': "JS('bool', '!!(window.XSLTProcessor)')", |
| 104 } | 104 } |
| 105 | 105 |
| 106 # Classes that offer only static methods, and therefore we should suppress | 106 # Classes that offer only static methods, and therefore we should suppress |
| 107 # constructor creation. | 107 # constructor creation. |
| 108 _static_classes = set(['Url']) | 108 _static_classes = set(['Url']) |
| 109 | 109 |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 for library_name in libraries: | 1019 for library_name in libraries: |
| 1020 self._libraries[library_name] = DartLibrary( | 1020 self._libraries[library_name] = DartLibrary( |
| 1021 library_name, template_loader, library_type, output_dir) | 1021 library_name, template_loader, library_type, output_dir) |
| 1022 | 1022 |
| 1023 def AddFile(self, basename, library_name, path): | 1023 def AddFile(self, basename, library_name, path): |
| 1024 self._libraries[library_name].AddFile(path) | 1024 self._libraries[library_name].AddFile(path) |
| 1025 | 1025 |
| 1026 def Emit(self, emitter, auxiliary_dir): | 1026 def Emit(self, emitter, auxiliary_dir): |
| 1027 for lib in self._libraries.values(): | 1027 for lib in self._libraries.values(): |
| 1028 lib.Emit(emitter, auxiliary_dir) | 1028 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |