| 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 systems to generate | 6 """This module provides shared functionality for systems to generate |
| 7 Dart APIs from the IDL database.""" | 7 Dart APIs from the IDL database.""" |
| 8 | 8 |
| 9 import copy | 9 import copy |
| 10 import re | 10 import re |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 "@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')", | 615 "@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')", |
| 616 } | 616 } |
| 617 | 617 |
| 618 _indexed_db_annotations = [ | 618 _indexed_db_annotations = [ |
| 619 "@SupportedBrowser(SupportedBrowser.CHROME)", | 619 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 620 "@SupportedBrowser(SupportedBrowser.FIREFOX, '15')", | 620 "@SupportedBrowser(SupportedBrowser.FIREFOX, '15')", |
| 621 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 621 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 622 "@Experimental()", | 622 "@Experimental()", |
| 623 ] | 623 ] |
| 624 | 624 |
| 625 _history_annotations = [ |
| 626 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 627 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 628 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 629 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 630 ] |
| 631 |
| 625 # Annotations to be placed on generated members. | 632 # Annotations to be placed on generated members. |
| 626 # The table is indexed as: | 633 # The table is indexed as: |
| 627 # INTERFACE: annotations to be added to the interface declaration | 634 # INTERFACE: annotations to be added to the interface declaration |
| 628 # INTERFACE.MEMBER: annotation to be added to the member declaration | 635 # INTERFACE.MEMBER: annotation to be added to the member declaration |
| 629 dart_annotations = { | 636 dart_annotations = { |
| 630 'DOMWindow.indexedDB': _indexed_db_annotations, | 637 'DOMWindow.indexedDB': _indexed_db_annotations, |
| 638 'History.pushState': _history_annotations, |
| 639 'History.replaceState': _history_annotations, |
| 631 'HTMLContentElement': [ | 640 'HTMLContentElement': [ |
| 632 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", | 641 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", |
| 633 "@Experimental()", | 642 "@Experimental()", |
| 634 ], | 643 ], |
| 635 'HTMLDataListElement': [ | 644 'HTMLDataListElement': [ |
| 636 "@SupportedBrowser(SupportedBrowser.CHROME)", | 645 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 637 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 646 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 638 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 647 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 639 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 648 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 640 ], | 649 ], |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 self) | 1268 self) |
| 1260 | 1269 |
| 1261 if type_data.clazz == 'SVGTearOff': | 1270 if type_data.clazz == 'SVGTearOff': |
| 1262 dart_interface_name = self._renamer.RenameInterface( | 1271 dart_interface_name = self._renamer.RenameInterface( |
| 1263 self._database.GetInterface(type_name)) | 1272 self._database.GetInterface(type_name)) |
| 1264 return SVGTearOffIDLTypeInfo( | 1273 return SVGTearOffIDLTypeInfo( |
| 1265 type_name, type_data, dart_interface_name, self) | 1274 type_name, type_data, dart_interface_name, self) |
| 1266 | 1275 |
| 1267 class_name = '%sIDLTypeInfo' % type_data.clazz | 1276 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1268 return globals()[class_name](type_name, type_data) | 1277 return globals()[class_name](type_name, type_data) |
| OLD | NEW |