Changes between Version 116 and Version 117 of WebKitIDL


Ignore:
Timestamp:
May 17, 2013 2:41:50 PM (8 years ago)
Author:
Christophe Dumez
Comment:

Remove [ConstructorParameters] due to r150292

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v116 v117  
    2525 - [#ConstructorTemplate ConstructorTemplate(i), InitializedByEventConstructor(a)][[br]]
    2626 - [#NamedConstructor NamedConstructor(i)][[br]]
    27  - [#CustomConstructor CustomConstructor(i), ConstructorParameters(i)][[br]]
     27 - [#CustomConstructor CustomConstructor(i)[[br]]
    2828 - [#Conditional Conditional(i,m,a)][[br]]
    2929 - [#CheckSecurity CheckSecurity(i), DoNotCheckSecurity(m,a), DoNotCheckSecurityOnGetter(a), DoNotCheckSecurityOnSetter(a)][[br]]
     
    775775Whether you should allow an interface to have a named constructor or not depends on the spec of each interface.
    776776
    777 == `[CustomConstructor]`(i), `[ConstructorParameters]`(i) == #CustomConstructor
    778 
    779 Summary: They allow you to write custom bindings for constructors.
    780 
    781 Usage: They can be specified on interfaces.
    782 Regarding `[ConstructorParameters]`, the possible usage is `[ConstructorParameters=X]`, where `X` is the number of mandatory arguments of the constructor:
     777== `[CustomConstructor]`(i) == #CustomConstructor
     778
     779Summary: It allows you to write custom bindings for constructors.
     780
     781Usage: It can be specified on interfaces.
    783782{{{
    784783    [
    785784        CustomConstructor,
    786         ConstructorParameters=4
    787     ] interface XXX {
    788     };
    789 }}}
     785    ] interface XXX {
     786    };
     787
     788    [
     789        CustomConstructor(DOMString str, optional boolean flag),
     790    ] interface YYY {
     791    };
     792}}}
     793
     794The constructor arguments should be specified so that the bindings generator can properly compute the value for the "length" property of the constructor object.
    790795
    791796We should minimize the number of custom bindings as less as possible.
     
    804809    [
    805810        CustomConstructor,
    806         ConstructorParameters=2
    807811    ] interface XXX {
    808812    };
     
    816820}}}
    817821Refer to WebCore/bindings/js/JSXXXCustom.cpp for more details.
    818 
    819 `X` of `[ConstructorParameters=X]` is the number of mandatory arguments.
    820 For example, if a constructor signature is `[Constructor(int a, int b, [Default=Undefined] optional int c, [Default=DefaultIsUndefined] optional int d)]`, then `X` is 2.
    821 
    822 You do not need to specify `[ConstructorParameters]` if the interface does not have `[CustomConstructor]` extended attribute.
    823822
    824823== `[Conditional]`(i,m,a) == #Conditional