Changes between Version 5 and Version 6 of WebKitIDL


Ignore:
Timestamp:
Jan 27, 2012 6:01:12 PM (10 years ago)
Author:
haraken@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v5 v6  
    2323== ''[Supplemental]'' ==
    2424
    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]
    2728
    2829The [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".
     
    3031Here is an example. Without the [Supplemental] IDL, if we want to add attributes or methods of XXX to DOMWindow,
    3132
    32 * we need to modify WebCore/page/DOMWindow.idl to add the IDLs of the attributes or methods
     33 * we need to modify WebCore/page/DOMWindow.idl to add the IDLs of the attributes or methods
    3334
    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.
    3536
    3637On the other hand, in the modularized world with the [Supplemental] IDL, we just need to modify the code under WebCore/Modules/XXX/, like this:
    3738
    38 * WebCore/Modules/XXX/DOMWindowXXX.idl
     39 * WebCore/Modules/XXX/DOMWindowXXX.idl
    3940{{{
    4041   interface [
     
    4748}}}
    4849
    49 * WebCore/Modules/XXX/DOMWindowXXX.h
     50 * WebCore/Modules/XXX/DOMWindowXXX.h
    5051{{{
    5152   DOMWindowXXX::foo(...) { ... }   // the C++ implementation of the foo attribute getter