| 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 json | 10 import json |
| 11 import monitored |
| 11 import os | 12 import os |
| 12 import re | 13 import re |
| 13 from htmlrenamer import html_interface_renames, renamed_html_members | 14 from htmlrenamer import html_interface_renames, renamed_html_members |
| 14 | 15 |
| 15 # Set up json file for retrieving comments. | 16 # Set up json file for retrieving comments. |
| 16 _current_dir = os.path.dirname(__file__) | 17 _current_dir = os.path.dirname(__file__) |
| 17 _json_path = os.path.join(_current_dir, '..', 'docs', 'docs.json') | 18 _json_path = os.path.join(_current_dir, '..', 'docs', 'docs.json') |
| 18 _dom_json = json.load(open(_json_path)) | 19 _dom_json = json.load(open(_json_path)) |
| 19 | 20 |
| 20 _pure_interfaces = set([ | 21 _pure_interfaces = monitored.Set('generator._pure_interfaces', [ |
| 21 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>. | 22 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>. |
| 22 'DOMStringMap', | 23 'DOMStringMap', |
| 23 'ElementTimeControl', | 24 'ElementTimeControl', |
| 24 'ElementTraversal', | 25 'ElementTraversal', |
| 25 'EventListener', | 26 'EventListener', |
| 26 'MediaQueryListListener', | 27 'MediaQueryListListener', |
| 27 'MutationCallback', | 28 'MutationCallback', |
| 28 'NodeSelector', | |
| 29 'SVGExternalResourcesRequired', | 29 'SVGExternalResourcesRequired', |
| 30 'SVGFilterPrimitiveStandardAttributes', | 30 'SVGFilterPrimitiveStandardAttributes', |
| 31 'SVGFitToViewBox', | 31 'SVGFitToViewBox', |
| 32 'SVGLangSpace', | 32 'SVGLangSpace', |
| 33 'SVGLocatable', | 33 'SVGLocatable', |
| 34 'SVGTests', | 34 'SVGTests', |
| 35 'SVGTransformable', | 35 'SVGTransformable', |
| 36 'SVGURIReference', | 36 'SVGURIReference', |
| 37 'SVGZoomAndPan', | 37 'SVGZoomAndPan', |
| 38 'TimeoutHandler']) | 38 'TimeoutHandler']) |
| 39 | 39 |
| 40 def IsPureInterface(interface_name): | 40 def IsPureInterface(interface_name): |
| 41 return interface_name in _pure_interfaces | 41 return interface_name in _pure_interfaces |
| 42 | 42 |
| 43 | 43 |
| 44 _methods_with_named_formals = set([ | 44 _methods_with_named_formals = monitored.Set( |
| 45 'generator._methods_with_named_formals', [ |
| 45 'DataView.getFloat32', | 46 'DataView.getFloat32', |
| 46 'DataView.getFloat64', | 47 'DataView.getFloat64', |
| 47 'DataView.getInt16', | 48 'DataView.getInt16', |
| 48 'DataView.getInt32', | 49 'DataView.getInt32', |
| 49 'DataView.getInt8', | 50 'DataView.getInt8', |
| 50 'DataView.getUint16', | 51 'DataView.getUint16', |
| 51 'DataView.getUint32', | 52 'DataView.getUint32', |
| 52 'DataView.getUint8', | 53 'DataView.getUint8', |
| 53 'DataView.setFloat32', | 54 'DataView.setFloat32', |
| 54 'DataView.setFloat64', | 55 'DataView.setFloat64', |
| 55 'DataView.setInt16', | 56 'DataView.setInt16', |
| 56 'DataView.setInt32', | 57 'DataView.setInt32', |
| 57 'DataView.setInt8', | 58 'DataView.setInt8', |
| 58 'DataView.setUint16', | 59 'DataView.setUint16', |
| 59 'DataView.setUint32', | 60 'DataView.setUint32', |
| 60 'DataView.setUint8', | 61 'DataView.setUint8', |
| 61 'DirectoryEntry.getDirectory', | 62 'DirectoryEntry.getDirectory', |
| 62 'DirectoryEntry.getFile', | 63 'DirectoryEntry.getFile', |
| 63 ]) | 64 ]) |
| 64 | 65 |
| 65 # | 66 # |
| 66 # Renames for attributes that have names that are not legal Dart names. | 67 # Renames for attributes that have names that are not legal Dart names. |
| 67 # | 68 # |
| 68 _dart_attribute_renames = { | 69 _dart_attribute_renames = monitored.Dict('generator._dart_attribute_renames', { |
| 69 'default': 'defaultValue', | 70 'default': 'defaultValue', |
| 70 'final': 'finalValue', | 71 }) |
| 71 } | |
| 72 | 72 |
| 73 # | 73 # |
| 74 # Interface version of the DOM needs to delegate typed array constructors to a | 74 # Interface version of the DOM needs to delegate typed array constructors to a |
| 75 # factory provider. | 75 # factory provider. |
| 76 # | 76 # |
| 77 interface_factories = { | 77 interface_factories = monitored.Dict('generator.interface_factories', { |
| 78 'Float32Array': '_TypedArrayFactoryProvider', | 78 'Float32Array': '_TypedArrayFactoryProvider', |
| 79 'Float64Array': '_TypedArrayFactoryProvider', | 79 'Float64Array': '_TypedArrayFactoryProvider', |
| 80 'Int8Array': '_TypedArrayFactoryProvider', | 80 'Int8Array': '_TypedArrayFactoryProvider', |
| 81 'Int16Array': '_TypedArrayFactoryProvider', | 81 'Int16Array': '_TypedArrayFactoryProvider', |
| 82 'Int32Array': '_TypedArrayFactoryProvider', | 82 'Int32Array': '_TypedArrayFactoryProvider', |
| 83 'Uint8Array': '_TypedArrayFactoryProvider', | 83 'Uint8Array': '_TypedArrayFactoryProvider', |
| 84 'Uint8ClampedArray': '_TypedArrayFactoryProvider', | 84 'Uint8ClampedArray': '_TypedArrayFactoryProvider', |
| 85 'Uint16Array': '_TypedArrayFactoryProvider', | 85 'Uint16Array': '_TypedArrayFactoryProvider', |
| 86 'Uint32Array': '_TypedArrayFactoryProvider', | 86 'Uint32Array': '_TypedArrayFactoryProvider', |
| 87 } | 87 }) |
| 88 | 88 |
| 89 # | 89 # |
| 90 # Custom native specs for the dart2js dom. | 90 # Custom native specs for the dart2js dom. |
| 91 # | 91 # |
| 92 _dart2js_dom_custom_native_specs = { | 92 _dart2js_dom_custom_native_specs = monitored.Dict( |
| 93 'generator._dart2js_dom_custom_native_specs', { |
| 93 # Decorate the singleton Console object, if present (workers do not have a | 94 # Decorate the singleton Console object, if present (workers do not have a |
| 94 # console). | 95 # console). |
| 95 'Console': "=(typeof console == 'undefined' ? {} : console)", | 96 'Console': "=(typeof console == 'undefined' ? {} : console)", |
| 96 | 97 |
| 97 # DOMWindow aliased with global scope. | 98 # DOMWindow aliased with global scope. |
| 98 'DOMWindow': '@*DOMWindow', | 99 'Window': '@*DOMWindow', |
| 99 } | 100 }) |
| 100 | 101 |
| 101 def IsRegisteredType(type_name): | 102 def IsRegisteredType(type_name): |
| 102 return type_name in _idl_type_registry | 103 return type_name in _idl_type_registry |
| 103 | 104 |
| 104 def MakeNativeSpec(javascript_binding_name): | 105 def MakeNativeSpec(javascript_binding_name): |
| 105 if javascript_binding_name in _dart2js_dom_custom_native_specs: | 106 if javascript_binding_name in _dart2js_dom_custom_native_specs: |
| 106 return _dart2js_dom_custom_native_specs[javascript_binding_name] | 107 return _dart2js_dom_custom_native_specs[javascript_binding_name] |
| 107 else: | 108 else: |
| 108 # Make the class 'hidden' so it is dynamically patched at runtime. This | 109 # Make the class 'hidden' so it is dynamically patched at runtime. This |
| 109 # is useful for browser compat. | 110 # is useful for browser compat. |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 # "TYPE DIRECTION" -> conversion | 413 # "TYPE DIRECTION" -> conversion |
| 413 # All getters (setters) of type. | 414 # All getters (setters) of type. |
| 414 # | 415 # |
| 415 # where DIRECTION is 'get' for getters and operation return values, 'set' for | 416 # where DIRECTION is 'get' for getters and operation return values, 'set' for |
| 416 # setters and operation arguments. INTERFACE and MEMBER are the idl names. | 417 # setters and operation arguments. INTERFACE and MEMBER are the idl names. |
| 417 # | 418 # |
| 418 | 419 |
| 419 _serialize_SSV = Conversion('convertDartToNative_SerializedScriptValue', | 420 _serialize_SSV = Conversion('convertDartToNative_SerializedScriptValue', |
| 420 'dynamic', 'dynamic') | 421 'dynamic', 'dynamic') |
| 421 | 422 |
| 422 dart2js_conversions = { | 423 dart2js_conversions = monitored.Dict('generator.dart2js_conversions', { |
| 423 # Wrap non-local Windows. We need to check EventTarget (the base type) | 424 # Wrap non-local Windows. We need to check EventTarget (the base type) |
| 424 # as well. Note, there are no functions that take a non-local Window | 425 # as well. Note, there are no functions that take a non-local Window |
| 425 # as a parameter / setter. | 426 # as a parameter / setter. |
| 426 'DOMWindow get': | 427 'DOMWindow get': |
| 427 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'), | 428 Conversion('_convertNativeToDart_Window', 'dynamic', 'WindowBase'), |
| 428 'EventTarget get': | 429 'EventTarget get': |
| 429 Conversion('_convertNativeToDart_EventTarget', 'dynamic', | 430 Conversion('_convertNativeToDart_EventTarget', 'dynamic', |
| 430 'EventTarget'), | 431 'EventTarget'), |
| 431 'EventTarget set': | 432 'EventTarget set': |
| 432 Conversion('_convertDartToNative_EventTarget', 'EventTarget', | 433 Conversion('_convertDartToNative_EventTarget', 'EventTarget', |
| 433 'dynamic'), | 434 'dynamic'), |
| 434 | 435 |
| 435 'IDBKey get': | |
| 436 Conversion('_convertNativeToDart_IDBKey', 'dynamic', 'dynamic'), | |
| 437 'IDBKey set': | |
| 438 Conversion('_convertDartToNative_IDBKey', 'dynamic', 'dynamic'), | |
| 439 | |
| 440 'ImageData get': | 436 'ImageData get': |
| 441 Conversion('_convertNativeToDart_ImageData', 'dynamic', 'ImageData'), | 437 Conversion('_convertNativeToDart_ImageData', 'dynamic', 'ImageData'), |
| 442 'ImageData set': | 438 'ImageData set': |
| 443 Conversion('_convertDartToNative_ImageData', 'ImageData', 'dynamic'), | 439 Conversion('_convertDartToNative_ImageData', 'ImageData', 'dynamic'), |
| 444 | 440 |
| 445 'Dictionary get': | 441 'Dictionary get': |
| 446 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'), | 442 Conversion('convertNativeToDart_Dictionary', 'dynamic', 'Map'), |
| 447 'Dictionary set': | 443 'Dictionary set': |
| 448 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'), | 444 Conversion('convertDartToNative_Dictionary', 'Map', 'dynamic'), |
| 449 | 445 |
| 450 'DOMString[] set': | 446 'sequence<DOMString> set': |
| 451 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'), | 447 Conversion('convertDartToNative_StringArray', 'List<String>', 'List'), |
| 452 | 448 |
| 453 'any set IDBObjectStore.add': _serialize_SSV, | 449 'any set IDBObjectStore.add': _serialize_SSV, |
| 454 'any set IDBObjectStore.put': _serialize_SSV, | 450 'any set IDBObjectStore.put': _serialize_SSV, |
| 455 'any set IDBCursor.update': _serialize_SSV, | 451 'any set IDBCursor.update': _serialize_SSV, |
| 456 | 452 |
| 457 # postMessage | 453 # postMessage |
| 458 'any set DedicatedWorkerContext.postMessage': _serialize_SSV, | 454 'any set DedicatedWorkerContext.postMessage': _serialize_SSV, |
| 459 'any set MessagePort.postMessage': _serialize_SSV, | 455 'any set MessagePort.postMessage': _serialize_SSV, |
| 460 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV, | 456 'SerializedScriptValue set DOMWindow.postMessage': _serialize_SSV, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 485 # something that does not need conversion. | 481 # something that does not need conversion. |
| 486 'IDBAny get IDBRequest.result': | 482 'IDBAny get IDBRequest.result': |
| 487 Conversion('_convertNativeToDart_IDBAny', 'dynamic', 'dynamic'), | 483 Conversion('_convertNativeToDart_IDBAny', 'dynamic', 'dynamic'), |
| 488 | 484 |
| 489 # "source: On getting, returns the IDBObjectStore or IDBIndex that the | 485 # "source: On getting, returns the IDBObjectStore or IDBIndex that the |
| 490 # cursor is iterating. ...". So we should not try to convert it. | 486 # cursor is iterating. ...". So we should not try to convert it. |
| 491 'IDBAny get IDBCursor.source': None, | 487 'IDBAny get IDBCursor.source': None, |
| 492 | 488 |
| 493 # Should be either a DOMString, an Array of DOMStrings or null. | 489 # Should be either a DOMString, an Array of DOMStrings or null. |
| 494 'IDBAny get IDBObjectStore.keyPath': None, | 490 'IDBAny get IDBObjectStore.keyPath': None, |
| 495 } | 491 }) |
| 496 | 492 |
| 497 def FindConversion(idl_type, direction, interface, member): | 493 def FindConversion(idl_type, direction, interface, member): |
| 498 table = dart2js_conversions | 494 table = dart2js_conversions |
| 499 return (table.get('%s %s %s.%s' % (idl_type, direction, interface, member)) or | 495 return (table.get('%s %s %s.%s' % (idl_type, direction, interface, member)) or |
| 500 table.get('* %s %s.%s' % (direction, interface, member)) or | 496 table.get('* %s %s.%s' % (direction, interface, member)) or |
| 501 table.get('%s %s %s.*' % (idl_type, direction, interface)) or | 497 table.get('%s %s %s.*' % (idl_type, direction, interface)) or |
| 502 table.get('%s %s' % (idl_type, direction))) | 498 table.get('%s %s' % (idl_type, direction))) |
| 503 return None | 499 return None |
| 504 | 500 |
| 505 # ------------------------------------------------------------------------------ | 501 # ------------------------------------------------------------------------------ |
| 506 | 502 |
| 507 # Annotations to be placed on native members. The table is indexed by the IDL | 503 # Annotations to be placed on native members. The table is indexed by the IDL |
| 508 # interface and member name, and by IDL return or field type name. Both are | 504 # interface and member name, and by IDL return or field type name. Both are |
| 509 # used to assemble the annotations: | 505 # used to assemble the annotations: |
| 510 # | 506 # |
| 511 # INTERFACE.MEMBER: annotations for member. | 507 # INTERFACE.MEMBER: annotations for member. |
| 512 # +TYPE: add annotations only if there are member annotations. | 508 # +TYPE: add annotations only if there are member annotations. |
| 513 # -TYPE: add annotations only if there are no member annotations. | 509 # -TYPE: add annotations only if there are no member annotations. |
| 514 # TYPE: add regardless of member annotations. | 510 # TYPE: add regardless of member annotations. |
| 515 | 511 |
| 516 dart2js_annotations = { | 512 dart2js_annotations = monitored.Dict('generator.dart2js_annotations', { |
| 517 | 513 |
| 518 'CanvasRenderingContext2D.createImageData': [ | 514 'CanvasRenderingContext2D.createImageData': [ |
| 519 "@Creates('ImageData|=Object')", | 515 "@Creates('ImageData|=Object')", |
| 520 ], | 516 ], |
| 521 | 517 |
| 522 'CanvasRenderingContext2D.getImageData': [ | 518 'CanvasRenderingContext2D.getImageData': [ |
| 523 "@Creates('ImageData|=Object')", | 519 "@Creates('ImageData|=Object')", |
| 524 ], | 520 ], |
| 525 | 521 |
| 526 'CanvasRenderingContext2D.webkitGetImageDataHD': [ | 522 'CanvasRenderingContext2D.webkitGetImageDataHD': [ |
| (...skipping 15 matching lines...) Expand all Loading... |
| 542 'DOMWindow': [ | 538 'DOMWindow': [ |
| 543 "@Creates('Window|=Object')", | 539 "@Creates('Window|=Object')", |
| 544 "@Returns('Window|=Object')", | 540 "@Returns('Window|=Object')", |
| 545 ], | 541 ], |
| 546 | 542 |
| 547 'DOMWindow.openDatabase': [ | 543 'DOMWindow.openDatabase': [ |
| 548 "@Creates('Database')", | 544 "@Creates('Database')", |
| 549 "@Creates('DatabaseSync')", | 545 "@Creates('DatabaseSync')", |
| 550 ], | 546 ], |
| 551 | 547 |
| 552 # Cross-frame windows are EventTargets. | |
| 553 '-EventTarget': [ | |
| 554 "@Creates('EventTarget|=Object')", | |
| 555 "@Returns('EventTarget|=Object')", | |
| 556 ], | |
| 557 | |
| 558 # To be in callback with the browser-created Event, we had to have called | 548 # To be in callback with the browser-created Event, we had to have called |
| 559 # addEventListener on the target, so we avoid | 549 # addEventListener on the target, so we avoid |
| 560 'Event.currentTarget': [ | 550 'Event.currentTarget': [ |
| 561 "@Creates('Null')", | 551 "@Creates('Null')", |
| 562 "@Returns('EventTarget|=Object')", | 552 "@Returns('EventTarget|=Object')", |
| 563 ], | 553 ], |
| 564 | 554 |
| 565 # Only nodes in the DOM bubble and have target !== currentTarget. | 555 # Only nodes in the DOM bubble and have target !== currentTarget. |
| 566 'Event.target': [ | 556 'Event.target': [ |
| 567 "@Creates('Node')", | 557 "@Creates('Node')", |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 | 610 |
| 621 '+IDBRequest': [ | 611 '+IDBRequest': [ |
| 622 "@Returns('Request')", | 612 "@Returns('Request')", |
| 623 "@Creates('Request')", | 613 "@Creates('Request')", |
| 624 ], | 614 ], |
| 625 | 615 |
| 626 '+IDBOpenDBRequest': [ | 616 '+IDBOpenDBRequest': [ |
| 627 "@Returns('Request')", | 617 "@Returns('Request')", |
| 628 "@Creates('Request')", | 618 "@Creates('Request')", |
| 629 ], | 619 ], |
| 630 '+IDBVersionChangeRequest': [ | |
| 631 "@Returns('Request')", | |
| 632 "@Creates('Request')", | |
| 633 ], | |
| 634 | 620 |
| 635 'MessageEvent.ports': ["@Creates('=List')"], | 621 'MessageEvent.ports': ["@Creates('=List')"], |
| 636 | 622 |
| 637 'MessageEvent.data': [ | 623 'MessageEvent.data': [ |
| 638 "@annotation_Creates_SerializedScriptValue", | 624 "@annotation_Creates_SerializedScriptValue", |
| 639 "@annotation_Returns_SerializedScriptValue", | 625 "@annotation_Returns_SerializedScriptValue", |
| 640 ], | 626 ], |
| 641 'PopStateEvent.state': [ | 627 'PopStateEvent.state': [ |
| 642 "@annotation_Creates_SerializedScriptValue", | 628 "@annotation_Creates_SerializedScriptValue", |
| 643 "@annotation_Returns_SerializedScriptValue", | 629 "@annotation_Returns_SerializedScriptValue", |
| 644 ], | 630 ], |
| 645 'SerializedScriptValue': [ | 631 'SerializedScriptValue': [ |
| 646 "@annotation_Creates_SerializedScriptValue", | 632 "@annotation_Creates_SerializedScriptValue", |
| 647 "@annotation_Returns_SerializedScriptValue", | 633 "@annotation_Returns_SerializedScriptValue", |
| 648 ], | 634 ], |
| 649 | 635 |
| 650 'SQLResultSetRowList.item': ["@Creates('=Object')"], | 636 'SQLResultSetRowList.item': ["@Creates('=Object')"], |
| 651 | 637 |
| 652 'XMLHttpRequest.response': [ | 638 'XMLHttpRequest.response': [ |
| 653 "@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')", | 639 "@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')", |
| 654 ], | 640 ], |
| 655 } | 641 }) |
| 656 | 642 |
| 657 _indexed_db_annotations = [ | 643 _indexed_db_annotations = [ |
| 658 "@SupportedBrowser(SupportedBrowser.CHROME)", | 644 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 659 "@SupportedBrowser(SupportedBrowser.FIREFOX, '15')", | 645 "@SupportedBrowser(SupportedBrowser.FIREFOX, '15')", |
| 660 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 646 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 661 "@Experimental", | 647 "@Experimental", |
| 662 ] | 648 ] |
| 663 | 649 |
| 664 _file_system_annotations = [ | 650 _file_system_annotations = [ |
| 665 "@SupportedBrowser(SupportedBrowser.CHROME)", | 651 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 _webkit_experimental_annotations = [ | 700 _webkit_experimental_annotations = [ |
| 715 "@SupportedBrowser(SupportedBrowser.CHROME)", | 701 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 716 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 702 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 717 "@Experimental", | 703 "@Experimental", |
| 718 ] | 704 ] |
| 719 | 705 |
| 720 # Annotations to be placed on generated members. | 706 # Annotations to be placed on generated members. |
| 721 # The table is indexed as: | 707 # The table is indexed as: |
| 722 # INTERFACE: annotations to be added to the interface declaration | 708 # INTERFACE: annotations to be added to the interface declaration |
| 723 # INTERFACE.MEMBER: annotation to be added to the member declaration | 709 # INTERFACE.MEMBER: annotation to be added to the member declaration |
| 724 dart_annotations = { | 710 dart_annotations = monitored.Dict('generator.dart_annotations', { |
| 725 'ArrayBuffer': _all_but_ie9_annotations, | 711 'ArrayBuffer': _all_but_ie9_annotations, |
| 726 'ArrayBufferView': _all_but_ie9_annotations, | 712 'ArrayBufferView': _all_but_ie9_annotations, |
| 727 'Database': _web_sql_annotations, | 713 'Database': _web_sql_annotations, |
| 728 'DatabaseSync': _web_sql_annotations, | 714 'DatabaseSync': _web_sql_annotations, |
| 729 'DOMApplicationCache': [ | 715 'DOMApplicationCache': [ |
| 730 "@SupportedBrowser(SupportedBrowser.CHROME)", | 716 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 731 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 717 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 732 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 718 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 733 "@SupportedBrowser(SupportedBrowser.OPERA)", | 719 "@SupportedBrowser(SupportedBrowser.OPERA)", |
| 734 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 720 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 735 ], | 721 ], |
| 736 'DOMWindow.convertPointFromNodeToPage': _webkit_experimental_annotations, | 722 'DOMFileSystem': _file_system_annotations, |
| 737 'DOMWindow.convertPointFromPageToNode': _webkit_experimental_annotations, | 723 'DOMFileSystemSync': _file_system_annotations, |
| 724 'DOMWindow.webkitConvertPointFromNodeToPage': _webkit_experimental_annotations
, |
| 725 'DOMWindow.webkitConvertPointFromPageToNode': _webkit_experimental_annotations
, |
| 738 'DOMWindow.indexedDB': _indexed_db_annotations, | 726 'DOMWindow.indexedDB': _indexed_db_annotations, |
| 739 'DOMWindow.openDatabase': _web_sql_annotations, | 727 'DOMWindow.openDatabase': _web_sql_annotations, |
| 740 'DOMWindow.performance': _performance_annotations, | 728 'DOMWindow.performance': _performance_annotations, |
| 741 'DOMWindow.webkitNotifications': _webkit_experimental_annotations, | 729 'DOMWindow.webkitNotifications': _webkit_experimental_annotations, |
| 742 'DOMWindow.webkitRequestFileSystem': _file_system_annotations, | 730 'DOMWindow.webkitRequestFileSystem': _file_system_annotations, |
| 743 'DOMWindow.webkitResolveLocalFileSystemURL': _file_system_annotations, | 731 'DOMWindow.webkitResolveLocalFileSystemURL': _file_system_annotations, |
| 744 'Element.onwebkitTransitionEnd': _all_but_ie9_annotations, | 732 'Element.onwebkitTransitionEnd': _all_but_ie9_annotations, |
| 745 # Placeholder to add experimental flag, implementation for this is | 733 # Placeholder to add experimental flag, implementation for this is |
| 746 # pending in a separate CL. | 734 # pending in a separate CL. |
| 747 'Element.webkitMatchesSelector': ['@Experimental()'], | 735 'Element.webkitMatchesSelector': ['@Experimental()'], |
| 748 'Element.webkitCreateShadowRoot': [ | 736 'Element.webkitCreateShadowRoot': [ |
| 749 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", | 737 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", |
| 750 "@Experimental", | 738 "@Experimental", |
| 751 ], | 739 ], |
| 752 'FileSystem': _file_system_annotations, | |
| 753 'FileSystemSync': _file_system_annotations, | |
| 754 'HashChangeEvent': [ | 740 'HashChangeEvent': [ |
| 755 "@SupportedBrowser(SupportedBrowser.CHROME)", | 741 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 756 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 742 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 757 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 743 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 758 ], | 744 ], |
| 759 'History.pushState': _history_annotations, | 745 'History.pushState': _history_annotations, |
| 760 'History.replaceState': _history_annotations, | 746 'History.replaceState': _history_annotations, |
| 761 'HTMLContentElement': [ | 747 'HTMLContentElement': [ |
| 762 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", | 748 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", |
| 763 "@Experimental", | 749 "@Experimental", |
| (...skipping 20 matching lines...) Expand all Loading... |
| 784 ], | 770 ], |
| 785 'HTMLTrackElement': [ | 771 'HTMLTrackElement': [ |
| 786 "@SupportedBrowser(SupportedBrowser.CHROME)", | 772 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 787 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 773 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 788 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 774 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 789 ], | 775 ], |
| 790 'IDBFactory': _indexed_db_annotations, | 776 'IDBFactory': _indexed_db_annotations, |
| 791 'IDBDatabase': _indexed_db_annotations, | 777 'IDBDatabase': _indexed_db_annotations, |
| 792 'LocalMediaStream': _rtc_annotations, | 778 'LocalMediaStream': _rtc_annotations, |
| 793 'MediaStream': _rtc_annotations, | 779 'MediaStream': _rtc_annotations, |
| 794 'MediaStreamEvents': _rtc_annotations, | |
| 795 'MediaStreamEvent': _rtc_annotations, | 780 'MediaStreamEvent': _rtc_annotations, |
| 796 'MediaStreamTrack': _rtc_annotations, | 781 'MediaStreamTrack': _rtc_annotations, |
| 797 'MediaStreamTrackEvent': _rtc_annotations, | 782 'MediaStreamTrackEvent': _rtc_annotations, |
| 798 'MediaStreamTrackEvents': _rtc_annotations, | |
| 799 'MutationObserver': [ | 783 'MutationObserver': [ |
| 800 "@SupportedBrowser(SupportedBrowser.CHROME)", | 784 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 801 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 785 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 802 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 786 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 803 "@Experimental", | 787 "@Experimental", |
| 804 ], | 788 ], |
| 805 'NotificationCenter': _webkit_experimental_annotations, | 789 'NotificationCenter': _webkit_experimental_annotations, |
| 806 'Performance': _performance_annotations, | 790 'Performance': _performance_annotations, |
| 807 'PopStateEvent': _history_annotations, | 791 'PopStateEvent': _history_annotations, |
| 808 'RTCIceCandidate': _rtc_annotations, | 792 'RTCIceCandidate': _rtc_annotations, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 830 'SVGFEDistantLightElement': _svg_annotations, | 814 'SVGFEDistantLightElement': _svg_annotations, |
| 831 'SVGFEFloodElement': _svg_annotations, | 815 'SVGFEFloodElement': _svg_annotations, |
| 832 'SVGFEFuncAElement': _svg_annotations, | 816 'SVGFEFuncAElement': _svg_annotations, |
| 833 'SVGFEFuncBElement': _svg_annotations, | 817 'SVGFEFuncBElement': _svg_annotations, |
| 834 'SVGFEFuncGElement': _svg_annotations, | 818 'SVGFEFuncGElement': _svg_annotations, |
| 835 'SVGFEFuncRElement': _svg_annotations, | 819 'SVGFEFuncRElement': _svg_annotations, |
| 836 'SVGFEGaussianBlurElement': _svg_annotations, | 820 'SVGFEGaussianBlurElement': _svg_annotations, |
| 837 'SVGFEImageElement': _svg_annotations, | 821 'SVGFEImageElement': _svg_annotations, |
| 838 'SVGFEMergeElement': _svg_annotations, | 822 'SVGFEMergeElement': _svg_annotations, |
| 839 'SVGFEMergeNodeElement': _svg_annotations, | 823 'SVGFEMergeNodeElement': _svg_annotations, |
| 840 'SVGFEMorphology': _svg_annotations, | 824 'SVGFEMorphologyElement': _svg_annotations, |
| 841 'SVGFEOffsetElement': _svg_annotations, | 825 'SVGFEOffsetElement': _svg_annotations, |
| 842 'SVGFEPointLightElement': _svg_annotations, | 826 'SVGFEPointLightElement': _svg_annotations, |
| 843 'SVGFESpecularLightingElement': _svg_annotations, | 827 'SVGFESpecularLightingElement': _svg_annotations, |
| 844 'SVGFESpotLightElement': _svg_annotations, | 828 'SVGFESpotLightElement': _svg_annotations, |
| 845 'SVGFETileElement': _svg_annotations, | 829 'SVGFETileElement': _svg_annotations, |
| 846 'SVGFETurbulenceElement': _svg_annotations, | 830 'SVGFETurbulenceElement': _svg_annotations, |
| 847 'SVGFilterElement': _svg_annotations, | 831 'SVGFilterElement': _svg_annotations, |
| 848 'SVGForeignObjectElement': _no_ie_annotations, | 832 'SVGForeignObjectElement': _no_ie_annotations, |
| 849 'SVGSetElement': _no_ie_annotations, | 833 'SVGSetElement': _no_ie_annotations, |
| 850 'SQLTransaction': _web_sql_annotations, | 834 'SQLTransaction': _web_sql_annotations, |
| 851 'SQLTransactionSync': _web_sql_annotations, | 835 'SQLTransactionSync': _web_sql_annotations, |
| 852 'WebGLRenderingContext': _webgl_annotations, | 836 'WebGLRenderingContext': _webgl_annotations, |
| 853 'WebKitCSSMatrix': _webkit_experimental_annotations, | 837 'WebKitCSSMatrix': _webkit_experimental_annotations, |
| 854 'WebKitPoint': _webkit_experimental_annotations, | 838 'WebKitPoint': _webkit_experimental_annotations, |
| 855 'WebSocket': _all_but_ie9_annotations, | 839 'WebSocket': _all_but_ie9_annotations, |
| 856 'WorkerContext.indexedDB': _indexed_db_annotations, | 840 'WorkerContext.indexedDB': _indexed_db_annotations, |
| 857 'WorkerContext.openDatabase': _web_sql_annotations, | 841 'WorkerContext.openDatabase': _web_sql_annotations, |
| 858 'WorkerContext.openDatabaseSync': _web_sql_annotations, | 842 'WorkerContext.openDatabaseSync': _web_sql_annotations, |
| 859 'WorkerContext.webkitRequestFileSystem': _file_system_annotations, | 843 'WorkerContext.webkitRequestFileSystem': _file_system_annotations, |
| 860 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations, | 844 'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations, |
| 861 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations, | 845 'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations, |
| 862 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations, | 846 'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations, |
| 863 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations, | 847 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations, |
| 864 'XSLTProcessor': [ | 848 'XSLTProcessor': [ |
| 865 "@SupportedBrowser(SupportedBrowser.CHROME)", | 849 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 866 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 850 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 867 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 851 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 868 ], | 852 ], |
| 869 } | 853 }) |
| 870 | 854 |
| 871 def GetComments(library_name, interface_name, member_name=None): | 855 def GetComments(library_name, interface_name, member_name=None): |
| 872 """ Finds all comments for the interface or member and returns a list. """ | 856 """ Finds all comments for the interface or member and returns a list. """ |
| 873 | 857 |
| 874 # Add documentation from JSON. | 858 # Add documentation from JSON. |
| 875 comments = [] | 859 comments = [] |
| 876 library_name = 'dart.dom.%s' % library_name | 860 library_name = 'dart.dom.%s' % library_name |
| 877 if library_name in _dom_json and interface_name in _dom_json[library_name]: | 861 if library_name in _dom_json and interface_name in _dom_json[library_name]: |
| 878 if (member_name and 'members' in _dom_json[library_name][interface_name] and | 862 if (member_name and 'members' in _dom_json[library_name][interface_name] and |
| 879 (member_name in _dom_json[library_name][interface_name]['members'])): | 863 (member_name in _dom_json[library_name][interface_name]['members'])): |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 self.webcore_setter_name = webcore_setter_name | 1283 self.webcore_setter_name = webcore_setter_name |
| 1300 self.item_type = item_type | 1284 self.item_type = item_type |
| 1301 self.suppress_interface = suppress_interface | 1285 self.suppress_interface = suppress_interface |
| 1302 self.is_typed_array = is_typed_array | 1286 self.is_typed_array = is_typed_array |
| 1303 | 1287 |
| 1304 | 1288 |
| 1305 def TypedArrayTypeData(item_type): | 1289 def TypedArrayTypeData(item_type): |
| 1306 return TypeData(clazz='Interface', item_type=item_type, is_typed_array=True) | 1290 return TypeData(clazz='Interface', item_type=item_type, is_typed_array=True) |
| 1307 | 1291 |
| 1308 | 1292 |
| 1309 _idl_type_registry = { | 1293 _idl_type_registry = monitored.Dict('generator._idl_type_registry', { |
| 1310 'boolean': TypeData(clazz='Primitive', dart_type='bool', native_type='bool', | 1294 'boolean': TypeData(clazz='Primitive', dart_type='bool', native_type='bool', |
| 1311 webcore_getter_name='hasAttribute', | 1295 webcore_getter_name='hasAttribute', |
| 1312 webcore_setter_name='setBooleanAttribute'), | 1296 webcore_setter_name='setBooleanAttribute'), |
| 1313 'byte': TypeData(clazz='Primitive', dart_type='int', native_type='int'), | 1297 'byte': TypeData(clazz='Primitive', dart_type='int', native_type='int'), |
| 1314 'octet': TypeData(clazz='Primitive', dart_type='int', native_type='int'), | 1298 'octet': TypeData(clazz='Primitive', dart_type='int', native_type='int'), |
| 1315 'short': TypeData(clazz='Primitive', dart_type='int', native_type='int'), | 1299 'short': TypeData(clazz='Primitive', dart_type='int', native_type='int'), |
| 1316 'unsigned short': TypeData(clazz='Primitive', dart_type='int', | 1300 'unsigned short': TypeData(clazz='Primitive', dart_type='int', |
| 1317 native_type='int'), | 1301 native_type='int'), |
| 1318 'int': TypeData(clazz='Primitive', dart_type='int'), | 1302 'int': TypeData(clazz='Primitive', dart_type='int'), |
| 1319 'unsigned int': TypeData(clazz='Primitive', dart_type='int', | 1303 'unsigned int': TypeData(clazz='Primitive', dart_type='int', |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1332 | 1316 |
| 1333 'any': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptVa
lue'), | 1317 'any': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptVa
lue'), |
| 1334 'Array': TypeData(clazz='Primitive', dart_type='List'), | 1318 'Array': TypeData(clazz='Primitive', dart_type='List'), |
| 1335 'custom': TypeData(clazz='Primitive', dart_type='dynamic'), | 1319 'custom': TypeData(clazz='Primitive', dart_type='dynamic'), |
| 1336 'Date': TypeData(clazz='Primitive', dart_type='Date', native_type='double'), | 1320 'Date': TypeData(clazz='Primitive', dart_type='Date', native_type='double'), |
| 1337 'DOMObject': TypeData(clazz='Primitive', dart_type='Object', native_type='Sc
riptValue'), | 1321 'DOMObject': TypeData(clazz='Primitive', dart_type='Object', native_type='Sc
riptValue'), |
| 1338 'DOMString': TypeData(clazz='Primitive', dart_type='String', native_type='St
ring'), | 1322 'DOMString': TypeData(clazz='Primitive', dart_type='String', native_type='St
ring'), |
| 1339 # TODO(vsm): This won't actually work until we convert the Map to | 1323 # TODO(vsm): This won't actually work until we convert the Map to |
| 1340 # a native JS Map for JS DOM. | 1324 # a native JS Map for JS DOM. |
| 1341 'Dictionary': TypeData(clazz='Primitive', dart_type='Map'), | 1325 'Dictionary': TypeData(clazz='Primitive', dart_type='Map'), |
| 1342 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} | |
| 1343 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa
ce | |
| 1344 'Flags': TypeData(clazz='Primitive', dart_type='Object'), | |
| 1345 'DOMTimeStamp': TypeData(clazz='Primitive', dart_type='int', native_type='un
signed long long'), | 1326 'DOMTimeStamp': TypeData(clazz='Primitive', dart_type='int', native_type='un
signed long long'), |
| 1346 'object': TypeData(clazz='Primitive', dart_type='Object', native_type='Scrip
tValue'), | 1327 'object': TypeData(clazz='Primitive', dart_type='Object', native_type='Scrip
tValue'), |
| 1347 'ObjectArray': TypeData(clazz='Primitive', dart_type='List'), | 1328 'ObjectArray': TypeData(clazz='Primitive', dart_type='List'), |
| 1348 'PositionOptions': TypeData(clazz='Primitive', dart_type='Object'), | 1329 'PositionOptions': TypeData(clazz='Primitive', dart_type='Object'), |
| 1349 # TODO(sra): Come up with some meaningful name so that where this appears in | 1330 # TODO(sra): Come up with some meaningful name so that where this appears in |
| 1350 # the documentation, the user is made aware that only a limited subset of | 1331 # the documentation, the user is made aware that only a limited subset of |
| 1351 # serializable types are actually permitted. | 1332 # serializable types are actually permitted. |
| 1352 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='dynamic'), | 1333 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='dynamic'), |
| 1353 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} | |
| 1354 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa
ce | |
| 1355 'WebKitFlags': TypeData(clazz='Primitive', dart_type='Object'), | |
| 1356 | |
| 1357 'sequence': TypeData(clazz='Primitive', dart_type='List'), | 1334 'sequence': TypeData(clazz='Primitive', dart_type='List'), |
| 1358 'void': TypeData(clazz='Primitive', dart_type='void'), | 1335 'void': TypeData(clazz='Primitive', dart_type='void'), |
| 1359 | 1336 |
| 1360 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule']
), | 1337 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule']
), |
| 1361 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'), | 1338 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'), |
| 1362 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>')
, | 1339 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>')
, |
| 1363 'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True), | 1340 'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True), |
| 1364 'Element': TypeData(clazz='Interface', merged_interface='HTMLElement', | 1341 'Element': TypeData(clazz='Interface', merged_interface='HTMLElement', |
| 1365 custom_to_dart=True), | 1342 custom_to_dart=True), |
| 1366 'EventListener': TypeData(clazz='Interface', custom_to_native=True), | 1343 'EventListener': TypeData(clazz='Interface', custom_to_native=True), |
| 1367 'EventTarget': TypeData(clazz='Interface', custom_to_native=True), | 1344 'EventTarget': TypeData(clazz='Interface', custom_to_native=True), |
| 1368 'HTMLElement': TypeData(clazz='Interface', merged_into='Element', | 1345 'HTMLElement': TypeData(clazz='Interface', merged_into='Element', |
| 1369 custom_to_dart=True), | 1346 custom_to_dart=True), |
| 1370 'IDBAny': TypeData(clazz='Interface', dart_type='dynamic', custom_to_native=
True), | 1347 'IDBAny': TypeData(clazz='Interface', dart_type='dynamic', custom_to_native=
True), |
| 1371 'IDBKey': TypeData(clazz='Interface', dart_type='dynamic', custom_to_native=
True), | |
| 1372 'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer. | 1348 'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer. |
| 1373 native_type='MutationRecordArray', dart_type='List<MutationRecord>'), | 1349 native_type='MutationRecordArray', dart_type='List<MutationRecord>'), |
| 1374 'StyleSheet': TypeData(clazz='Interface', conversion_includes=['CSSStyleShee
t']), | 1350 'StyleSheet': TypeData(clazz='Interface', conversion_includes=['CSSStyleShee
t']), |
| 1375 'SVGElement': TypeData(clazz='Interface', custom_to_dart=True), | 1351 'SVGElement': TypeData(clazz='Interface', custom_to_dart=True), |
| 1376 | 1352 |
| 1377 'ClientRectList': TypeData(clazz='Interface', | 1353 'ClientRectList': TypeData(clazz='Interface', |
| 1378 item_type='ClientRect', suppress_interface=True), | 1354 item_type='ClientRect', suppress_interface=True), |
| 1379 'CSSRuleList': TypeData(clazz='Interface', | 1355 'CSSRuleList': TypeData(clazz='Interface', |
| 1380 item_type='CSSRule', suppress_interface=True), | 1356 item_type='CSSRule', suppress_interface=True), |
| 1381 'CSSValueList': TypeData(clazz='Interface', | 1357 'CSSValueList': TypeData(clazz='Interface', |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1406 'SpeechInputResultList': TypeData(clazz='Interface', | 1382 'SpeechInputResultList': TypeData(clazz='Interface', |
| 1407 item_type='SpeechInputResult', suppress_interface=True), | 1383 item_type='SpeechInputResult', suppress_interface=True), |
| 1408 'SpeechRecognitionResultList': TypeData(clazz='Interface', | 1384 'SpeechRecognitionResultList': TypeData(clazz='Interface', |
| 1409 item_type='SpeechRecognitionResult', suppress_interface=True), | 1385 item_type='SpeechRecognitionResult', suppress_interface=True), |
| 1410 'SQLResultSetRowList': TypeData(clazz='Interface', item_type='Dictionary'), | 1386 'SQLResultSetRowList': TypeData(clazz='Interface', item_type='Dictionary'), |
| 1411 'StyleSheetList': TypeData(clazz='Interface', | 1387 'StyleSheetList': TypeData(clazz='Interface', |
| 1412 item_type='StyleSheet', suppress_interface=True), | 1388 item_type='StyleSheet', suppress_interface=True), |
| 1413 'TextTrackCueList': TypeData(clazz='Interface', item_type='TextTrackCue'), | 1389 'TextTrackCueList': TypeData(clazz='Interface', item_type='TextTrackCue'), |
| 1414 'TextTrackList': TypeData(clazz='Interface', item_type='TextTrack'), | 1390 'TextTrackList': TypeData(clazz='Interface', item_type='TextTrack'), |
| 1415 'TouchList': TypeData(clazz='Interface', item_type='Touch'), | 1391 'TouchList': TypeData(clazz='Interface', item_type='Touch'), |
| 1416 'WebKitAnimationList': TypeData(clazz='Interface', | |
| 1417 item_type='WebKitAnimation', suppress_interface=True), | |
| 1418 | 1392 |
| 1419 'Float32Array': TypedArrayTypeData('double'), | 1393 'Float32Array': TypedArrayTypeData('double'), |
| 1420 'Float64Array': TypedArrayTypeData('double'), | 1394 'Float64Array': TypedArrayTypeData('double'), |
| 1421 'Int8Array': TypedArrayTypeData('int'), | 1395 'Int8Array': TypedArrayTypeData('int'), |
| 1422 'Int16Array': TypedArrayTypeData('int'), | 1396 'Int16Array': TypedArrayTypeData('int'), |
| 1423 'Int32Array': TypedArrayTypeData('int'), | 1397 'Int32Array': TypedArrayTypeData('int'), |
| 1424 'Uint8Array': TypedArrayTypeData('int'), | 1398 'Uint8Array': TypedArrayTypeData('int'), |
| 1425 'Uint8ClampedArray': TypedArrayTypeData('int'), | 1399 'Uint8ClampedArray': TypedArrayTypeData('int'), |
| 1426 'Uint16Array': TypedArrayTypeData('int'), | 1400 'Uint16Array': TypedArrayTypeData('int'), |
| 1427 'Uint32Array': TypedArrayTypeData('int'), | 1401 'Uint32Array': TypedArrayTypeData('int'), |
| 1428 | 1402 |
| 1429 'SVGAngle': TypeData(clazz='SVGTearOff'), | 1403 'SVGAngle': TypeData(clazz='SVGTearOff'), |
| 1430 'SVGLength': TypeData(clazz='SVGTearOff'), | 1404 'SVGLength': TypeData(clazz='SVGTearOff'), |
| 1431 'SVGLengthList': TypeData(clazz='SVGTearOff', item_type='SVGLength'), | 1405 'SVGLengthList': TypeData(clazz='SVGTearOff', item_type='SVGLength'), |
| 1432 'SVGMatrix': TypeData(clazz='SVGTearOff'), | 1406 'SVGMatrix': TypeData(clazz='SVGTearOff'), |
| 1433 'SVGNumber': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<fl
oat>'), | 1407 'SVGNumber': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<fl
oat>'), |
| 1434 'SVGNumberList': TypeData(clazz='SVGTearOff', item_type='SVGNumber'), | 1408 'SVGNumberList': TypeData(clazz='SVGTearOff', item_type='SVGNumber'), |
| 1435 'SVGPathSegList': TypeData(clazz='SVGTearOff', item_type='SVGPathSeg', | 1409 'SVGPathSegList': TypeData(clazz='SVGTearOff', item_type='SVGPathSeg', |
| 1436 native_type='SVGPathSegListPropertyTearOff'), | 1410 native_type='SVGPathSegListPropertyTearOff'), |
| 1437 'SVGPoint': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<Flo
atPoint>'), | 1411 'SVGPoint': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<Flo
atPoint>'), |
| 1438 'SVGPointList': TypeData(clazz='SVGTearOff'), | 1412 'SVGPointList': TypeData(clazz='SVGTearOff'), |
| 1439 'SVGPreserveAspectRatio': TypeData(clazz='SVGTearOff'), | 1413 'SVGPreserveAspectRatio': TypeData(clazz='SVGTearOff'), |
| 1440 'SVGRect': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<Floa
tRect>'), | 1414 'SVGRect': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<Floa
tRect>'), |
| 1441 'SVGStringList': TypeData(clazz='SVGTearOff', item_type='DOMString', | 1415 'SVGStringList': TypeData(clazz='SVGTearOff', item_type='DOMString', |
| 1442 native_type='SVGStaticListPropertyTearOff<SVGStringList>'), | 1416 native_type='SVGStaticListPropertyTearOff<SVGStringList>'), |
| 1443 'SVGTransform': TypeData(clazz='SVGTearOff'), | 1417 'SVGTransform': TypeData(clazz='SVGTearOff'), |
| 1444 'SVGTransformList': TypeData(clazz='SVGTearOff', item_type='SVGTransform', | 1418 'SVGTransformList': TypeData(clazz='SVGTearOff', item_type='SVGTransform', |
| 1445 native_type='SVGTransformListPropertyTearOff'), | 1419 native_type='SVGTransformListPropertyTearOff'), |
| 1446 } | 1420 }) |
| 1447 | 1421 |
| 1448 _svg_supplemental_includes = [ | 1422 _svg_supplemental_includes = [ |
| 1449 '"SVGAnimatedPropertyTearOff.h"', | 1423 '"SVGAnimatedPropertyTearOff.h"', |
| 1450 '"SVGAnimatedListPropertyTearOff.h"', | 1424 '"SVGAnimatedListPropertyTearOff.h"', |
| 1451 '"SVGStaticListPropertyTearOff.h"', | 1425 '"SVGStaticListPropertyTearOff.h"', |
| 1452 '"SVGAnimatedListPropertyTearOff.h"', | 1426 '"SVGAnimatedListPropertyTearOff.h"', |
| 1453 '"SVGTransformListPropertyTearOff.h"', | 1427 '"SVGTransformListPropertyTearOff.h"', |
| 1454 '"SVGPathSegListPropertyTearOff.h"', | 1428 '"SVGPathSegListPropertyTearOff.h"', |
| 1455 ] | 1429 ] |
| 1456 | 1430 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 self) | 1473 self) |
| 1500 | 1474 |
| 1501 if type_data.clazz == 'SVGTearOff': | 1475 if type_data.clazz == 'SVGTearOff': |
| 1502 dart_interface_name = self._renamer.RenameInterface( | 1476 dart_interface_name = self._renamer.RenameInterface( |
| 1503 self._database.GetInterface(type_name)) | 1477 self._database.GetInterface(type_name)) |
| 1504 return SVGTearOffIDLTypeInfo( | 1478 return SVGTearOffIDLTypeInfo( |
| 1505 type_name, type_data, dart_interface_name, self) | 1479 type_name, type_data, dart_interface_name, self) |
| 1506 | 1480 |
| 1507 class_name = '%sIDLTypeInfo' % type_data.clazz | 1481 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1508 return globals()[class_name](type_name, type_data) | 1482 return globals()[class_name](type_name, type_data) |
| OLD | NEW |