Changes between Version 114 and Version 115 of WebKitIDL
- Timestamp:
- May 9, 2013, 2:40:52 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v114 v115 67 67 {{{ 68 68 module core { 69 interface[69 [ 70 70 CustomToJSObject 71 ] Node {71 ] interface Node { 72 72 const unsigned short ELEMENT_NODE = 1; 73 73 attribute Node parentNode; 74 attribute [TreatReturnedNullStringAs=Null]DOMString nodeName;74 [TreatReturnedNullStringAs=Null] attribute DOMString nodeName; 75 75 [Custom] Node appendChild([CustomReturn] Node newChild); 76 76 void addEventListener(DOMString type, EventListener listener, optional boolean useCapture); … … 104 104 {{{ 105 105 module MODULE_NAME { 106 interface[106 [ 107 107 IDL_ATTRIBUTE_ON_INTERFACE1, 108 108 IDL_ATTRIBUTE_ON_INTERFACE2, 109 ... ;110 ] INTERFACE_NAME {109 ... 110 ] interface INTERFACE_NAME { 111 111 const unsigned long value = 12345; 112 attribute [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...]Node node;112 [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...] attribute Node node; 113 113 [IDL_ATTRIBUTE_ON_METHOD1, IDL_ATTRIBUTE_ON_METHOD2, ...] void func([IDL_ATTRIBUTE_ON_PARAMETER1, IDL_ATTRIBUTE_ON_PARAMETER2, ...] int param, ...); 114 114 }; … … 121 121 interface INTERFACE_NAME { 122 122 const unsigned long value = 12345; 123 attribute [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...]Node node;123 [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...] attribute Node node; 124 124 [IDL_ATTRIBUTE_ON_METHOD1, IDL_ATTRIBUTE_ON_METHOD2, ...] void func([IDL_ATTRIBUTE_ON_PARAMETER1, IDL_ATTRIBUTE_ON_PARAMETER2, ...] int param, ...); 125 125 }; … … 234 234 They can be specified on DOMString attributes or DOMString parameters only: 235 235 {{{ 236 attribute [TreatNullAs=NullString]DOMString str;236 [TreatNullAs=NullString] attribute DOMString str; 237 237 void func([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString str); 238 238 }}} … … 262 262 They can be specified on DOMString attributes or methods that return a DOMString value: 263 263 {{{ 264 attribute [TreatReturnedNullStringAs=Null]DOMString str;264 [TreatReturnedNullStringAs=Null] attribute DOMString str; 265 265 [TreatReturnedNullStringAs=Undefined] DOMString func(); 266 266 }}} … … 314 314 {{{ 315 315 interface XXX { 316 attribute [Clamp]unsigned short attributeName;316 [Clamp] attribute unsigned short attributeName; 317 317 }; 318 318 }}} … … 340 340 {{{ 341 341 [Custom] void func(); 342 attribute [CustomGetter, JSCustomSetter]DOMString str;342 [CustomGetter, JSCustomSetter] attribute DOMString str; 343 343 }}} 344 344 … … 374 374 {{{ 375 375 interface XXX { 376 attribute [CustomGetter]DOMString str;376 [CustomGetter] attribute DOMString str; 377 377 }; 378 378 }}} … … 390 390 {{{ 391 391 interface XXX { 392 attribute [CustomSetter]DOMString str;392 [CustomSetter] attribute DOMString str; 393 393 }; 394 394 }}} … … 412 412 {{{ 413 413 interface HTMLFoo { 414 attribute [CallWith=ScriptExecutionContext]DOMString str;414 [CallWith=ScriptExecutionContext] attribute DOMString str; 415 415 [CallWith=ScriptExecutionContext] void func1(int a, int b); 416 416 [CallWith=ScriptState] void func2(int a, int b); … … 441 441 Usage: `[StrictTypeChecking]` can be specified on methods and attributes: 442 442 {{{ 443 attribute [StringTypeChecking]float x;443 [StringTypeChecking] attribute float x; 444 444 [StrictTypeChecking] DOMString func(); 445 445 }}} … … 464 464 Usage: `[ReturnNewObject]` can be specified on methods or attributes: 465 465 {{{ 466 attribute [ReturnNewObject]Node node;466 [ReturnNewObject] attribute Node node; 467 467 [ReturnNewObject] Node createTextNode(); 468 468 }}} … … 490 490 {{{ 491 491 [ImplementedAs=deleteFunction] void delete(); 492 attribute [ImplementedAs=classAttribute]int class;492 [ImplementedAs=classAttribute] attribute int class; 493 493 }}} 494 494 … … 508 508 {{{ 509 509 interface Element { 510 attribute [Reflect]DOMString id;511 attribute [Reflect=class]DOMString className;510 [Reflect] attribute DOMString id; 511 [Reflect=class] attribute DOMString className; 512 512 }; 513 513 }}} … … 539 539 {{{ 540 540 interface DOMWindow { 541 attribute [Replaceable]screenX;541 [Replaceable] attribute screenX; 542 542 }; 543 543 }}} … … 574 574 Usage: They can be specified on attributes: 575 575 {{{ 576 attribute [NotEnumerable, Deletable]DOMString str;576 [NotEnumerable, Deletable] attribute DOMString str; 577 577 readonly attribute DOMString readonlyStr; 578 578 }}} … … 591 591 {{{ 592 592 interface HTMLFoo { 593 attribute [CachedAttribute]DOMString normalValue;594 attribute [CachedAttribute]SerializedScriptValue serializedValue;593 [CachedAttribute] attribute DOMString normalValue; 594 [CachedAttribute] attribute SerializedScriptValue serializedValue; 595 595 }; 596 596 }}} … … 642 642 Usage: `[JSWindowEventListener]` can be specified on `EventListener` attributes only: 643 643 {{{ 644 attribute [JSWindowEventListener]EventListener onload;644 [JSWindowEventListener] attribute EventListener onload; 645 645 }}} 646 646 … … 656 656 Usage: `[Constructor]`, `[CallWith]` and `[ConstructorRaisesException]` can be specified on interfaces: 657 657 {{{ 658 interface[658 [ 659 659 Constructor(float x, float y, DOMString str), 660 660 ConstructorRaisesException, 661 661 CallWith=ScriptExecutionContext|ScriptState 662 ] XXX {662 ] interface XXX { 663 663 }; 664 664 }}} … … 721 721 `[InitializedByEventConstructor]` can be specified on attributes in the Event interfaces: 722 722 {{{ 723 interface[723 [ 724 724 ConstructorTemplate=Event 725 ] FooEvent {725 ] interface FooEvent { 726 726 attribute DOMString str1; 727 attribute [InitializedByEventConstructor]DOMString str2;727 [InitializedByEventConstructor] attribute DOMString str2; 728 728 }; 729 729 }}} … … 764 764 `[NamedConstructor]` can be specified on interfaces: 765 765 {{{ 766 interface[766 [ 767 767 NamedConstructor=Audio() 768 ] HTMLAudioElement {768 ] interface HTMLAudioElement { 769 769 }; 770 770 }}} … … 781 781 Regarding `[ConstructorParameters]`, the possible usage is `[ConstructorParameters=X]`, where `X` is the number of mandatory arguments of the constructor: 782 782 {{{ 783 interface[783 [ 784 784 CustomConstructor, 785 785 ConstructorParameters=4 786 ] XXX {786 ] interface XXX { 787 787 }; 788 788 }}} … … 801 801 802 802 {{{ 803 interface[803 [ 804 804 CustomConstructor, 805 805 ConstructorParameters=2 806 ] XXX {806 ] interface XXX { 807 807 }; 808 808 }}} … … 827 827 Usage: `[Conditional]` can be specified on interfaces, methods and attributes: 828 828 {{{ 829 interface[829 [ 830 830 Conditional=INDEXED_DATABASE 831 ] XXX {831 ] interface XXX { 832 832 }; 833 833 }}} 834 834 {{{ 835 835 interface XXX { 836 attribute [Conditional=INDEXED_DATABASE]DOMString str;836 [Conditional=INDEXED_DATABASE] attribute DOMString str; 837 837 [Conditional=INDEXED_DATABASE] void open(); 838 838 }; … … 854 854 that belong to interfaces that have `[CheckSecurity]`: 855 855 {{{ 856 interface[856 [ 857 857 CheckSecurity 858 ] DOMWindow {858 ] interface DOMWindow { 859 859 attribute DOMString str1; 860 attribute [DoNotCheckSecurity]DOMString str2:861 attribute [DoNotCheckSecurityOnGetter]DOMString str3:862 attribute [DoNotCheckSecurityOnSetter]DOMString str4:860 [DoNotCheckSecurity] attribute DOMString str2: 861 [DoNotCheckSecurityOnGetter] attribute DOMString str3: 862 [DoNotCheckSecurityOnSetter] attribute DOMString str4: 863 863 void func1(); 864 864 [DoNotCheckSecurity] void func2(); … … 888 888 Usage: `[CheckSecurityForNode]` can be specified on methods or attributes: 889 889 {{{ 890 attribute [CheckSecurityForNode]Node contentDocument;890 [CheckSecurityForNode] attribute Node contentDocument; 891 891 [CheckSecurityForNode] SVGDocument getSVGDocument(); 892 892 }}} … … 904 904 Usage: `[IndexedGetter]` can be specified on interfaces: 905 905 {{{ 906 interface[906 [ 907 907 IndexedGetter 908 ] XXX {908 ] interface XXX { 909 909 }; 910 910 }}} … … 922 922 Usage: [CustomIndexedSetter] can be specified on interfaces: 923 923 {{{ 924 interface[924 [ 925 925 CustomIndexedSetter 926 ] XXX {926 ] interface XXX { 927 927 }; 928 928 }}} … … 949 949 Usage: `[NamedGetter]` can be specified on interfaces: 950 950 {{{ 951 interface[951 [ 952 952 NamedGetter 953 ] XXX {953 ] interface XXX { 954 954 }; 955 955 }}} … … 966 966 Usage: They can be specified on interfaces: 967 967 {{{ 968 interface[968 [ 969 969 CustomNamedGetter, 970 970 CustomNamedSetter 971 ] XXX {971 ] interface XXX { 972 972 }; 973 973 }}} … … 1022 1022 Usage: `[EventTarget]` can be specified on interfaces: 1023 1023 {{{ 1024 interface[1024 [ 1025 1025 EventTarget 1026 ] XXX {1026 ] interface XXX { 1027 1027 }; 1028 1028 }}} … … 1036 1036 Usage: `[DoNotCheckConstants]` can be specified on interfaces: 1037 1037 {{{ 1038 interface[1038 [ 1039 1039 DoNotCheckConstants 1040 ] XXX {1040 ] interface XXX { 1041 1041 const unsigned short NOT_FOUND_ERR = 12345; 1042 1042 const unsigned short SYNTAX_ERR = 12346; … … 1059 1059 Usage: `[ActiveDOMObject]` can be specified on interfaces: 1060 1060 {{{ 1061 interface[1061 [ 1062 1062 ActiveDOMObject 1063 ] XMLHttpRequest {1063 ] interface XMLHttpRequest { 1064 1064 }; 1065 1065 }}} … … 1087 1087 Usage: They can be specified on interfaces: 1088 1088 {{{ 1089 interface[1089 [ 1090 1090 CustomEnumerateProperty, 1091 1091 CustomDeleteProperty 1092 ] XXX {1092 ] interface XXX { 1093 1093 }; 1094 1094 }}} … … 1120 1120 Usage: `[IsWorkerContext]` can be specified on WorkerContext-related interfaces only: 1121 1121 {{{ 1122 interface[1122 [ 1123 1123 IsWorkerContext 1124 ] SharedWorkerContext {1124 ] interface SharedWorkerContext { 1125 1125 }; 1126 1126 }}} … … 1137 1137 1138 1138 {{{ 1139 interface[1140 ConstructorTemplate=TypedArray,1141 TypedArray=int1142 ]XXX : ArrayBufferView {1143 void set(TypedArray array, optional unsigned long offset);1144 }1139 [ 1140 ConstructorTemplate=TypedArray, 1141 TypedArray=int 1142 ] interface XXX : ArrayBufferView { 1143 void set(TypedArray array, optional unsigned long offset); 1144 } 1145 1145 }}} 1146 1146 … … 1154 1154 Usage: `[CustomCall]` can be specified on interfaces: 1155 1155 {{{ 1156 interface[1156 [ 1157 1157 CustomCall 1158 ] XXX {1158 ] interface XXX { 1159 1159 }; 1160 1160 }}} … … 1177 1177 Usage: They can be specified on interfaces: 1178 1178 {{{ 1179 interface[1179 [ 1180 1180 JSCustomToNativeObject, 1181 1181 JSCustomFinalize, … … 1187 1187 JSCustomDefineOwnPropertyOnPrototype, 1188 1188 JSCustomGetOwnPropertySlotAndDescriptor 1189 ] XXX {1189 ] interface XXX { 1190 1190 }; 1191 1191 }}} … … 1278 1278 Usage: They can be specified on interfaces that do not have a parent interface: 1279 1279 {{{ 1280 interface[1280 [ 1281 1281 JSGenerateToJSObject, 1282 1282 JSGenerateToNativeObject 1283 ] XXX {1283 ] interface XXX { 1284 1284 }; 1285 1285 }}} … … 1296 1296 1297 1297 {{{ 1298 interface[1298 [ 1299 1299 GenerateIsReachable=ImplBaseRoot 1300 ] XXX {1300 ] interface XXX { 1301 1301 }; 1302 1302 }}} … … 1322 1322 Usage: `[JSLegacyParent]` can be specified on interfaces that do not have a parent interface: 1323 1323 {{{ 1324 interface[1324 [ 1325 1325 JSLegacyParent=JSDOMWindowBase 1326 ] DOMWindow {1326 ] interface DOMWindow { 1327 1327 }; 1328 1328 }}} … … 1336 1336 Usage: `[JSInlineGetOwnPropertySlot]` can be specified on interfaces: 1337 1337 {{{ 1338 interface[1338 [ 1339 1339 JSInlineGetOwnPropertySlot 1340 ] XXX {1340 ] interface XXX { 1341 1341 }; 1342 1342 }}} … … 1350 1350 Usage: `[JSNoStaticTables]` can be specified on interfaces: 1351 1351 {{{ 1352 interface[1352 [ 1353 1353 JSNoStaticTables 1354 ] XXX {1354 ] interface XXX { 1355 1355 }; 1356 1356 }}} … … 1381 1381 1382 1382 {{{ 1383 // IDL1384 interface[1385 ArrayClass,1386 IndexedGetter1387 ]NodeList {1388 Node item(unsigned long index);1389 readonly attribute unsigned long length;1390 } 1391 1392 // JS1393 myNodeList instanceof Array // true1394 myNodeList.forEach(function(node) { console.log(node_; });1383 // IDL 1384 [ 1385 ArrayClass, 1386 IndexedGetter 1387 ] interface NodeList { 1388 Node item(unsigned long index); 1389 readonly attribute unsigned long length; 1390 }; 1391 1392 // JS 1393 myNodeList instanceof Array // true 1394 myNodeList.forEach(function(node) { console.log(node_; }); 1395 1395 }}} 1396 1396 … … 1407 1407 Usage: `[ImplementationNamespace]` can be specified on interfaces: 1408 1408 {{{ 1409 interface[1409 [ 1410 1410 ImplementationNamespace=WTF 1411 ] ArrayBuffer {1411 ] interface ArrayBuffer { 1412 1412 }; 1413 1413 }}} … … 1422 1422 1423 1423 {{{ 1424 interface[1424 [ 1425 1425 SkipVTableValidation 1426 ] XXX {1427 }; 1428 }}} 1429 1430 {{{ 1431 interface[1426 ] interface XXX { 1427 }; 1428 }}} 1429 1430 {{{ 1431 [ 1432 1432 ImplementationLacksVTable 1433 ] XXX {1434 }; 1435 }}} 1433 ] interface XXX { 1434 }; 1435 }}}