Changes between Version 114 and Version 115 of WebKitIDL


Ignore:
Timestamp:
May 9, 2013 2:40:52 AM (7 years ago)
Author:
Christophe Dumez
Comment:

Move extended attribute to their correct place

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v114 v115  
    6767{{{
    6868module core {
    69     interface [
     69    [
    7070        CustomToJSObject
    71     ] Node {
     71    ] interface Node {
    7272        const unsigned short ELEMENT_NODE = 1;
    7373        attribute Node parentNode;
    74         attribute [TreatReturnedNullStringAs=Null] DOMString nodeName;
     74        [TreatReturnedNullStringAs=Null] attribute DOMString nodeName;
    7575        [Custom] Node appendChild([CustomReturn] Node newChild);
    7676        void addEventListener(DOMString type, EventListener listener, optional boolean useCapture);
     
    104104{{{
    105105module MODULE_NAME {
    106     interface [
     106    [
    107107        IDL_ATTRIBUTE_ON_INTERFACE1,
    108108        IDL_ATTRIBUTE_ON_INTERFACE2,
    109         ...;
    110     ] INTERFACE_NAME {
     109        ...
     110    ] interface INTERFACE_NAME {
    111111        const unsigned long value = 12345;
    112         attribute [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...] Node node;
     112        [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...] attribute Node node;
    113113        [IDL_ATTRIBUTE_ON_METHOD1, IDL_ATTRIBUTE_ON_METHOD2, ...] void func([IDL_ATTRIBUTE_ON_PARAMETER1, IDL_ATTRIBUTE_ON_PARAMETER2, ...] int param, ...);
    114114    };
     
    121121    interface INTERFACE_NAME {
    122122        const unsigned long value = 12345;
    123         attribute [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...] Node node;
     123        [IDL_ATTRIBUTE_ON_ATTRIBUTE1, IDL_ATTRIBUTE_ON_ATTRIBUTE2, ...] attribute Node node;
    124124        [IDL_ATTRIBUTE_ON_METHOD1, IDL_ATTRIBUTE_ON_METHOD2, ...] void func([IDL_ATTRIBUTE_ON_PARAMETER1, IDL_ATTRIBUTE_ON_PARAMETER2, ...] int param, ...);
    125125    };
     
    234234They can be specified on DOMString attributes or DOMString parameters only:
    235235{{{
    236     attribute [TreatNullAs=NullString] DOMString str;
     236    [TreatNullAs=NullString] attribute DOMString str;
    237237    void func([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString str);
    238238}}}
     
    262262They can be specified on DOMString attributes or methods that return a DOMString value:
    263263{{{
    264     attribute [TreatReturnedNullStringAs=Null] DOMString str;
     264    [TreatReturnedNullStringAs=Null] attribute DOMString str;
    265265    [TreatReturnedNullStringAs=Undefined] DOMString func();
    266266}}}
     
    314314{{{
    315315    interface XXX {
    316         attribute [Clamp] unsigned short attributeName;
     316        [Clamp] attribute unsigned short attributeName;
    317317    };
    318318}}}
     
    340340{{{
    341341    [Custom] void func();
    342     attribute [CustomGetter, JSCustomSetter] DOMString str;
     342    [CustomGetter, JSCustomSetter] attribute DOMString str;
    343343}}}
    344344
     
    374374{{{
    375375    interface XXX {
    376         attribute [CustomGetter] DOMString str;
     376        [CustomGetter] attribute DOMString str;
    377377    };
    378378}}}
     
    390390{{{
    391391    interface XXX {
    392         attribute [CustomSetter] DOMString str;
     392        [CustomSetter] attribute DOMString str;
    393393    };
    394394}}}
     
    412412{{{
    413413    interface HTMLFoo {
    414         attribute [CallWith=ScriptExecutionContext] DOMString str;
     414        [CallWith=ScriptExecutionContext] attribute DOMString str;
    415415        [CallWith=ScriptExecutionContext] void func1(int a, int b);
    416416        [CallWith=ScriptState] void func2(int a, int b);
     
    441441Usage: `[StrictTypeChecking]` can be specified on methods and attributes:
    442442{{{
    443     attribute [StringTypeChecking] float x;
     443    [StringTypeChecking] attribute float x;
    444444    [StrictTypeChecking] DOMString func();
    445445}}}
     
    464464Usage: `[ReturnNewObject]` can be specified on methods or attributes:
    465465{{{
    466     attribute [ReturnNewObject] Node node;
     466    [ReturnNewObject] attribute Node node;
    467467    [ReturnNewObject] Node createTextNode();
    468468}}}
     
    490490{{{
    491491    [ImplementedAs=deleteFunction] void delete();
    492     attribute [ImplementedAs=classAttribute] int class;
     492    [ImplementedAs=classAttribute] attribute int class;
    493493}}}
    494494
     
    508508{{{
    509509    interface Element {
    510         attribute [Reflect] DOMString id;
    511         attribute [Reflect=class] DOMString className;
     510        [Reflect] attribute DOMString id;
     511        [Reflect=class] attribute DOMString className;
    512512    };
    513513}}}
     
    539539{{{
    540540    interface DOMWindow {
    541         attribute [Replaceable] screenX;
     541        [Replaceable] attribute screenX;
    542542    };
    543543}}}
     
    574574Usage: They can be specified on attributes:
    575575{{{
    576     attribute [NotEnumerable, Deletable] DOMString str;
     576    [NotEnumerable, Deletable] attribute DOMString str;
    577577    readonly attribute DOMString readonlyStr;
    578578}}}
     
    591591{{{
    592592    interface HTMLFoo {
    593         attribute [CachedAttribute] DOMString normalValue;
    594         attribute [CachedAttribute] SerializedScriptValue serializedValue;
     593        [CachedAttribute] attribute DOMString normalValue;
     594        [CachedAttribute] attribute SerializedScriptValue serializedValue;
    595595    };
    596596}}}
     
    642642Usage: `[JSWindowEventListener]` can be specified on `EventListener` attributes only:
    643643{{{
    644     attribute [JSWindowEventListener] EventListener onload;
     644    [JSWindowEventListener] attribute EventListener onload;
    645645}}}
    646646
     
    656656Usage: `[Constructor]`, `[CallWith]` and `[ConstructorRaisesException]` can be specified on interfaces:
    657657{{{
    658     interface [
     658    [
    659659        Constructor(float x, float y, DOMString str),
    660660        ConstructorRaisesException,
    661661        CallWith=ScriptExecutionContext|ScriptState
    662     ] XXX {
     662    ] interface XXX {
    663663    };
    664664}}}
     
    721721`[InitializedByEventConstructor]` can be specified on attributes in the Event interfaces:
    722722{{{
    723     interface [
     723    [
    724724        ConstructorTemplate=Event
    725     ] FooEvent {
     725    ] interface FooEvent {
    726726        attribute DOMString str1;
    727         attribute [InitializedByEventConstructor] DOMString str2;
     727        [InitializedByEventConstructor] attribute DOMString str2;
    728728    };
    729729}}}
     
    764764`[NamedConstructor]` can be specified on interfaces:
    765765{{{
    766     interface [
     766    [
    767767        NamedConstructor=Audio()
    768     ] HTMLAudioElement {
     768    ] interface HTMLAudioElement {
    769769    };
    770770}}}
     
    781781Regarding `[ConstructorParameters]`, the possible usage is `[ConstructorParameters=X]`, where `X` is the number of mandatory arguments of the constructor:
    782782{{{
    783     interface [
     783    [
    784784        CustomConstructor,
    785785        ConstructorParameters=4
    786     ] XXX {
     786    ] interface XXX {
    787787    };
    788788}}}
     
    801801
    802802{{{
    803     interface [
     803    [
    804804        CustomConstructor,
    805805        ConstructorParameters=2
    806     ] XXX {
     806    ] interface XXX {
    807807    };
    808808}}}
     
    827827Usage: `[Conditional]` can be specified on interfaces, methods and attributes:
    828828{{{
    829     interface [
     829    [
    830830        Conditional=INDEXED_DATABASE
    831     ] XXX {
     831    ] interface XXX {
    832832    };
    833833}}}
    834834{{{
    835835    interface XXX {
    836         attribute [Conditional=INDEXED_DATABASE] DOMString str;
     836        [Conditional=INDEXED_DATABASE] attribute DOMString str;
    837837        [Conditional=INDEXED_DATABASE] void open();
    838838    };
     
    854854that belong to interfaces that have `[CheckSecurity]`:
    855855{{{
    856     interface [
     856    [
    857857        CheckSecurity
    858     ] DOMWindow {
     858    ] interface DOMWindow {
    859859        attribute DOMString str1;
    860         attribute [DoNotCheckSecurity] DOMString str2:
    861         attribute [DoNotCheckSecurityOnGetter] DOMString str3:
    862         attribute [DoNotCheckSecurityOnSetter] DOMString str4:
     860        [DoNotCheckSecurity] attribute DOMString str2:
     861        [DoNotCheckSecurityOnGetter] attribute DOMString str3:
     862        [DoNotCheckSecurityOnSetter] attribute DOMString str4:
    863863        void func1();
    864864        [DoNotCheckSecurity] void func2();
     
    888888Usage: `[CheckSecurityForNode]` can be specified on methods or attributes:
    889889{{{
    890     attribute [CheckSecurityForNode] Node contentDocument;
     890    [CheckSecurityForNode] attribute Node contentDocument;
    891891    [CheckSecurityForNode] SVGDocument getSVGDocument();
    892892}}}
     
    904904Usage: `[IndexedGetter]` can be specified on interfaces:
    905905{{{
    906     interface [
     906    [
    907907        IndexedGetter
    908     ] XXX {
     908    ] interface XXX {
    909909    };
    910910}}}
     
    922922Usage: [CustomIndexedSetter] can be specified on interfaces:
    923923{{{
    924     interface [
     924    [
    925925        CustomIndexedSetter
    926     ] XXX {
     926    ] interface XXX {
    927927    };
    928928}}}
     
    949949Usage: `[NamedGetter]` can be specified on interfaces:
    950950{{{
    951     interface [
     951    [
    952952        NamedGetter
    953     ] XXX {
     953    ] interface XXX {
    954954    };
    955955}}}
     
    966966Usage: They can be specified on interfaces:
    967967{{{
    968     interface [
     968    [
    969969        CustomNamedGetter,
    970970        CustomNamedSetter
    971     ] XXX {
     971    ] interface XXX {
    972972    };
    973973}}}
     
    10221022Usage: `[EventTarget]` can be specified on interfaces:
    10231023{{{
    1024     interface [
     1024    [
    10251025        EventTarget
    1026     ] XXX {
     1026    ] interface XXX {
    10271027    };
    10281028}}}
     
    10361036Usage: `[DoNotCheckConstants]` can be specified on interfaces:
    10371037{{{
    1038     interface [
     1038    [
    10391039        DoNotCheckConstants
    1040     ] XXX {
     1040    ] interface XXX {
    10411041        const unsigned short NOT_FOUND_ERR = 12345;
    10421042        const unsigned short SYNTAX_ERR = 12346;
     
    10591059Usage: `[ActiveDOMObject]` can be specified on interfaces:
    10601060{{{
    1061     interface [
     1061    [
    10621062        ActiveDOMObject
    1063     ] XMLHttpRequest {
     1063    ] interface XMLHttpRequest {
    10641064    };
    10651065}}}
     
    10871087Usage: They can be specified on interfaces:
    10881088{{{
    1089     interface [
     1089    [
    10901090        CustomEnumerateProperty,
    10911091        CustomDeleteProperty
    1092     ] XXX {
     1092    ] interface XXX {
    10931093    };
    10941094}}}
     
    11201120Usage: `[IsWorkerContext]` can be specified on WorkerContext-related interfaces only:
    11211121{{{
    1122     interface [
     1122    [
    11231123        IsWorkerContext
    1124     ] SharedWorkerContext {
     1124    ] interface SharedWorkerContext {
    11251125    };
    11261126}}}
     
    11371137
    11381138{{{
    1139 interface [
    1140     ConstructorTemplate=TypedArray,
    1141     TypedArray=int
    1142 ] XXX : ArrayBufferView {
    1143     void set(TypedArray array, optional unsigned long offset);
    1144 }
     1139    [
     1140        ConstructorTemplate=TypedArray,
     1141        TypedArray=int
     1142    ] interface XXX : ArrayBufferView {
     1143        void set(TypedArray array, optional unsigned long offset);
     1144    }
    11451145}}}
    11461146
     
    11541154Usage: `[CustomCall]` can be specified on interfaces:
    11551155{{{
    1156     interface [
     1156    [
    11571157        CustomCall
    1158     ] XXX {
     1158    ] interface XXX {
    11591159    };
    11601160}}}
     
    11771177Usage: They can be specified on interfaces:
    11781178{{{
    1179     interface [
     1179    [
    11801180        JSCustomToNativeObject,
    11811181        JSCustomFinalize,
     
    11871187        JSCustomDefineOwnPropertyOnPrototype,
    11881188        JSCustomGetOwnPropertySlotAndDescriptor
    1189     ] XXX {
     1189    ] interface XXX {
    11901190    };
    11911191}}}
     
    12781278Usage: They can be specified on interfaces that do not have a parent interface:
    12791279{{{
    1280     interface [
     1280    [
    12811281        JSGenerateToJSObject,
    12821282        JSGenerateToNativeObject
    1283     ] XXX {
     1283    ] interface XXX {
    12841284    };
    12851285}}}
     
    12961296
    12971297{{{
    1298     interface [
     1298    [
    12991299        GenerateIsReachable=ImplBaseRoot
    1300     ] XXX {
     1300    ] interface XXX {
    13011301    };
    13021302}}}
     
    13221322Usage: `[JSLegacyParent]` can be specified on interfaces that do not have a parent interface:
    13231323{{{
    1324     interface [
     1324    [
    13251325        JSLegacyParent=JSDOMWindowBase
    1326     ] DOMWindow {
     1326    ] interface DOMWindow {
    13271327    };
    13281328}}}
     
    13361336Usage: `[JSInlineGetOwnPropertySlot]` can be specified on interfaces:
    13371337{{{
    1338     interface [
     1338    [
    13391339        JSInlineGetOwnPropertySlot
    1340     ] XXX {
     1340    ] interface XXX {
    13411341    };
    13421342}}}
     
    13501350Usage: `[JSNoStaticTables]` can be specified on interfaces:
    13511351{{{
    1352     interface [
     1352    [
    13531353        JSNoStaticTables
    1354     ] XXX {
     1354    ] interface XXX {
    13551355    };
    13561356}}}
     
    13811381
    13821382{{{
    1383 // IDL
    1384 interface [
    1385     ArrayClass,
    1386     IndexedGetter
    1387 ] NodeList {
    1388     Node item(unsigned long index);
    1389     readonly attribute unsigned long length;
    1390 }
    1391 
    1392 // JS
    1393 myNodeList instanceof Array  // true
    1394 myNodeList.forEach(function(node) { console.log(node_; });
     1383    // IDL
     1384    [
     1385        ArrayClass,
     1386        IndexedGetter
     1387    ] interface NodeList {
     1388        Node item(unsigned long index);
     1389        readonly attribute unsigned long length;
     1390    };
     1391
     1392    // JS
     1393    myNodeList instanceof Array  // true
     1394    myNodeList.forEach(function(node) { console.log(node_; });
    13951395}}}
    13961396
     
    14071407Usage: `[ImplementationNamespace]` can be specified on interfaces:
    14081408{{{
    1409     interface [
     1409    [
    14101410        ImplementationNamespace=WTF
    1411     ] ArrayBuffer {
     1411    ] interface ArrayBuffer {
    14121412    };
    14131413}}}
     
    14221422
    14231423{{{
    1424     interface [
     1424    [
    14251425        SkipVTableValidation
    1426     ] XXX {
    1427     };
    1428 }}}
    1429 
    1430 {{{
    1431     interface [
     1426    ] interface XXX {
     1427    };
     1428}}}
     1429
     1430{{{
     1431    [
    14321432        ImplementationLacksVTable
    1433     ] XXX {
    1434     };
    1435 }}}
     1433    ] interface XXX {
     1434    };
     1435}}}