Changes between Version 57 and Version 58 of WebKitIDL


Ignore:
Timestamp:
Feb 21, 2012 4:55:29 PM (12 years ago)
Author:
haraken@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v57 v58  
    55[#Overview Overview][[br]]
    66[#Basics Basics of IDL][[br]]
     7[#IDLAttributeChecker IDL attribute checker][[br]]
     8[#RunBindingsTests run-bindings-tests][[br]]
    79[#BindingsCode Where is the bindings code generated?][[br]]
    810[#NamingRules Basic naming rules of IDL attributes][[br]]
     
    8284Let us introduce some terminologies:
    8385
    84  * The above IDL file describes the Node ''''interface''''.
    85  * ELEMENT_NODE is a ''''constant'''' of the Node interface.
    86  * parentNode and nodeName are ''''attribute''''s of the Node interface.
    87  * appendChild(...) and addEventListener(...) are ''''method''''s of the Node interface.
    88  * type, listener and useCapture are ''''parameter''''s of the Node interface.
    89  * [JSCustomHeader], [CustomToJSObject], [TreatReturnedNullStringAs=Null], [Custom], [CustomReturn] and [Optional] are ''''IDL attribute''''s.
     86 * The above IDL file describes the Node '''interface'''.
     87 * ELEMENT_NODE is a '''constant''' of the Node interface.
     88 * parentNode and nodeName are '''attribute'''s of the Node interface.
     89 * appendChild(...) and addEventListener(...) are '''method'''s of the Node interface.
     90 * type, listener and useCapture are '''parameter'''s of the Node interface.
     91 * [JSCustomHeader], [CustomToJSObject], [TreatReturnedNullStringAs=Null], [Custom], [CustomReturn] and [Optional] are '''IDL attribute'''s.
    9092
    9193Note: These terminologies are not aligned with the Web IDL spec.
     
    127129}
    128130}}}
     131
     132= IDL attribute checker = #IDLAttributeChecker
     133
     134Previously there had been many bugs caused by typos of IDL attributes in IDL files.
     135To avoid such bugs, the IDL attribute checker is introduced to the WebKit build flow
     136to check if all the IDL attributes used in IDL files are implemented in code generators.
     137If you use an IDL attribute not implemented in code generators, the IDL attribute checker fails, and the WebKit build fails.
     138
     139A list of IDL attributes implemented in code generators is described in WebCore/bindings/scripts/IDLAttributes.txt.
     140If you want to add a new IDL attribute, you need to
     141
     142 1. add the IDL attribute to WebCore/bindings/scripts/IDLAttributes.txt.
     143 1. add the explanation to this document.
     144 1. add test cases to run-bindings-tests (explained below).
     145
     146= run-bindings-tests = #RunBindingsTests
     147
     148Tools/Scripts/run-bindings-tests tests IDL attributes.
     149Specifically, run-bindings-tests reads WebCore/bindings/scripts/test/*.idl,
     150and then generates bindings code to WebCore/bindings/scripts/test/{JS,V8,ObjC,GObject,CPP}/*.
     151For example, run-bindings-tests reads WebCore/bindings/scripts/test/TestObj.idl,
     152and then generates bindings code to WebCore/bindings/scripts/test/JS/JSTestObj.h, WebCore/bindings/scripts/test/JS/JSTestObj.cpp, etc.
     153
     154If you change the behavior of code generators or add a new IDL attribute,
     155please add test cases to WebCore/bindings/scripts/test/*.idl.
     156You can reset the results of run-bindings-tests using the --reset-results option:
     157{{{
     158    $ ./Tools/Scripts/run-bindings-tests --reset-results
     159}}}
     160
     161'''The objective of run-bindings-tests is to show you and reviewers how the code generation is changed by your patch.
     162If you change the behavior of code generators, please update the results of run-bindings-tests'''.
     163
     164That being said, people
     165
    129166
    130167= Where is the bindings code generated? = #BindingsCode