Changes between Version 155 and Version 156 of WebKitIDL


Ignore:
Timestamp:
Aug 28, 2017 11:21:16 AM (7 years ago)
Author:
Konstantin Tokarev
Comment:

Remove mentions of CPP bindings which are long gone

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v155 v156  
    4040 - [#JSNoStaticTables JSNoStaticTables(i)][[br]]
    4141 - [#ObjCProtocol ObjCProtocol(i), ObjCPolymorphic(i), ObjCLegacyUnnamedParameters(m), ObjCUseDefaultView(m), ObjCImplementedAsUnsignedLongLong(a)][[br]]
    42  - [#CPPPureInterface CPPPureInterface(i)][[br]]
    4342 - [#CustomReturn CustomReturn(p)][[br]]
    4443 - [#ArrayClass ArrayClass(i)][[br]]
     
    5655= Overview = #Overview
    5756
    58 The [http://www.w3.org/TR/WebIDL/ Web IDL] is a language that defines how WebCore interfaces are bound to external languages such as JavaScriptCore, ObjC, GObject and CPP. You need to write IDL files (e.g. XMLHttpRequest.idl, Element.idl, etc) to expose WebCore interfaces to those external languages. When WebKit is built, the IDL files are parsed, and the code to bind WebCore implementations and JavaScriptCore, ObjC, GObject and CPP interfaces is automatically generated.
     57The [http://www.w3.org/TR/WebIDL/ Web IDL] is a language that defines how WebCore interfaces are bound to external languages such as JavaScriptCore, ObjC, and GObject. You need to write IDL files (e.g. XMLHttpRequest.idl, Element.idl, etc) to expose WebCore interfaces to those external languages. When WebKit is built, the IDL files are parsed, and the code to bind WebCore implementations and JavaScriptCore, ObjC, and GObject interfaces is automatically generated.
    5958
    6059This document describes practical information about how the IDL bindings work and how you can write IDL files in WebKit. The syntax of IDL files is fairly well documented in the [http://www.w3.org/TR/WebIDL/ Web IDL spec], but it is too formal to read:-) and there are several differences between the Web IDL spec and the WebKit IDL due to implementation issues.
     
    9291The key points are as follows:
    9392
    94  * An IDL file controls how the bindings code between JavaScript engine (or ObjC, GObject, CPP) and the WebKit implementation is generated.
     93 * An IDL file controls how the bindings code between JavaScript engine (or ObjC, GObject) and the WebKit implementation is generated.
    9594 * IDL attributes enable you to control the bindings code more in detail.
    9695 * There are 90~ IDL attributes and their roles are explained in the subsequent sections.
     
    143142Tools/Scripts/run-bindings-tests tests IDL attributes.
    144143Specifically, run-bindings-tests reads WebCore/bindings/scripts/test/*.idl,
    145 and then generates bindings code to WebCore/bindings/scripts/test/{JS,ObjC,GObject,CPP}/*.
     144and then generates bindings code to WebCore/bindings/scripts/test/{JS,ObjC,GObject}/*.
    146145For example, run-bindings-tests reads WebCore/bindings/scripts/test/TestObj.idl,
    147146and then generates bindings code to WebCore/bindings/scripts/test/JS/JSTestObj.h, WebCore/bindings/scripts/test/JS/JSTestObj.cpp, etc.
     
    198197    WebKitBuild/Release/DerivedSources/webkit/WebKitDOMXXX.cpp
    199198}}}
    200  * CPP:
    201 
    202 {{{
    203     WebKitBuild/Release/DerivedSources/WebCore/WebDOMXXX.h
    204     WebKitBuild/Release/DerivedSources/WebCore/WebDOMXXX.cpp
    205 }}}
    206199
    207200= Basic naming rules of IDL attributes = #NamingRules
     
    213206 * ObjC-specific IDL attributes are prefixed by "ObjC".
    214207 * GObject-specific IDL attributes are prefixed by "GObject".
    215  * CPP-specific IDL attributes are prefixed by "CPP".
    216208 * IDL attributes for custom bindings are prefixed by "Custom".
    217209
     
    336328}}}
    337329
    338 Note: ObjC, GObject and CPP bindings do not support custom bindings.
     330Note: ObjC and GObject bindings do not support custom bindings.
    339331
    340332== `[CustomBinding]` == #CustomBinding
     
    377369The main difference between `[Custom]` and `[CustomBinding]` is that `[Custom]` generates a `jsXXXPrototypeFunctionMyMethod` where it performs the parameters management, casting to the object and calls the `JSXXX::myMethod` with the parameters and the instance. With `[CustomBinding]`, the implementation of `jsXXXPrototypeFunctionMyMethod` is not done automatically and it is up to the developer to do all the parameter, casting and call operations.
    378370
    379 Note: ObjC, GObject and CPP bindings do not support `[CustomBinding]` bindings.
     371Note: ObjC and GObject bindings do not support `[CustomBinding]` bindings.
    380372
    381373== `[CallWith]`(m,a), `[SetterCallWith]`(a) == #CallWith
     
    11921184Used by ObjC bindings only.
    11931185
    1194 == `[CPPPureInterface]`(i) == #CPPPureInterface
    1195 
    1196 Used by CPP bindings only.
    1197 
    11981186== `[CustomReturn]`(p) == #CustomReturn
    11991187
    1200 Used by ObjC, GObject and CPP bindings only.
     1188Used by ObjC and GObject bindings only.
    12011189
    12021190== `[ArrayClass]`(i) == #ArrayClass