Changes between Version 52 and Version 53 of WebKitIDL
- Timestamp:
- Feb 20, 2012 6:02:44 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v52 v53 105 105 - [#CustomReturn CustomReturn(p)] 106 106 107 - [#OmitConstructor OmitConstructor, Immutable, MasqueradesAsUndefined] 108 109 - [#CustomGetOwnPropertySlot CustomGetOwnPropertySlot, ReplaceableConstructor, ExtendsDOMGlobalObject, IsIndex, V8DoNotCheckSignature, NumericIndexedGetter] 107 - [#OmitConstructor OmitConstructor, Immutable, MasqueradesAsUndefined, CustomGetOwnPropertySlot, ReplaceableConstructor, ExtendsDOMGlobalObject, IsIndex, V8DoNotCheckSignature, NumericIndexedGetter] 110 108 111 109 … … 242 240 In the following explanations, (i), (m), (a) or (p) means that a given 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. 243 241 244 == 242 == [TreatNullAs](a,p), [TreatUndefinedAs](a,p) == #TreatNullAs 245 243 246 244 * [http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs The spec of TreatNullAs] (Note: The WebKit behavior explained below is different from the spec) … … 273 271 [TreatUndefinedAs=NullString] must be used with [TreatNullAs=NullString], i.e. [TreatNullAs=NullString, TreatUndefinedAs=NullString]. 274 272 275 == 273 == [TreatReturnedNullStringAs](m,a) == #TreatReturnedNullStringAs 276 274 277 275 Summary: [TreatReturnedNullStringAs] controls the behavior when a WebKit null string is returned from the WebCore implementation. … … 292 290 Note that what should be specified on [TreatReturnedNullStringAs=...] depends on the spec of each attribute or method. 293 291 294 == 292 == [Optional](p) == #Optional 295 293 296 294 Summary: [Optional] allows method overloading for methods whose argument counts are different with each other. … … 329 327 d.IsEmpty() and d.IsNull() return true. 330 328 331 == 329 == [Callback](i,p) FIXME == #Callback 332 330 333 331 Summary: ADD SUMMARY … … 344 342 ADD EXPLANATIONS 345 343 346 == 344 == [Custom](m,a), [JSCustom](m,a), [V8Custom](m,a), [CustomGetter](a), [JSCustomGetter](a), [V8CustomGetter](a), [CustomSetter](a), [JSCustomSetter](a), [V8CustomSetter](a) == #Custom 347 345 348 346 Summary: They allow you to write bindings code manually as you like. … … 471 469 Note: ObjC, GObject and CPP bindings do not support custom bindings. 472 470 473 == 471 == [CallWith](i,m,a) == #CallWith 474 472 475 473 Summary: [CallWith] indicates that the bindings code calls a WebCore method with additional information. … … 503 501 For example, in case of func4(...), HTMLFoo::func3(ScriptArguments* arguments, ScriptCallStack* callstack, int a, int b) is called in WebCore. 504 502 505 == 503 == [StrictTypeChecking](m,a) FIXME == #StrictTypeChecking 506 504 507 505 Summary: ADD SUMMARY … … 515 513 ADD EXPLANATIONS 516 514 517 == 515 == [ReturnNewObject](m,a) == #ReturnNewObject 518 516 519 517 Summary: [ReturnNewObject] controls whether WebCore can return a cached wrapped object or WebCore needs to return a newly created wrapped object every time. … … 539 537 you can specify [ReturnNewObject]. 540 538 541 == 539 == [ImplementedAs](m) == #ImplementedAs 542 540 543 541 Summary: [ImplementedAs] specifies a method name in WebCore, if the method name in an IDL file and the method name in WebCore are different. … … 554 552 You should avoid using [ImplementedAs] as much as possible though. 555 553 556 == 554 == [Reflect](a) FIXME == #Reflect 557 555 558 556 Summary: ADD SUMMARY … … 601 599 Whether [Replaceable] should be specified or not depends on the spec of each attribute. 602 600 603 == 601 == [Deletable](a), [NotEnumerable](a), [V8ReadOnly](a) == #Deletable 604 602 605 603 * [http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf The spec of Writable, Enumerable and Configurable (Section 8.6.1)] … … 672 670 In addition, setters always need to invalidate the cache. 673 671 674 == 672 == [V8Unforgeable](m,a), [V8OnProto](m,a) == #V8Unforgeable 675 673 676 674 * [http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable The spec of Unforgeable] … … 721 719 ADD EXPLANATIONS 722 720 723 == 721 == [Supplemental](i) == #Supplemental 724 722 725 723 * [http://dev.w3.org/2006/webapi/WebIDL/#dfn-supplemental-interface The spec of Supplemental] … … 883 881 In other words, in case of Event, you should specify [InitializedByEventConstructor] on bubbles and cancelable. 884 882 885 == 883 == [NamedConstructor](i) == #NamedConstructor 886 884 887 885 * [http://dev.w3.org/2006/webapi/WebIDL/#NamedConstructor The spec of NamedConstructor] … … 903 901 Whether you should allow an interface to have a named constructor or not depends on the spec of each interface. 904 902 905 == 903 == [CustomConstructor](i), [JSCustomConstructor](i), [V8CustomConstructor](i), [ConstructorParameters](i) == #CustomConstructor 906 904 907 905 Summary: They allow you to write custom bindings for constructors. … … 997 995 If [Conditional] is specified on an interface, it means that [Conditional] is specified on all attributes and methods of the interface. 998 996 999 == 997 == [V8EnabledAtRuntime](i,m,a) == #V8EnabledAtRuntime 1000 998 1001 999 Summary: In Chromium/V8, you can enable or disable a flag at runtime. … … 1034 1032 it means that [V8EnabledAtRuntime] is specified on all the attributes and methods of the interface, 1035 1033 1036 == 1034 == [CustomToJSObject](i), [JSCustomToJSObject](i), [V8CustomToJSObject](i) == #CustomToJSObject 1037 1035 1038 1036 Summary: They allow you to write custom toJS() or toV8(). … … 1106 1104 * [DoNotCheckSecurity] on an attribute is equivalent to [DoNotCheckSecurityOnGetter, DoNotCheckSecurityOnSetter]. 1107 1105 1108 == 1106 == [CheckSecurityForNode](m,a) == #CheckSecurityForNode 1109 1107 1110 1108 Summary: [CheckSecurityForNode] checks whether a given access to Node is allowed or not, in terms of the same-origin security policy. … … 1173 1171 }}} 1174 1172 1175 == 1173 == [NamedGetter](i) == #NamedGetter 1176 1174 1177 1175 * [http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties The spec of named properties] (Note: The WebKit behavior explained below is different from the spec) … … 1247 1245 }}} 1248 1246 1249 == 1247 == [EventTarget](i) FIXME == #EventTarget 1250 1248 1251 1249 Summary: ADD SUMMARY … … 1261 1259 ADD EXPLANATIONS 1262 1260 1263 == 1264 1265 Summary: [DoNotCheckConstants] stops inserting compile-time assertions for constants of a given interface.1261 == [DoNotCheckConstants](i) == #DoNotCheckConstants 1262 1263 Summary: [DoNotCheckConstants] indicates that constant values in an IDL file can be different from constant values in WebCore implementation. 1266 1264 1267 1265 Usage: [DoNotCheckConstants] can be specified on interfaces: … … 1270 1268 DoNotCheckConstants 1271 1269 ] XXX { 1272 const unsigned short NOT_FOUND_ERR = 123 ;1273 const unsigned short SYNTAX_ERR = 12 4;1274 }; 1275 }}} 1276 1277 Without [DoNotCheckConstants], compile-time assertions are generated to check if the constant values defined in IDL files1278 are equal to the constant values in Web Kitimplementation.1279 In the above example, if NOT_FOUND_ERR were 100 in WebKit implementation, the build will fail.1280 Basically values of all constants are defined in the spec, 1281 and thus the values defined in IDL files and the values in WebKit implementations should be equal to the values defined in the spec. 1282 1283 If you want to introduce non-speced constant values and allow different values between IDL files and WebKitimplementation,1284 you can specify [DoNotCheckConstants] on the interfaceto skip the compile-time assertions.1285 1286 == 1287 1288 Summary: [ActiveDOMObject] indicates that a DOM object should be kept alive whenthe DOM object has pending activities.1270 const unsigned short NOT_FOUND_ERR = 12345; 1271 const unsigned short SYNTAX_ERR = 12346; 1272 }; 1273 }}} 1274 1275 By default (i.e. without [DoNotCheckConstants]), compile-time assertions are inserted to check if the constant values defined in IDL files 1276 are equal to the constant values in WebCore implementation. 1277 In the above example, if NOT_FOUND_ERR were implemented as 100 in WebCore, the build will fail. 1278 1279 Note that basically all constant values are defined in the spec, 1280 and thus the values in WebCore implementation should be equal to the values defined in the spec. 1281 If you really want to introduce non-speced constant values and allow different values between IDL files and WebCore implementation, 1282 you can specify [DoNotCheckConstants] to skip the compile-time assertions. 1283 1284 == [ActiveDOMObject](i) == #ActiveDOMObject 1285 1286 Summary: [ActiveDOMObject] indicates that a given DOM object should be kept alive as long as the DOM object has pending activities. 1289 1287 1290 1288 Usage: [ActiveDOMObject] can be specified on interfaces: … … 1297 1295 1298 1296 If a given DOM object needs to be kept alive as long as the DOM object has pending activities, you need to specify [ActiveDOMObject]. 1299 For example, [ActiveDOMObject] can be used when the DOM object is expecting events to be raised .1297 For example, [ActiveDOMObject] can be used when the DOM object is expecting events to be raised in the future. 1300 1298 1301 1299 If an interface X has [ActiveDOMObject] and an interface Y inherits the interface X, 1302 1300 then the interface Y should also have [ActiveDOMObject]. 1303 1301 1304 == 1302 == [V8DependentLifeTime](i) FIXME == #V8DependentLifeTime 1305 1303 1306 1304 Summary: ADD SUMMARY … … 1316 1314 ADD EXPLANATIONS 1317 1315 1318 == 1316 == [CustomEnumerateProperty](i), [CustomDeleteProperty](i) == #CustomEnumerateProperty 1319 1317 1320 1318 Summary: [CustomEnumerateProperty] allows you to write custom bindings for the case where properties of a given interface are enumerated. … … 1330 1328 }}} 1331 1329 1332 With [CustomEnumerateProperty], you can write custom bindings when properties of XXX are enumerated.1330 * [CustomEnumerateProperty] in JavaScriptCore: You can write custom bindings when properties of XXX are enumerated. 1333 1331 Specifically, you can write JSXXX::getOwnPropertyNames(...) in WebCore/bindings/js/JSXXXCustom.cpp: 1332 1334 1333 {{{ 1335 1334 void JSXXX::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) … … 1338 1337 } 1339 1338 }}} 1340 and V8XXX::namedPropertyQuery(...) and V8XXX::namedPropertyEnumerator(...) in WebCore/bindings/v8/custom/V8XXXCustom.cpp: 1339 1340 * [CustomEnumerateProperty] in V8: You can write custom bindings as V8XXX::namedPropertyQuery(...) and V8XXX::namedPropertyEnumerator(...) in WebCore/bindings/v8/custom/V8XXXCustom.cpp: 1341 1341 1342 {{{ 1342 1343 v8::Handle<v8::Integer> V8XXX::namedPropertyQuery(v8::Local<v8::String> name, const v8::AccessorInfo& info) … … 1351 1352 }}} 1352 1353 1353 With [CustomDeleteProperty], you can write custom bindings for the case where a property of XXX is deleted.1354 * [CustomDeleteProperty] in JavaScriptCore: You can write custom bindings for the case where a property of XXX is deleted. 1354 1355 Specifically, you can write JSXXX::deleteProperty(...) in WebCore/bindings/js/JSXXXCustom.cpp: 1356 1355 1357 {{{ 1356 1358 bool JSXXX::deleteProperty(JSCell* cell, ExecState* exec, const Identifier& propertyName) … … 1359 1361 } 1360 1362 }}} 1361 and V8XXX::namedPropertyDeleter(...) in WebCore/bindings/v8/custom/V8XXXCustom.cpp: 1363 1364 * [CustomDeleteProperty] in V8: You can write custom bindings as V8XXX::namedPropertyDeleter(...) in WebCore/bindings/v8/custom/V8XXXCustom.cpp: 1365 1362 1366 {{{ 1363 1367 v8::Handle<v8::Boolean> V8XXX::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info) … … 1367 1371 }}} 1368 1372 1369 == 1370 1371 Summary: It indicates that theinterface is a WorkerContext-related interface.1372 1373 Usage: [IsWorkerContext] can be specified on WorkerContext-related interfaces :1373 == [IsWorkerContext](i) == #IsWorkerContext 1374 1375 Summary: [IsWorkerContext] indicates that a given interface is a WorkerContext-related interface. 1376 1377 Usage: [IsWorkerContext] can be specified on WorkerContext-related interfaces only: 1374 1378 {{{ 1375 1379 interface [ 1376 1380 IsWorkerContext 1377 1381 ] SharedWorkerContext { 1378 ...; 1379 }; 1380 }}} 1381 1382 == [CustomCall](i) == #CustomCall 1382 }; 1383 }}} 1384 1385 == [CustomCall](i) == #CustomCall 1383 1386 1384 1387 Summary: [CustomCall] allows you to write custom bindings for call(...) of a given interface. … … 1411 1414 }}} 1412 1415 1413 == 1416 == [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomDefineOwnPropertyOnPrototype](i), [JSCustomGetOwnPropertySlotAndDescriptor](i) == #JSCustomToNativeObject 1414 1417 1415 1418 Summary: They allow you to write custom code for the JavaScriptCore code that would be generated automatically by default. … … 1512 1515 }}} 1513 1516 1514 == 1515 1516 Summary: They force JavaScriptCore bindings to generate JavaScriptCore specific methodseven if a given interface has a parent interface.1517 == [JSGenerateToJSObject](i), [JSGenerateIsReachable](i), [JSGenerateToNativeObject](i) == #JSGenerateToJSObject 1518 1519 Summary: They force JavaScriptCore bindings to generate JavaScriptCore-specific methods, even if a given interface has a parent interface. 1517 1520 1518 1521 Usage: They can be specified on interfaces that do not have a parent interface: … … 1526 1529 }}} 1527 1530 1528 toJS(...), isReachableFromOpaqueRoots(...) or toXXX() are not generated if the interfacehas a parent interface.1529 If you want to generate it even if the interfacedoes not have a parent interface, you can specify1531 toJS(...), isReachableFromOpaqueRoots(...) or toXXX() is not generated if XXX has a parent interface. 1532 If you want to generate it even if XXX does not have a parent interface, you can specify 1530 1533 [JSGenerateToJSObject], [JSGenerateIsReachable] or [JSGenerateToNativeObject], respectively. 1531 1534 1532 == 1533 1534 Summary: Itallows you to write a custom header for a given interface.1535 == [JSCustomHeader](i) == #JSCustomHeader 1536 1537 Summary: [JSCustomHeader] allows you to write a custom header for a given interface. 1535 1538 1536 1539 Usage: [JSCustomHeader] can be specified on interfaces: … … 1542 1545 }}} 1543 1546 1544 By default, JSXXX.h and JSXXX.cpp are generated automatically, and if you need, 1545 you can write custom bindings in WebCore/bindings/js/JSXXXCustom.cpp. 1546 On the other hand, [JSCustomHeader] allows you to write WebCore/bindings/js/JSXXXCustom.h, which is included by JSXXX.h. 1547 1548 1549 == [JSLegacyParent](i) == #JSLegacyParent 1550 1551 Summary: It explicitly controls the parent interface of a given interface. 1552 1553 Usage: [JSLegacyParent] can be specified on interfaces: 1547 By default, JSXXX.h and JSXXX.cpp are generated automatically. 1548 By specifying [Custom*], you can write custom bindings in WebCore/bindings/js/JSXXXCustom.cpp. 1549 In addition, by specifying [JSCustomHeader], you can write custom header in WebCore/bindings/js/JSXXXCustom.h, which will be included by JSXXX.h. 1550 1551 == [JSLegacyParent](i) == #JSLegacyParent 1552 1553 Summary: [JSLegacyParent] explicitly controls the parent interface of a given interface. 1554 1555 Usage: [JSLegacyParent] can be specified on interfaces that do not have a parent interface: 1554 1556 {{{ 1555 1557 interface [ … … 1561 1563 Even if a given interface does not have a parent interface, you can specify a parent interface using [JSLegacyParent]. 1562 1564 1563 == 1564 1565 Summary: It makes getOwnPropertySlot(...) and getOwnPropertyDescriptor(...) an inline method for performance.1565 == [JSInlineGetOwnPropertySlot](i) == #JSInlineGetOwnPropertySlot 1566 1567 Summary: For performance, [JSInlineGetOwnPropertySlot] makes getOwnPropertySlot(...) and getOwnPropertyDescriptor(...) an inline method. 1566 1568 1567 1569 Usage: [JSInlineGetOwnPropertySlot] can be specified on interfaces: … … 1573 1575 }}} 1574 1576 1575 == 1577 == [JSNoStaticTables](i) FIXME == #JSNoStaticTables 1576 1578 1577 1579 Summary: ADD SUMMARY … … 1587 1589 ADD EXPLANATIONS 1588 1590 1589 == 1591 == [ObjCProtocol](i), [ObjCPolymorphic](i), [ObjCLegacyUnnamedParameters](m), [ObjCUseDefaultView](m), [ObjCImplementedAsUnsignedLongLong](a) == #ObjCProtocol 1590 1592 1591 1593 Used by ObjC bindings only. 1592 1594 1593 == 1595 == [CPPPureInterface](i) == #CPPPureInterface 1594 1596 1595 1597 Used by CPP bindings only. 1596 1598 1597 == 1599 == [CustomReturn](p) == #CustomReturn 1598 1600 1599 1601 Used by ObjC, GObject and CPP bindings only. 1600 1602 1601 == [OmitConstructor], [Immutable], [MasqueradesAsUndefined]== #OmitConstructor1603 == [OmitConstructor], [Immutable], [MasqueradesAsUndefined], [CustomGetOwnPropertySlot], [ReplaceableConstructor], [ExtendsDOMGlobalObject], [IsIndex], [V8DoNotCheckSignature], [NumericIndexedGetter]== #OmitConstructor 1602 1604 1603 1605 Might be deprecated. Discussion is on-going. 1604 1605 == [CustomGetOwnPropertySlot], [ReplaceableConstructor], [ExtendsDOMGlobalObject], [IsIndex], [V8DoNotCheckSignature], [NumericIndexedGetter] == #CustomGetOwnPropertySlot1606 1607 Will be deprecated. Discussion is on-going.