| 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 import database | 6 import database |
| 7 import databasebuilder | 7 import databasebuilder |
| 8 import idlparser | 8 import idlparser |
| 9 import os.path | 9 import os.path |
| 10 import logging.config | 10 import logging.config |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 'Exception': 'DOMException', # NotificationCenter.createNotification | 142 'Exception': 'DOMException', # NotificationCenter.createNotification |
| 143 'SharedWorkerContext': 'SharedWorkerGlobalScope', | 143 'SharedWorkerContext': 'SharedWorkerGlobalScope', |
| 144 'WorkerContext': 'WorkerGlobalScope', | 144 'WorkerContext': 'WorkerGlobalScope', |
| 145 }) | 145 }) |
| 146 | 146 |
| 147 optional_argument_whitelist = [ | 147 optional_argument_whitelist = [ |
| 148 ('CSSStyleDeclaration', 'setProperty', 'priority'), | 148 ('CSSStyleDeclaration', 'setProperty', 'priority'), |
| 149 ('IDBDatabase', 'transaction', 'mode'), | 149 ('IDBDatabase', 'transaction', 'mode'), |
| 150 ] | 150 ] |
| 151 | 151 |
| 152 # Assume standard Dart checkout. |
| 153 webcore_path = os.path.join(current_dir, '..', '..', '..', |
| 154 'third_party', 'WebCore') |
| 155 |
| 156 if not os.path.exists(webcore_path): |
| 157 # Dartium checkout. |
| 158 webcore_path = os.path.join(current_dir, '..', '..', '..', '..', |
| 159 'third_party', 'WebKit', 'Source', 'WebCore') |
| 160 |
| 152 for dir_name in webkit_dirs: | 161 for dir_name in webkit_dirs: |
| 153 dir_path = os.path.join(current_dir, '..', '..', '..', '..', | 162 dir_path = os.path.join(webcore_path, dir_name) |
| 154 'third_party', 'WebKit', 'Source', 'WebCore', dir_name) | |
| 155 builder.import_idl_directory(dir_path, webkit_options) | 163 builder.import_idl_directory(dir_path, webkit_options) |
| 156 | 164 |
| 157 webkit_supplemental_options = databasebuilder.DatabaseBuilderOptions( | 165 webkit_supplemental_options = databasebuilder.DatabaseBuilderOptions( |
| 158 idl_syntax=idlparser.FREMONTCUT_SYNTAX, | 166 idl_syntax=idlparser.FREMONTCUT_SYNTAX, |
| 159 source='WebKit', | 167 source='WebKit', |
| 160 rename_operation_arguments_on_merge=True) | 168 rename_operation_arguments_on_merge=True) |
| 161 builder.import_idl_file( | 169 builder.import_idl_file( |
| 162 os.path.join(current_dir, '..', 'idl', 'dart', 'webkit-supplemental.idl'), | 170 os.path.join(current_dir, '..', 'idl', 'dart', 'webkit-supplemental.idl'), |
| 163 webkit_supplemental_options) | 171 webkit_supplemental_options) |
| 164 | 172 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 182 | 190 |
| 183 builder.fix_displacements('WebKit') | 191 builder.fix_displacements('WebKit') |
| 184 | 192 |
| 185 # Cleanup: | 193 # Cleanup: |
| 186 builder.normalize_annotations(['WebKit', 'Dart']) | 194 builder.normalize_annotations(['WebKit', 'Dart']) |
| 187 | 195 |
| 188 db.Save() | 196 db.Save() |
| 189 | 197 |
| 190 if __name__ == '__main__': | 198 if __name__ == '__main__': |
| 191 sys.exit(main()) | 199 sys.exit(main()) |
| OLD | NEW |