Changes between Version 154 and Version 155 of WebKitIDL


Ignore:
Timestamp:
Oct 18, 2016 7:05:19 PM (4 years ago)
Author:
Chris Dumez
Comment:

Drop ConstructorTemplate and TypedArray as those are no longer supported

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v154 v155  
    2121 - [#JSWindowEventListener JSWindowEventListener(a)][[br]]
    2222 - [#Constructor Constructor(i), ConstructorCallWith(i), ConstructorRaisesException(i)][[br]]
    23  - [#ConstructorTemplate ConstructorTemplate(i), InitializedByEventConstructor(a)][[br]]
    2423 - [#NamedConstructor NamedConstructor(i)][[br]]
    2524 - [#CustomConstructor CustomConstructor(i)][[br]]
     
    3332 - [#ActiveDOMObject ActiveDOMObject(i)][[br]]
    3433 - [#CustomEnumerateProperty CustomEnumerateProperty(i), CustomDeleteProperty(i)][[br]]
    35  - [#TypedArray TypedArray(i), ConstructorTemplate=TypedArray(i)][[br]]
    3634 - [#CustomCall CustomCall(i)][[br]]
    3735 - [#JSCustomToNativeObject JSCustomToNativeObject(i), JSCustomFinalize(i), CustomIsReachable(i), JSCustomMarkFunction(i), JSCustomNamedGetterOnPrototype(i), JSCustomPushEventHandlerScope(i), JSCustomDefineOwnProperty(i), JSCustomDefineOwnPropertyOnPrototype(i), JSCustomGetOwnPropertySlotAndDescriptor(i)][[br]]
     
    669667Note: Currently `[Constructor(...)]` does not yet support optional arguments w/o defaults.
    670668
    671 == `[ConstructorTemplate]`(i), `[InitializedByEventConstructor]`(a) == #ConstructorTemplate
    672 
    673 Summary: They are used for Event constructors.
    674 
    675 Usage: The possible usage is `[ConstructorTemplate=Event]`.
    676 `[ConstructorTemplate=Event]` can be specified on Event interfaces only.
    677 `[InitializedByEventConstructor]` can be specified on attributes in the Event interfaces:
    678 {{{
    679     [
    680         ConstructorTemplate=Event
    681     ] interface FooEvent {
    682         attribute DOMString str1;
    683         [InitializedByEventConstructor] attribute DOMString str2;
    684     };
    685 }}}
    686 
    687 Since constructors for Event interfaces require special bindings,
    688 you need to use `[ConstructorTemplate=Event]` instead of normal `[Constructor]`.
    689 
    690 If you specify `[ConstructorTemplate=Event]` on FooEvent,
    691 JavaScript can create a DOM object of FooEvent in the following code:
    692 {{{
    693     var e = new FooEvent("type", { bubbles: true, cancelable: true });
    694 }}}
    695 Then FooEvent::create(...) is called in WebCore.
    696 Specifically, WebCore needs to implement the following method as a constructor callback:
    697 {{{
    698     PassRefPtr<FooEvent> FooEvent::create(const AtomicString& type, const FooEventInit& initializer)
    699     {
    700         ...;
    701     }
    702 }}}
    703 
    704 `[InitializedByEventConstructor]` should be specified on all the attributes
    705 that needs to be initialized by the constructor.
    706 Which attributes need initialization is defined in the spec of each Event interface.
    707 For example, look at [http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event the spec of Event].
    708 The EventInit dictionary has bubbles and cancelable, and thus bubbles and cancelable are the only attributes
    709 that need to be initialized by the Event constructor.
    710 In other words, in case of Event, you should specify `[InitializedByEventConstructor]` on bubbles and cancelable.
    711 
    712669== `[NamedConstructor]`(i) == #NamedConstructor
    713670
     
    1019976    }
    1020977}}}
    1021 
    1022 == `[TypedArray]`(i), [ConstructorTemplate=TypedArray](i) == #TypedArray
    1023 
    1024 * [http://www.khronos.org/registry/typedarray/specs/latest/#7 The spec of TypedArray]
    1025 
    1026 Summary: The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation.
    1027 TypedArray implements ArrayBufferView. Each of the typed array types has the following constructors, properties, constants and methods.
    1028 
    1029 Usage: `[TypedArray]` must be specified on interfaces in conjunction with `[ConstructorTemplate=TypedArray]`:
    1030 Example:
    1031 
    1032 {{{
    1033     [
    1034         ConstructorTemplate=TypedArray,
    1035         TypedArray=int
    1036     ] interface XXX : ArrayBufferView {
    1037         void set(TypedArray array, optional unsigned long offset);
    1038     }
    1039 }}}
    1040 
    1041 `TypedArray=*` Allows us to specify any valid typed array view type.
    1042 TypedArray interfaces require special bindings code, you need to use `[ConstructorTemplate=TypedArray]` instead of normal `[Constructor]`.
    1043978
    1044979== `[CustomCall]`(i) == #CustomCall