| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, 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 is the entry point to create Dart APIs from the IDL database.""" | 6 """This is the entry point to create Dart APIs from the IDL database.""" |
| 7 | 7 |
| 8 import dartgenerator | 8 import dartgenerator |
| 9 import database | 9 import database |
| 10 import logging.config | 10 import logging.config |
| 11 import optparse | 11 import optparse |
| 12 import os | 12 import os |
| 13 import shutil | 13 import shutil |
| 14 import subprocess | 14 import subprocess |
| 15 import sys | 15 import sys |
| 16 | 16 |
| 17 _logger = logging.getLogger('dartdomgenerator') | 17 _logger = logging.getLogger('dartdomgenerator') |
| 18 | 18 |
| 19 _webkit_renames = { | 19 _webkit_renames = { |
| 20 # W3C -> WebKit name conversion | 20 # W3C -> WebKit name conversion |
| 21 # TODO(vsm): Maybe Store these renames in the IDLs. | 21 # TODO(vsm): Maybe Store these renames in the IDLs. |
| 22 'ApplicationCache': 'DOMApplicationCache', | 22 'ApplicationCache': 'DOMApplicationCache', |
| 23 'BarProp': 'BarInfo', | 23 'BarProp': 'BarInfo', |
| 24 'DedicatedWorkerGlobalScope': 'DedicatedWorkerContext', | 24 'DedicatedWorkerGlobalScope': 'DedicatedWorkerContext', |
| 25 'FormData': 'DOMFormData', | 25 'FormData': 'DOMFormData', |
| 26 'Selection': 'DOMSelection', | 26 'Selection': 'DOMSelection', |
| 27 'SharedWorkerGlobalScope': 'SharedWorkerContext', | 27 'SharedWorkerGlobalScope': 'SharedWorkerContext', |
| 28 'Window': 'DOMWindow', | |
| 29 'WorkerGlobalScope': 'WorkerContext'} | 28 'WorkerGlobalScope': 'WorkerContext'} |
| 30 | 29 |
| 31 _html_strip_webkit_prefix_classes = [ | 30 _html_strip_webkit_prefix_classes = [ |
| 32 'Animation', | 31 'Animation', |
| 33 'AnimationEvent', | 32 'AnimationEvent', |
| 34 'AnimationList', | 33 'AnimationList', |
| 35 'BlobBuilder', | 34 'BlobBuilder', |
| 36 'CSSKeyframeRule', | 35 'CSSKeyframeRule', |
| 37 'CSSKeyframesRule', | 36 'CSSKeyframesRule', |
| 38 'CSSMatrix', | 37 'CSSMatrix', |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 # Copy dummy DOM where dartc build expects it. | 188 # Copy dummy DOM where dartc build expects it. |
| 190 if 'dummy' in systems: | 189 if 'dummy' in systems: |
| 191 # TODO(sra): Make other tools pick this up directly, or do a copy_dart into | 190 # TODO(sra): Make other tools pick this up directly, or do a copy_dart into |
| 192 # a specific directory. | 191 # a specific directory. |
| 193 source = os.path.join(output_dir, 'dom_dummy.dart') | 192 source = os.path.join(output_dir, 'dom_dummy.dart') |
| 194 target = os.path.join(output_dir, 'dom.dart') | 193 target = os.path.join(output_dir, 'dom.dart') |
| 195 shutil.copyfile(source, target) | 194 shutil.copyfile(source, target) |
| 196 | 195 |
| 197 if __name__ == '__main__': | 196 if __name__ == '__main__': |
| 198 sys.exit(main()) | 197 sys.exit(main()) |
| OLD | NEW |