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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 'DOMObject': 'object', | 134 'DOMObject': 'object', |
135 'DOMSelection': 'Selection', | 135 'DOMSelection': 'Selection', |
136 'DOMWindow': 'Window', | 136 'DOMWindow': 'Window', |
137 'Exception': 'DOMException', # NotificationCenter.createNotification | 137 'Exception': 'DOMException', # NotificationCenter.createNotification |
138 'SharedWorkerContext': 'SharedWorkerGlobalScope', | 138 'SharedWorkerContext': 'SharedWorkerGlobalScope', |
139 'WorkerContext': 'WorkerGlobalScope', | 139 'WorkerContext': 'WorkerGlobalScope', |
140 }) | 140 }) |
141 | 141 |
142 optional_argument_whitelist = [ | 142 optional_argument_whitelist = [ |
143 ('CSSStyleDeclaration', 'setProperty', 'priority'), | 143 ('CSSStyleDeclaration', 'setProperty', 'priority'), |
| 144 # TODO(sra): Issue 1812 ('IDBDatabase', 'transaction', 'mode'), |
144 ] | 145 ] |
145 | 146 |
146 for dir_name in webkit_dirs: | 147 for dir_name in webkit_dirs: |
147 dir_path = os.path.join(current_dir, '..', '..', '..', '..', | 148 dir_path = os.path.join(current_dir, '..', '..', '..', '..', |
148 'third_party', 'WebKit', 'Source', 'WebCore', dir_name) | 149 'third_party', 'WebKit', 'Source', 'WebCore', dir_name) |
149 builder.import_idl_directory(dir_path, webkit_options) | 150 builder.import_idl_directory(dir_path, webkit_options) |
150 | 151 |
151 webkit_supplemental_options = databasebuilder.DatabaseBuilderOptions( | 152 webkit_supplemental_options = databasebuilder.DatabaseBuilderOptions( |
152 idl_syntax=idlparser.FREMONTCUT_SYNTAX, | 153 idl_syntax=idlparser.FREMONTCUT_SYNTAX, |
153 source='WebKit', | 154 source='WebKit', |
154 rename_operation_arguments_on_merge=True) | 155 rename_operation_arguments_on_merge=True) |
155 builder.import_idl_file( | 156 builder.import_idl_file( |
156 os.path.join(current_dir, '..', 'idl', | 157 os.path.join(current_dir, '..', 'idl', 'dart', 'webkit-supplemental.idl'), |
157 'dart', 'webkit-supplemental.idl'), | |
158 webkit_supplemental_options) | 158 webkit_supplemental_options) |
159 | 159 |
160 # Import Dart idl: | 160 # Import Dart idl: |
161 dart_options = databasebuilder.DatabaseBuilderOptions( | 161 dart_options = databasebuilder.DatabaseBuilderOptions( |
162 idl_syntax=idlparser.FREMONTCUT_SYNTAX, | 162 idl_syntax=idlparser.FREMONTCUT_SYNTAX, |
163 source='Dart', | 163 source='Dart', |
164 rename_operation_arguments_on_merge=True) | 164 rename_operation_arguments_on_merge=True) |
165 | 165 |
166 builder.import_idl_file(os.path.join(current_dir, '..', 'idl', | 166 builder.import_idl_file( |
167 'dart', 'dart.idl'), dart_options) | 167 os.path.join(current_dir, '..', 'idl', 'dart', 'dart.idl'), |
| 168 dart_options) |
168 | 169 |
169 builder.set_same_signatures({ | 170 builder.set_same_signatures({ |
170 'EventListener': 'Function', | 171 'EventListener': 'Function', |
171 'int': 'long', | 172 'int': 'long', |
172 }) | 173 }) |
173 | 174 |
174 # Merging: | 175 # Merging: |
175 builder.merge_imported_interfaces(optional_argument_whitelist) | 176 builder.merge_imported_interfaces(optional_argument_whitelist) |
176 | 177 |
177 builder.fix_displacements('WebKit') | 178 builder.fix_displacements('WebKit') |
178 | 179 |
179 # Cleanup: | 180 # Cleanup: |
180 builder.normalize_annotations(['WebKit', 'Dart']) | 181 builder.normalize_annotations(['WebKit', 'Dart']) |
181 | 182 |
182 db.Save() | 183 db.Save() |
183 | 184 |
184 if __name__ == '__main__': | 185 if __name__ == '__main__': |
185 sys.exit(main()) | 186 sys.exit(main()) |
OLD | NEW |