Changes between Version 37 and Version 38 of WebKitIDL
- Timestamp:
- Feb 17, 2012, 2:22:48 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v37 v38 106 106 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. 107 107 108 == = * [TreatNullAs](a,p), [TreatUndefinedAs](a,p) ===108 == [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == 109 109 110 110 * [http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs The spec of TreatNullAs] (Note: The WebKit IDL explained below behaves differently from the spec) … … 137 137 [TreatUndefinedAs=NullString] must be used with [TreatNullAs=NullString], i.e. [TreatNullAs=NullString, TreatUndefinedAs=NullString]. 138 138 139 == = * [TreatReturnedNullStringAs](m,a) ===139 == [TreatReturnedNullStringAs](m,a) == 140 140 141 141 Summary: It controls the behavior when a WebKit null string is returned. … … 156 156 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. 157 157 158 == = * [Optional](p) ===158 == [Optional](p) == 159 159 160 160 Summary: It allows method overloading for methods whose argument count are different with each other. … … 186 186 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. 187 187 188 == = * [Callback](i,p) FIXME ===188 == [Callback](i,p) FIXME == 189 189 190 190 Summary: ADD SUMMARY … … 201 201 ADD EXPLANATIONS 202 202 203 == = * [Custom](m,a), [JSCustom](m,a), [V8Custom](m,a), [CustomGetter](a), [JSCustomGetter](a), [V8CustomGetter](a), [CustomSetter](a), [JSCustomSetter](a), [V8CustomSetter](a) ===203 == [Custom](m,a), [JSCustom](m,a), [V8Custom](m,a), [CustomGetter](a), [JSCustomGetter](a), [V8CustomGetter](a), [CustomSetter](a), [JSCustomSetter](a), [V8CustomSetter](a) == 204 204 205 205 Summary: If your bindings require special (i.e. "custom") handling, you can write the bindings code as you like. … … 328 328 Note: ObjC, GObject and CPP bindings do not support custom bindings. 329 329 330 == = * [CallWith](i,m,a) ===330 == [CallWith](i,m,a) == 331 331 332 332 Summary: It calls a WebCore method with additional information. … … 358 358 HTMLFoo::func3(ScriptArguments* arguments, ScriptCallStack* callstack, int a, int b) is called. 359 359 360 == = * [CheckAccessToNode](m,a) ===360 == [CheckAccessToNode](m,a) == 361 361 362 362 Summary: It checks if a given Node access is allowed in terms of security. … … 372 372 This is really important for security. 373 373 374 == = * [StrictTypeChecking](m,a) FIXME ===374 == [StrictTypeChecking](m,a) FIXME == 375 375 376 376 Summary: ADD SUMMARY … … 384 384 ADD EXPLANATIONS 385 385 386 == = * [ReturnNewObject](m,a) ===386 == [ReturnNewObject](m,a) == 387 387 388 388 Summary: It controls whether WebCore can return a cached wrapper object or not. … … 409 409 410 410 411 == = * [ImplementedAs](m) ===411 == [ImplementedAs](m) == 412 412 413 413 Summary: It specifies a method name in WebCore implementation, if the IDL method name and the WebCore method name are different. … … 423 423 You should avoid using [ImplementedAs] as much as possible though. 424 424 425 == = * [Reflect](a) FIXME ===425 == [Reflect](a) FIXME == 426 426 427 427 Summary: ADD SUMMARY … … 434 434 ADD EXPLANATIONS 435 435 436 == = * [Replaceable](a) ===436 == [Replaceable](a) == 437 437 438 438 * [http://dev.w3.org/2006/webapi/WebIDL/#Replaceable The spec of replaceable] … … 471 471 472 472 473 == = * [Deletable](a), [NotEnumerable](a), [V8ReadOnly](a) ===473 == [Deletable](a), [NotEnumerable](a), [V8ReadOnly](a) == 474 474 475 475 * [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf The spec of Writable, Enumerable and Configurable (8.6.1)] … … 488 488 [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". 489 489 490 == = * [CachedAttribute](a) ===490 == [CachedAttribute](a) == 491 491 492 492 Summary: For performance optimization, it indicates to cache a wrapped object in a DOM object. … … 539 539 but also it increases the overhead of "cache-miss"ed getters and setters (Setters always need to invalidate the caches). 540 540 541 == = * [V8Unforgeable](m,a), [V8OnProto](m,a) ===541 == [V8Unforgeable](m,a), [V8OnProto](m,a) == 542 542 543 543 * [http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable The spec of Unforgeable] … … 563 563 You should not use them unless you have a strong reason to use them. 564 564 565 == = * [URL](a) ===565 == [URL](a) == 566 566 567 567 Summary: It indicates that a given DOMString is a URL. … … 576 576 If you forgot to specify [URL], then the attribute getter might cause a bug. 577 577 578 == = * [JSWindowEventListener](a) FIXME ===578 == [JSWindowEventListener](a) FIXME == 579 579 580 580 Summary: ADD SUMMARY … … 587 587 ADD EXPLANATIONS 588 588 589 == IDL attributes around interfaces == 590 591 === * [Supplemental](i) === 589 == [Supplemental](i) == 592 590 593 591 * [http://dev.w3.org/2006/webapi/WebIDL/#dfn-supplemental-interface The spec of Supplemental] … … 633 631 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]. 634 632 635 == = * [Constructor](i), [CallWith](i,m,a), [ConstructorRaisesException](i) ===633 == [Constructor](i), [CallWith](i,m,a), [ConstructorRaisesException](i) == 636 634 637 635 * [http://dev.w3.org/2006/webapi/WebIDL/#Constructor The spec of Constructor] … … 696 694 Whether you should allow an interface to have constructor depends on the spec of the interface. 697 695 698 == = * [ConstructorTemplate](i), [InitializedByEventConstructor](a) ===696 == [ConstructorTemplate](i), [InitializedByEventConstructor](a) == 699 697 700 698 Summary: They are used for Event constructors. … … 737 735 In other words, in case of Event, you should specify [InitializedByEventConstructor] on bubbles and cancelable. 738 736 739 == = * [NamedConstructor](i) ===737 == [NamedConstructor](i) == 740 738 741 739 * [http://dev.w3.org/2006/webapi/WebIDL/#NamedConstructor The spec of NamedConstructor] … … 756 754 Whether you should allow an interface to have a named constructor depends on the spec of the interface. 757 755 758 == = * [CustomConstructor](i), [JSCustomConstructor](i), [V8CustomConstructor](i), [ConstructorParameters](i) ===756 == [CustomConstructor](i), [JSCustomConstructor](i), [V8CustomConstructor](i), [ConstructorParameters](i) == 759 757 760 758 Summary: They allow us to write custom bindings for constructors. … … 825 823 You do not need to specify [ConstructorParameters] if the interface does not have any of [JSCustomConstructor], [V8CustomConstructor] or [CustomConstructor]. 826 824 827 == = * [Conditional](i,m,a) ===825 == [Conditional](i,m,a) == 828 826 829 827 Summary: It inserts "#if ENABLE(SOME_FLAG) ... #endif" into the generated code. … … 849 847 If [Conditional] is specified on an interface, it means that [Conditional] is specified on all attributes and methods on the interface. 850 848 851 == = * [V8EnabledAtRuntime](i,m,a) ===849 == [V8EnabledAtRuntime](i,m,a) == 852 850 853 851 Summary: In Chromium/V8, we can enable/disable a flag at runtime. … … 887 885 and WebKit/chromium/src/WebRuntimeFeatures.cpp for more details. 888 886 889 == = * [CustomToJSObject](i), [JSCustomToJSObject](i), [V8CustomToJSObject](i) ===887 == [CustomToJSObject](i), [JSCustomToJSObject](i), [V8CustomToJSObject](i) == 890 888 891 889 Summary: They allow us to write custom toJS() or toV8(). … … 919 917 }}} 920 918 921 == = * [CheckAccessToFrame](i), [DoNotCheckAccessToFrame](m,a), [DoNotCheckAccessToFrameOnGetter](a), [DoNotCheckAccessToFrameOnSetter](a) ===919 == [CheckAccessToFrame](i), [DoNotCheckAccessToFrame](m,a), [DoNotCheckAccessToFrameOnGetter](a), [DoNotCheckAccessToFrameOnSetter](a) == 922 920 923 921 Summary: It checks if a given Frame access is allowed or not, in terms of security. … … 956 954 * [DoNotCheckAccessToFrame] on an attribute is equivalent to [DoNotCheckAccessToFrameOnGetter, DoNotCheckAccessToFrameOnSetter]. 957 955 958 == = * [IndexedGetter](i) ===956 == [IndexedGetter](i) == 959 957 960 958 * [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) … … 973 971 The bindings code is generated automatically so that XXX[i] behaves equivalent to XXX.item(i). 974 972 975 == = * [CustomIndexedSetter](i) ===973 == [CustomIndexedSetter](i) == 976 974 977 975 * [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) … … 1005 1003 }}} 1006 1004 1007 == = * [NamedGetter](i) ===1005 == [NamedGetter](i) == 1008 1006 1009 1007 * [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) … … 1022 1020 The bindings code is generated automatically so that XXX.foooooooo behaves equivalent to XXX.namedItem(i). 1023 1021 1024 == = [CustomNamedGetter](i), [CustomNamedSetter](i) ===1022 == [CustomNamedGetter](i), [CustomNamedSetter](i) == 1025 1023 1026 1024 * [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) … … 1075 1073 }}} 1076 1074 1077 == = * [EventTarget](i) FIXME ===1075 == [EventTarget](i) FIXME == 1078 1076 1079 1077 Summary: ADD SUMMARY … … 1089 1087 ADD EXPLANATIONS 1090 1088 1091 == = * [DoNotCheckConstants](i) ===1089 == [DoNotCheckConstants](i) == 1092 1090 1093 1091 Summary: [DoNotCheckConstants] stops inserting compile-time assertions for constants of a given interface. … … 1112 1110 you can specify [DoNotCheckConstants] on the interface to skip the compile-time assertions. 1113 1111 1114 == = * [ActiveDOMObject](i) ===1112 == [ActiveDOMObject](i) == 1115 1113 1116 1114 Summary: [ActiveDOMObject] indicates that a DOM object should be kept alive when the DOM object has pending activities. … … 1130 1128 then the interface Y should also have [ActiveDOMObject]. 1131 1129 1132 == = * [V8DependentLifeTime](i) FIXME ===1130 == [V8DependentLifeTime](i) FIXME == 1133 1131 1134 1132 Summary: ADD SUMMARY … … 1144 1142 ADD EXPLANATIONS 1145 1143 1146 == = * [CustomEnumerateProperty](i), [CustomDeleteProperty](i) ===1144 == [CustomEnumerateProperty](i), [CustomDeleteProperty](i) == 1147 1145 1148 1146 Summary: [CustomEnumerateProperty] allows us to write custom bindings for the case where properties of a given interface are enumerated. … … 1195 1193 }}} 1196 1194 1197 == = * [IsWorkerContext](i) ===1195 == [IsWorkerContext](i) == 1198 1196 1199 1197 Summary: It indicates that the interface is a WorkerContext-related interface. … … 1208 1206 }}} 1209 1207 1210 == = * [CustomCall](i) ===1208 == [CustomCall](i) == 1211 1209 1212 1210 Summary: [CustomCall] allows us to write custom bindings for call(...) of a given interface. … … 1237 1235 }}} 1238 1236 1239 == = * [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomDefineOwnPropertyOnPrototype](i), [JSCustomGetOwnPropertySlotAndDescriptor](i) ===1237 == [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomDefineOwnPropertyOnPrototype](i), [JSCustomGetOwnPropertySlotAndDescriptor](i) == 1240 1238 1241 1239 Summary: They allow us to write custom code for the JavaScriptCore code which would be generated automatically by default. … … 1329 1327 }}} 1330 1328 1331 == = * [JSGenerateToJSObject](i), [JSGenerateIsReachable](i), [JSGenerateToNativeObject](i) ===1329 == [JSGenerateToJSObject](i), [JSGenerateIsReachable](i), [JSGenerateToNativeObject](i) == 1332 1330 1333 1331 Summary: They force JavaScriptCore bindings to generate JavaScriptCore specific methods even if a given interface has a parent interface. … … 1347 1345 [JSGenerateToJSObject], [JSGenerateIsReachable] or [JSGenerateToNativeObject], respectively. 1348 1346 1349 == = * [JSCustomHeader](i) ===1347 == [JSCustomHeader](i) == 1350 1348 1351 1349 Summary: It allows us to write a custom header for a given interface. … … 1364 1362 1365 1363 1366 == = * [JSLegacyParent](i) ===1364 == [JSLegacyParent](i) == 1367 1365 1368 1366 Summary: It explicitly controls the parent interface of a given interface. … … 1378 1376 Even if a given interface does not have a parent interface, you can specify a parent interface using [JSLegacyParent]. 1379 1377 1380 == = * [JSInlineGetOwnPropertySlot](i) ===1378 == [JSInlineGetOwnPropertySlot](i) == 1381 1379 1382 1380 Summary: It makes getOwnPropertySlot(...) and getOwnPropertyDescriptor(...) an inline method for performance. … … 1390 1388 }}} 1391 1389 1392 == = * [JSNoStaticTables](i) FIXME ===1390 == [JSNoStaticTables](i) FIXME == 1393 1391 1394 1392 Summary: ADD SUMMARY … … 1404 1402 ADD EXPLANATIONS 1405 1403 1406 == IDL attributes used by ObjC, GObject and CPP bindings only == 1407 1408 === * [ObjCProtocol](i), [ObjCPolymorphic](i), [ObjCLegacyUnnamedParameters](m), [ObjCUseDefaultView](m), [ObjCImplementedAsUnsignedLongLong](a) === 1404 == [ObjCProtocol](i), [ObjCPolymorphic](i), [ObjCLegacyUnnamedParameters](m), [ObjCUseDefaultView](m), [ObjCImplementedAsUnsignedLongLong](a) == 1409 1405 1410 1406 Used by ObjC bindings only. 1411 1407 1412 == = * [CPPPureInterface](i) ===1408 == [CPPPureInterface](i) == 1413 1409 1414 1410 Used by CPP bindings only. 1415 1411 1416 == = * [CustomReturn](p) ===1412 == [CustomReturn](p) == 1417 1413 1418 1414 Used by ObjC, GObject and CPP bindings only. 1419 1415 1420 == IDL attributes which might be deprecated == 1421 1422 === * [OmitConstructor], [Immutable], [MasqueradesAsUndefined] === 1416 == [OmitConstructor], [Immutable], [MasqueradesAsUndefined] == 1423 1417 1424 1418 Might be deprecated. Discussion is on-going. 1425 1419 1426 == = * [CustomGetOwnPropertySlot], [ReplaceableConstructor], [ExtendsDOMGlobalObject], [IsIndex], [V8DoNotCheckSignature], [NumericIndexedGetter] ===1420 == [CustomGetOwnPropertySlot], [ReplaceableConstructor], [ExtendsDOMGlobalObject], [IsIndex], [V8DoNotCheckSignature], [NumericIndexedGetter] == 1427 1421 1428 1422 Will be deprecated. Discussion is on-going.