Changes between Version 43 and Version 44 of WebKitIDL
- Timestamp:
- Feb 19, 2012, 10:22:43 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified WebKitIDL
v43 v44 4 4 5 5 [#Overview Overview] 6 6 7 [#Basics Basics of IDL] 8 7 9 [#BindingsCode Where is the bindings code?] 10 8 11 [#NamingRules Basic naming rules of IDL attribute] 12 9 13 [#IDLAttributes IDL attributes] 10 - [#TreatNullAs TreatNullAs] 14 15 - [#TreatNullAs TreatNullAs(a,p), TreatUndefinedAs(a,p)] 16 17 - [#TreatReturnedNullStringAs TreatReturnedNullStringAs(m,a)] 18 19 - [#Optional Optional(p)] 20 21 - [#Callback Callback(i,p) FIXME] 22 23 - [#Custom Custom(m,a), JSCustom(m,a), V8Custom(m,a), CustomGetter(a), JSCustomGetter(a), V8CustomGetter(a), CustomSetter(a), JSCustomSetter(a), V8CustomSetter(a)] 24 25 - [#CallWith CallWith(i,m,a)] 26 27 - [#CheckSecurityForNode CheckSecurityForNode(m,a)] 28 29 - [#StrictTypeChecking StrictTypeChecking(m,a) FIXME] 30 31 - [#ReturnNewObject ReturnNewObject(m,a)] 32 33 - [#ImplementedAs ImplementedAs(m)] 34 35 - [#Reflect Reflect(a) FIXME] 36 37 - [#Replaceable Replaceable(a)] 38 39 - [#Deletable Deletable(a), NotEnumerable(a), V8ReadOnly(a)] 40 41 - [#CachedAttribute CachedAttribute(a)] 42 43 - [#V8Unforgeable V8Unforgeable(m,a), V8OnProto(m,a)] 44 45 - [#URL URL(a)] 46 47 - [#JSWindowEventListener JSWindowEventListener(a) FIXME] 48 49 - [#Supplemental Supplemental(i)] 50 51 - [#Constructor Constructor(i), CallWith(i,m,a), ConstructorRaisesException(i)] 52 53 - [#ConstructorTemplate ConstructorTemplate(i), InitializedByEventConstructor(a)] 54 55 - [#NamedConstructor NamedConstructor(i)] 56 57 - [#CustomConstructor CustomConstructor(i), JSCustomConstructor(i), V8CustomConstructor(i), ConstructorParameters(i)] 58 59 - [#Conditional Conditional(i,m,a)] 60 61 - [#V8EnabledAtRuntime V8EnabledAtRuntime(i,m,a)] 62 63 - [#CustomToJSObject CustomToJSObject(i), JSCustomToJSObject(i), V8CustomToJSObject(i)] 64 65 - [#CheckSecurity CheckSecurity(i), DoNotCheckSecurity(m,a), DoNotCheckSecurityOnGetter(a), DoNotCheckSecurityOnSetter(a)] 66 67 - [#IndexedGetter IndexedGetter(i)] 68 69 - [#CustomIndexedSetter CustomIndexedSetter(i)] 70 71 - [#NamedGetter NamedGetter(i)] 72 73 - [#CustomNamedGetter CustomNamedGetter(i), CustomNamedSetter(i)] 74 75 - [#EventTarget EventTarget(i) FIXME] 76 77 - [#DoNotCheckConstants DoNotCheckConstants(i)] 78 79 - [#ActiveDOMObject ActiveDOMObject(i)] 80 81 - [#V8DependentLifeTime V8DependentLifeTime(i) FIXME] 82 83 - [#CustomEnumerateProperty CustomEnumerateProperty(i), CustomDeleteProperty(i)] 84 85 - [#IsWorkerContext IsWorkerContext(i)] 86 87 - [#CustomCall CustomCall(i)] 88 89 - [#JSCustomToNativeObject JSCustomToNativeObject(i), JSCustomFinalize(i), JSCustomIsReachable(i), JSCustomMarkFunction(i), JSCustomNamedGetterOnPrototype(i), JSCustomPushEventHandlerScope(i), JSCustomDefineOwnProperty(i), JSCustomDefineOwnPropertyOnPrototype(i), JSCustomGetOwnPropertySlotAndDescriptor(i)] 90 91 - [#JSGenerateToJSObject JSGenerateToJSObject(i), JSGenerateIsReachable(i), JSGenerateToNativeObject(i)] 92 93 - [#JSCustomHeader JSCustomHeader(i)] 94 95 - [#JSLegacyParent JSLegacyParent(i)] 96 97 - [#JSInlineGetOwnPropertySlot JSInlineGetOwnPropertySlot(i)] 98 99 - [#JSNoStaticTables JSNoStaticTables(i) FIXME] 100 101 - [#ObjCProtocol ObjCProtocol(i), ObjCPolymorphic(i), ObjCLegacyUnnamedParameters(m), ObjCUseDefaultView(m), ObjCImplementedAsUnsignedLongLong(a)] 102 103 - [#CPPPureInterface CPPPureInterface(i)] 104 105 - [#CustomReturn CustomReturn(p)] 106 107 - [#OmitConstructor OmitConstructor, Immutable, MasqueradesAsUndefined] 108 109 - [#CustomGetOwnPropertySlot CustomGetOwnPropertySlot, ReplaceableConstructor, ExtendsDOMGlobalObject, IsIndex, V8DoNotCheckSignature, NumericIndexedGetter] 110 11 111 12 112 = Overview = #Overview … … 117 217 In the following explanations, (i), (m), (a) and (p) means that the IDL attribute can be specified on interfaces, methods, attributes and parameters, respectively. For example, (a,p) means that the IDL attribute can be specified on attributes and parameters. 118 218 119 == [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == #TreatNullAs 219 == [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == #TreatNullAs #TreatNullAs 120 220 121 221 * [http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs The spec of TreatNullAs] (Note: The WebKit IDL explained below behaves differently from the spec) … … 148 248 [TreatUndefinedAs=NullString] must be used with [TreatNullAs=NullString], i.e. [TreatNullAs=NullString, TreatUndefinedAs=NullString]. 149 249 150 == [TreatReturnedNullStringAs](m,a) == 250 == [TreatReturnedNullStringAs](m,a) == #TreatReturnedNullStringAs 151 251 152 252 Summary: It controls the behavior when a WebKit null string is returned. … … 167 267 Without [TreatReturnedNullStringAs=...], if the returned string is a WebKit null string, the returned value becomes a JavaScript empty string ''. Note that what should be specified depends on the spec of each attribute or method. 168 268 169 == [Optional](p) == 269 == [Optional](p) == #Optional 170 270 171 271 Summary: It allows method overloading for methods whose argument count are different with each other. … … 197 297 While in [Optional=DefalutIsUndefined] the "supplemented" JavaScript undefined is converted to a WebKit string "undefined", in [Optional=DefaultIsNullString] the "supplemented" JavaScript undefined is converted to a WebKit null string. Specifically, if JavaScript calls func3(100, 200), then HTMLFoo::func3(int a, int b, String c, String d) is called in WebCore. Here 100 is passed to a, 200 is passed to b, a WebKit string "undefined" is passed to c, and a WebKit null string is passed to d. 198 298 199 == [Callback](i,p) FIXME == 299 == [Callback](i,p) FIXME == #Callback 200 300 201 301 Summary: ADD SUMMARY … … 212 312 ADD EXPLANATIONS 213 313 214 == [Custom](m,a), [JSCustom](m,a), [V8Custom](m,a), [CustomGetter](a), [JSCustomGetter](a), [V8CustomGetter](a), [CustomSetter](a), [JSCustomSetter](a), [V8CustomSetter](a) == 314 == [Custom](m,a), [JSCustom](m,a), [V8Custom](m,a), [CustomGetter](a), [JSCustomGetter](a), [V8CustomGetter](a), [CustomSetter](a), [JSCustomSetter](a), [V8CustomSetter](a) == #Custom 215 315 216 316 Summary: If your bindings require special (i.e. "custom") handling, you can write the bindings code as you like. … … 339 439 Note: ObjC, GObject and CPP bindings do not support custom bindings. 340 440 341 == [CallWith](i,m,a) == 441 == [CallWith](i,m,a) == #CallWith 342 442 343 443 Summary: It calls a WebCore method with additional information. … … 369 469 HTMLFoo::func3(ScriptArguments* arguments, ScriptCallStack* callstack, int a, int b) is called. 370 470 371 == [CheckSecurityForNode](m,a) == 471 == [CheckSecurityForNode](m,a) == #CheckSecurityForNode 372 472 373 473 Summary: It checks if a given Node access is allowed in terms of security. … … 383 483 This is really important for security. 384 484 385 == [StrictTypeChecking](m,a) FIXME == 485 == [StrictTypeChecking](m,a) FIXME == #StrictTypeChecking 386 486 387 487 Summary: ADD SUMMARY … … 395 495 ADD EXPLANATIONS 396 496 397 == [ReturnNewObject](m,a) == 497 == [ReturnNewObject](m,a) == #ReturnNewObject 398 498 399 499 Summary: It controls whether WebCore can return a cached wrapper object or not. … … 420 520 421 521 422 == [ImplementedAs](m) == 522 == [ImplementedAs](m) == #ImplementedAs 423 523 424 524 Summary: It specifies a method name in WebCore implementation, if the IDL method name and the WebCore method name are different. … … 434 534 You should avoid using [ImplementedAs] as much as possible though. 435 535 436 == [Reflect](a) FIXME == 536 == [Reflect](a) FIXME == #Reflect 437 537 438 538 Summary: ADD SUMMARY … … 445 545 ADD EXPLANATIONS 446 546 447 == [Replaceable](a) == 547 == [Replaceable](a) == #Replaceable 448 548 449 549 * [http://dev.w3.org/2006/webapi/WebIDL/#Replaceable The spec of replaceable] … … 482 582 483 583 484 == [Deletable](a), [NotEnumerable](a), [V8ReadOnly](a) == 584 == [Deletable](a), [NotEnumerable](a), [V8ReadOnly](a) == #Deletable 485 585 486 586 * [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf The spec of Writable, Enumerable and Configurable (8.6.1)] … … 499 599 [Deletable] indicates that the attribute is deletable. [NotEnumerable] indicates that the attribute is not enumerable. [V8ReadOnly] indicates that the attribute is readonly in V8 even if the attribute is not prefixed by "readonly". 500 600 501 == [CachedAttribute](a) == 601 == [CachedAttribute](a) == #CachedAttribute 502 602 503 603 Summary: For performance optimization, it indicates to cache a wrapped object in a DOM object. … … 550 650 but also it increases the overhead of "cache-miss"ed getters and setters (Setters always need to invalidate the caches). 551 651 552 == [V8Unforgeable](m,a), [V8OnProto](m,a) == 652 == [V8Unforgeable](m,a), [V8OnProto](m,a) == #V8Unforgeable 553 653 554 654 * [http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable The spec of Unforgeable] … … 574 674 You should not use them unless you have a strong reason to use them. 575 675 576 == [URL](a) == 676 == [URL](a) == #URL 577 677 578 678 Summary: It indicates that a given DOMString is a URL. … … 587 687 If you forgot to specify [URL], then the attribute getter might cause a bug. 588 688 589 == [JSWindowEventListener](a) FIXME == 689 == [JSWindowEventListener](a) FIXME == #JSWindowEventListener 590 690 591 691 Summary: ADD SUMMARY … … 598 698 ADD EXPLANATIONS 599 699 600 == [Supplemental](i) == 700 == [Supplemental](i) == #Supplemental 601 701 602 702 * [http://dev.w3.org/2006/webapi/WebIDL/#dfn-supplemental-interface The spec of Supplemental] … … 645 745 If you want to add APIs whose implementations are likely to be independent from WebCore, it is strongly recommended to put the APIs and .h/.cpp files into WebCore/Modules/XXX/ using [Supplemental]. 646 746 647 == [Constructor](i), [CallWith](i,m,a), [ConstructorRaisesException](i) == 747 == [Constructor](i), [CallWith](i,m,a), [ConstructorRaisesException](i) == #Constructor 648 748 649 749 * [http://dev.w3.org/2006/webapi/WebIDL/#Constructor The spec of Constructor] … … 708 808 Whether you should allow an interface to have constructor depends on the spec of the interface. 709 809 710 == [ConstructorTemplate](i), [InitializedByEventConstructor](a) == 810 == [ConstructorTemplate](i), [InitializedByEventConstructor](a) == #ConstructorTemplate 711 811 712 812 Summary: They are used for Event constructors. … … 749 849 In other words, in case of Event, you should specify [InitializedByEventConstructor] on bubbles and cancelable. 750 850 751 == [NamedConstructor](i) == 851 == [NamedConstructor](i) == #NamedConstructor 752 852 753 853 * [http://dev.w3.org/2006/webapi/WebIDL/#NamedConstructor The spec of NamedConstructor] … … 768 868 Whether you should allow an interface to have a named constructor depends on the spec of the interface. 769 869 770 == [CustomConstructor](i), [JSCustomConstructor](i), [V8CustomConstructor](i), [ConstructorParameters](i) == 870 == [CustomConstructor](i), [JSCustomConstructor](i), [V8CustomConstructor](i), [ConstructorParameters](i) == #CustomConstructor 771 871 772 872 Summary: They allow us to write custom bindings for constructors. … … 837 937 You do not need to specify [ConstructorParameters] if the interface does not have any of [JSCustomConstructor], [V8CustomConstructor] or [CustomConstructor]. 838 938 839 == [Conditional](i,m,a) == 939 == [Conditional](i,m,a) == #Conditional 840 940 841 941 Summary: It inserts "#if ENABLE(SOME_FLAG) ... #endif" into the generated code. … … 861 961 If [Conditional] is specified on an interface, it means that [Conditional] is specified on all attributes and methods on the interface. 862 962 863 == [V8EnabledAtRuntime](i,m,a) == 963 == [V8EnabledAtRuntime](i,m,a) == #V8EnabledAtRuntime 864 964 865 965 Summary: In Chromium/V8, we can enable/disable a flag at runtime. … … 899 999 and WebKit/chromium/src/WebRuntimeFeatures.cpp for more details. 900 1000 901 == [CustomToJSObject](i), [JSCustomToJSObject](i), [V8CustomToJSObject](i) == 1001 == [CustomToJSObject](i), [JSCustomToJSObject](i), [V8CustomToJSObject](i) == #CustomToJSObject 902 1002 903 1003 Summary: They allow us to write custom toJS() or toV8(). … … 931 1031 }}} 932 1032 933 == [CheckSecurity](i), [DoNotCheckSecurity](m,a), [DoNotCheckSecurityOnGetter](a), [DoNotCheckSecurityOnSetter](a) == 1033 == [CheckSecurity](i), [DoNotCheckSecurity](m,a), [DoNotCheckSecurityOnGetter](a), [DoNotCheckSecurityOnSetter](a) == #CheckSecurity 934 1034 935 1035 Summary: It checks if a given Frame access is allowed or not, in terms of security. … … 968 1068 * [DoNotCheckSecurity] on an attribute is equivalent to [DoNotCheckSecurityOnGetter, DoNotCheckSecurityOnSetter]. 969 1069 970 == [IndexedGetter](i) == 1070 == [IndexedGetter](i) == #IndexedGetter 971 1071 972 1072 * [http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties The spec of indexed properties] (Note: The WebKit IDL explained below behaves differently from the spec) … … 985 1085 The bindings code is generated automatically so that XXX[i] behaves equivalent to XXX.item(i). 986 1086 987 == [CustomIndexedSetter](i) == 1087 == [CustomIndexedSetter](i) == #CustomIndexedSetter 988 1088 989 1089 * [http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties The spec of indexed properties] (Note: The WebKit IDL explained below behaves differently from the spec) … … 1017 1117 }}} 1018 1118 1019 == [NamedGetter](i) == 1119 == [NamedGetter](i) == #NamedGetter 1020 1120 1021 1121 * [http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties The spec of named properties] (Note: The WebKit IDL explained below behaves differently from the spec) … … 1034 1134 The bindings code is generated automatically so that XXX.foooooooo behaves equivalent to XXX.namedItem(i). 1035 1135 1036 == [CustomNamedGetter](i), [CustomNamedSetter](i) == 1136 == [CustomNamedGetter](i), [CustomNamedSetter](i) == #CustomNamedGetter 1037 1137 1038 1138 * [http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties The spec of named properties] (Note: The WebKit IDL explained below behaves differently from the spec) … … 1087 1187 }}} 1088 1188 1089 == [EventTarget](i) FIXME == 1189 == [EventTarget](i) FIXME == #EventTarget 1090 1190 1091 1191 Summary: ADD SUMMARY … … 1101 1201 ADD EXPLANATIONS 1102 1202 1103 == [DoNotCheckConstants](i) == 1203 == [DoNotCheckConstants](i) == #DoNotCheckConstants 1104 1204 1105 1205 Summary: [DoNotCheckConstants] stops inserting compile-time assertions for constants of a given interface. … … 1124 1224 you can specify [DoNotCheckConstants] on the interface to skip the compile-time assertions. 1125 1225 1126 == [ActiveDOMObject](i) == 1226 == [ActiveDOMObject](i) == #ActiveDOMObject 1127 1227 1128 1228 Summary: [ActiveDOMObject] indicates that a DOM object should be kept alive when the DOM object has pending activities. … … 1142 1242 then the interface Y should also have [ActiveDOMObject]. 1143 1243 1144 == [V8DependentLifeTime](i) FIXME == 1244 == [V8DependentLifeTime](i) FIXME == #V8DependentLifeTime 1145 1245 1146 1246 Summary: ADD SUMMARY … … 1156 1256 ADD EXPLANATIONS 1157 1257 1158 == [CustomEnumerateProperty](i), [CustomDeleteProperty](i) == 1258 == [CustomEnumerateProperty](i), [CustomDeleteProperty](i) == #CustomEnumerateProperty 1159 1259 1160 1260 Summary: [CustomEnumerateProperty] allows us to write custom bindings for the case where properties of a given interface are enumerated. … … 1207 1307 }}} 1208 1308 1209 == [IsWorkerContext](i) == 1309 == [IsWorkerContext](i) == #IsWorkerContext 1210 1310 1211 1311 Summary: It indicates that the interface is a WorkerContext-related interface. … … 1220 1320 }}} 1221 1321 1222 == [CustomCall](i) == 1322 == [CustomCall](i) == #CustomCall 1223 1323 1224 1324 Summary: [CustomCall] allows us to write custom bindings for call(...) of a given interface. … … 1249 1349 }}} 1250 1350 1251 == [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomDefineOwnPropertyOnPrototype](i), [JSCustomGetOwnPropertySlotAndDescriptor](i) == 1351 == [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomDefineOwnPropertyOnPrototype](i), [JSCustomGetOwnPropertySlotAndDescriptor](i) == #JSCustomToNativeObject 1252 1352 1253 1353 Summary: They allow us to write custom code for the JavaScriptCore code which would be generated automatically by default. … … 1341 1441 }}} 1342 1442 1343 == [JSGenerateToJSObject](i), [JSGenerateIsReachable](i), [JSGenerateToNativeObject](i) == 1443 == [JSGenerateToJSObject](i), [JSGenerateIsReachable](i), [JSGenerateToNativeObject](i) == #JSGenerateToJSObject 1344 1444 1345 1445 Summary: They force JavaScriptCore bindings to generate JavaScriptCore specific methods even if a given interface has a parent interface. … … 1359 1459 [JSGenerateToJSObject], [JSGenerateIsReachable] or [JSGenerateToNativeObject], respectively. 1360 1460 1361 == [JSCustomHeader](i) == 1461 == [JSCustomHeader](i) == #JSCustomHeader 1362 1462 1363 1463 Summary: It allows us to write a custom header for a given interface. … … 1376 1476 1377 1477 1378 == [JSLegacyParent](i) == 1478 == [JSLegacyParent](i) == #JSLegacyParent 1379 1479 1380 1480 Summary: It explicitly controls the parent interface of a given interface. … … 1390 1490 Even if a given interface does not have a parent interface, you can specify a parent interface using [JSLegacyParent]. 1391 1491 1392 == [JSInlineGetOwnPropertySlot](i) == 1492 == [JSInlineGetOwnPropertySlot](i) == #JSInlineGetOwnPropertySlot 1393 1493 1394 1494 Summary: It makes getOwnPropertySlot(...) and getOwnPropertyDescriptor(...) an inline method for performance. … … 1402 1502 }}} 1403 1503 1404 == [JSNoStaticTables](i) FIXME == 1504 == [JSNoStaticTables](i) FIXME == #JSNoStaticTables 1405 1505 1406 1506 Summary: ADD SUMMARY … … 1416 1516 ADD EXPLANATIONS 1417 1517 1418 == [ObjCProtocol](i), [ObjCPolymorphic](i), [ObjCLegacyUnnamedParameters](m), [ObjCUseDefaultView](m), [ObjCImplementedAsUnsignedLongLong](a) == 1518 == [ObjCProtocol](i), [ObjCPolymorphic](i), [ObjCLegacyUnnamedParameters](m), [ObjCUseDefaultView](m), [ObjCImplementedAsUnsignedLongLong](a) == #ObjCProtocol 1419 1519 1420 1520 Used by ObjC bindings only. 1421 1521 1422 == [CPPPureInterface](i) == 1522 == [CPPPureInterface](i) == #CPPPureInterface 1423 1523 1424 1524 Used by CPP bindings only. 1425 1525 1426 == [CustomReturn](p) == 1526 == [CustomReturn](p) == #CustomReturn 1427 1527 1428 1528 Used by ObjC, GObject and CPP bindings only. 1429 1529 1430 == [OmitConstructor], [Immutable], [MasqueradesAsUndefined] == 1530 == [OmitConstructor], [Immutable], [MasqueradesAsUndefined] == #OmitConstructor 1431 1531 1432 1532 Might be deprecated. Discussion is on-going. 1433 1533 1434 == [CustomGetOwnPropertySlot], [ReplaceableConstructor], [ExtendsDOMGlobalObject], [IsIndex], [V8DoNotCheckSignature], [NumericIndexedGetter] == 1534 == [CustomGetOwnPropertySlot], [ReplaceableConstructor], [ExtendsDOMGlobalObject], [IsIndex], [V8DoNotCheckSignature], [NumericIndexedGetter] == #CustomGetOwnPropertySlot 1435 1535 1436 1536 Will be deprecated. Discussion is on-going.