Changes between Version 5 and Version 6 of WebKitIDL
- Timestamp:
- Jan 27, 2012 6:01:12 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WebKitIDL
v5 v6 23 23 == ''[Supplemental]'' == 24 24 25 [http://dev.w3.org/2006/webapi/WebIDL/#dfn-supplemental-interface The spec]. 26 [http://old.nabble.com/Things-missing-from-Web-IDL-for-HTML5-td24873773.html Easy explanation] 25 * [http://dev.w3.org/2006/webapi/WebIDL/#dfn-supplemental-interface The spec] 26 27 * [http://old.nabble.com/Things-missing-from-Web-IDL-for-HTML5-td24873773.html Easy explanation] 27 28 28 29 The [Supplemental] IDL helps WebKit modularization. The [Supplemental] IDL makes it possible to add XXX's APIs (e.g. XXX=WebAudio, WebSocket, Blob, GamePad, ...etc) without modifying code outside of WebCore/Modules/XXX/. This helps make XXX a "self-contained module". … … 30 31 Here is an example. Without the [Supplemental] IDL, if we want to add attributes or methods of XXX to DOMWindow, 31 32 32 * we need to modify WebCore/page/DOMWindow.idl to add the IDLs of the attributes or methods33 * we need to modify WebCore/page/DOMWindow.idl to add the IDLs of the attributes or methods 33 34 34 * we might need to modify WebCore/page/DOMWindow.{h,cpp} to add the C++ implementation of attribute getters and setters or method callbacks.35 * we might need to modify WebCore/page/DOMWindow.{h,cpp} to add the C++ implementation of attribute getters and setters or method callbacks. 35 36 36 37 On the other hand, in the modularized world with the [Supplemental] IDL, we just need to modify the code under WebCore/Modules/XXX/, like this: 37 38 38 * WebCore/Modules/XXX/DOMWindowXXX.idl39 * WebCore/Modules/XXX/DOMWindowXXX.idl 39 40 {{{ 40 41 interface [ … … 47 48 }}} 48 49 49 * WebCore/Modules/XXX/DOMWindowXXX.h50 * WebCore/Modules/XXX/DOMWindowXXX.h 50 51 {{{ 51 52 DOMWindowXXX::foo(...) { ... } // the C++ implementation of the foo attribute getter