| 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 27 matching lines...) Expand all Loading... |
| 38 'Console.timeStamp', | 38 'Console.timeStamp', |
| 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 'HTMLCanvasElement.getContext', | 49 'HTMLCanvasElement.getContext', |
| 49 'HTMLTableElement.createTBody', | 50 'HTMLTableElement.createTBody', |
| 50 'IDBDatabase.transaction', | 51 'IDBDatabase.transaction', |
| 51 'KeyboardEvent.initKeyboardEvent', | 52 'KeyboardEvent.initKeyboardEvent', |
| 52 'MouseEvent.offsetX', | 53 'MouseEvent.offsetX', |
| 53 'MouseEvent.offsetY', | 54 'MouseEvent.offsetY', |
| 54 'Navigator.language', | 55 'Navigator.language', |
| 55 'URL.createObjectURL', | 56 'URL.createObjectURL', |
| 56 'URL.revokeObjectURL', | 57 'URL.revokeObjectURL', |
| 57 'WheelEvent.wheelDeltaX', | 58 'WheelEvent.wheelDeltaX', |
| (...skipping 22 matching lines...) Expand all Loading... |
| 80 'HTMLKeygenElement': "Element.isTagSupported('keygen') " | 81 'HTMLKeygenElement': "Element.isTagSupported('keygen') " |
| 81 "&& (new Element.tag('keygen') is KeygenElement)", | 82 "&& (new Element.tag('keygen') is KeygenElement)", |
| 82 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" | 83 'HTMLMarqueeElement': "Element.isTagSupported('marquee')" |
| 83 "&& (new Element.tag('marquee') is MarqueeElement)", | 84 "&& (new Element.tag('marquee') is MarqueeElement)", |
| 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')", |
| 87 'HTMLProgressElement': "Element.isTagSupported('progress')", | 88 'HTMLProgressElement': "Element.isTagSupported('progress')", |
| 88 'HTMLShadowElement': "Element.isTagSupported('shadow')", | 89 'HTMLShadowElement': "Element.isTagSupported('shadow')", |
| 89 'HTMLTrackElement': "Element.isTagSupported('track')", | 90 'HTMLTrackElement': "Element.isTagSupported('track')", |
| 91 'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')", |
| 90 'Performance': "JS('bool', '!!(window.performance)')", | 92 'Performance': "JS('bool', '!!(window.performance)')", |
| 91 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", | 93 'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')", |
| 92 } | 94 } |
| 93 | 95 |
| 94 # Classes that offer only static methods, and therefore we should suppress | 96 # Classes that offer only static methods, and therefore we should suppress |
| 95 # constructor creation. | 97 # constructor creation. |
| 96 _static_classes = set(['Url']) | 98 _static_classes = set(['Url']) |
| 97 | 99 |
| 98 # Information for generating element constructors. | 100 # Information for generating element constructors. |
| 99 # | 101 # |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 for library_name in libraries: | 1051 for library_name in libraries: |
| 1050 self._libraries[library_name] = DartLibrary( | 1052 self._libraries[library_name] = DartLibrary( |
| 1051 library_name, template_loader, library_type, output_dir) | 1053 library_name, template_loader, library_type, output_dir) |
| 1052 | 1054 |
| 1053 def AddFile(self, basename, library_name, path): | 1055 def AddFile(self, basename, library_name, path): |
| 1054 self._libraries[library_name].AddFile(path) | 1056 self._libraries[library_name].AddFile(path) |
| 1055 | 1057 |
| 1056 def Emit(self, emitter, auxiliary_dir): | 1058 def Emit(self, emitter, auxiliary_dir): |
| 1057 for lib in self._libraries.values(): | 1059 for lib in self._libraries.values(): |
| 1058 lib.Emit(emitter, auxiliary_dir) | 1060 lib.Emit(emitter, auxiliary_dir) |
| OLD | NEW |