Changeset 207302 in webkit


Ignore:
Timestamp:
Oct 13, 2016 12:26:19 PM (8 years ago)
Author:
Chris Dumez
Message:

Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*]
https://bugs.webkit.org/show_bug.cgi?id=163390

Reviewed by Darin Adler.

Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*] as the
modern way of doing this is to use a constructor that takes in a
dictionary. I am working on getting rid of this extended attribute
entirely but the remaining uses require better support for union types.

  • Modules/applepay/ApplePayValidateMerchantEvent.idl:
  • Modules/indexeddb/IDBVersionChangeEvent.idl:
  • Modules/mediastream/RTCTrackEvent.idl:
  • bindings/scripts/CodeGenerator.pm:

(IsConstructorTemplate):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDefinition):
(IsConstructable):

  • bindings/scripts/IDLAttributes.txt:
  • dom/Event.idl:
  • dom/ProgressEvent.idl:
  • dom/UIEvent.idl:
  • html/track/TrackEvent.idl:
Location:
trunk/Source/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207301 r207302  
     12016-10-13  Chris Dumez  <cdumez@apple.com>
     2
     3        Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*]
     4        https://bugs.webkit.org/show_bug.cgi?id=163390
     5
     6        Reviewed by Darin Adler.
     7
     8        Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*] as the
     9        modern way of doing this is to use a constructor that takes in a
     10        dictionary. I am working on getting rid of this extended attribute
     11        entirely but the remaining uses require better support for union types.
     12
     13        * Modules/applepay/ApplePayValidateMerchantEvent.idl:
     14        * Modules/indexeddb/IDBVersionChangeEvent.idl:
     15        * Modules/mediastream/RTCTrackEvent.idl:
     16        * bindings/scripts/CodeGenerator.pm:
     17        (IsConstructorTemplate):
     18        * bindings/scripts/CodeGeneratorJS.pm:
     19        (GenerateConstructorDefinition):
     20        (IsConstructable):
     21        * bindings/scripts/IDLAttributes.txt:
     22        * dom/Event.idl:
     23        * dom/ProgressEvent.idl:
     24        * dom/UIEvent.idl:
     25        * html/track/TrackEvent.idl:
     26
    1272016-10-13  Ryan Haddad  <ryanhaddad@apple.com>
    228
  • trunk/Source/WebCore/Modules/applepay/ApplePayValidateMerchantEvent.idl

    r202309 r207302  
    2828    NoInterfaceObject,
    2929] interface ApplePayValidateMerchantEvent : Event {
    30     [InitializedByEventConstructor] readonly attribute DOMString validationURL;
     30    readonly attribute DOMString validationURL;
    3131};
  • trunk/Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl

    r207058 r207302  
    3030    Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict),
    3131] interface IDBVersionChangeEvent : Event {
    32     [InitializedByEventConstructor] readonly attribute unsigned long long oldVersion;
    33     [InitializedByEventConstructor] readonly attribute unsigned long long? newVersion;
     32    readonly attribute unsigned long long oldVersion;
     33    readonly attribute unsigned long long? newVersion;
    3434};
    3535
  • trunk/Source/WebCore/Modules/mediastream/RTCTrackEvent.idl

    r207175 r207302  
    3333    Constructor(DOMString type, optional RTCTrackEventInit eventInitDict),
    3434] interface RTCTrackEvent : Event {
    35    [InitializedByEventConstructor] readonly attribute RTCRtpReceiver? receiver;
    36    [InitializedByEventConstructor] readonly attribute MediaStreamTrack? track;
    37    [InitializedByEventConstructor] readonly attribute sequence<MediaStream> streams;
    38    [InitializedByEventConstructor] readonly attribute RTCRtpTransceiver? transceiver;
     35   readonly attribute RTCRtpReceiver? receiver;
     36   readonly attribute MediaStreamTrack? track;
     37   readonly attribute sequence<MediaStream> streams;
     38   readonly attribute RTCRtpTransceiver? transceiver;
    3939};
    4040
  • trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm

    r207279 r207302  
    386386    my $template = shift;
    387387
    388     return $interface->extendedAttributes->{"ConstructorTemplate"} && $interface->extendedAttributes->{"ConstructorTemplate"} eq $template;
     388    return $interface->extendedAttributes->{"LegacyConstructorTemplate"} && $interface->extendedAttributes->{"LegacyConstructorTemplate"} eq $template;
    389389}
    390390
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r207279 r207302  
    57285728            for (my $index = 0; $index < @{$interface->attributes}; $index++) {
    57295729                my $attribute = @{$interface->attributes}[$index];
    5730                 if ($attribute->signature->extendedAttributes->{InitializedByEventConstructor}) {
     5730                if ($attribute->signature->extendedAttributes->{LegacyInitializedByEventConstructor}) {
    57315731                    my $attributeName = $attribute->signature->name;
    57325732                    my $attributeImplName = $attribute->signature->extendedAttributes->{ImplementedAs} || $attributeName;
     
    59835983        || $interface->extendedAttributes->{Constructor}
    59845984        || $interface->extendedAttributes->{NamedConstructor}
    5985         || $interface->extendedAttributes->{ConstructorTemplate}
     5985        || $interface->extendedAttributes->{LegacyConstructorTemplate}
    59865986        || $interface->extendedAttributes->{JSBuiltinConstructor};
    59875987}
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt

    r207279 r207302  
    3535ConstructorMayThrowException
    3636ConstructorMayThrowLegacyException
    37 ConstructorTemplate=Event|TypedArray
    3837Custom
    3938CustomCall
     
    7877ImplementationReturnType=*
    7978ImplicitThis
    80 InitializedByEventConstructor
    8179InterfaceName=*
    8280IsWeakCallback
     
    9593JSGenerateToNativeObject
    9694JSLegacyParent=*
     95LegacyConstructorTemplate=Event
     96LegacyInitializedByEventConstructor
    9797LenientThis
    9898MasqueradesAsUndefined
  • trunk/Source/WebCore/dom/Event.idl

    r206963 r207302  
    2020
    2121[
    22     ConstructorTemplate=Event,
     22    LegacyConstructorTemplate=Event,
    2323    CustomToJSObject,
    2424    ExportToWrappedFunction,
     
    5252    readonly attribute EventTarget currentTarget;
    5353    readonly attribute unsigned short eventPhase;
    54     [InitializedByEventConstructor] readonly attribute boolean bubbles;
    55     [InitializedByEventConstructor] readonly attribute boolean cancelable;
    56     [InitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
     54    [LegacyInitializedByEventConstructor] readonly attribute boolean bubbles;
     55    [LegacyInitializedByEventConstructor] readonly attribute boolean cancelable;
     56    [LegacyInitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
    5757    readonly attribute DOMTimeStamp timeStamp;
    5858
  • trunk/Source/WebCore/dom/ProgressEvent.idl

    r207019 r207302  
    2828    Exposed=(Window,Worker),
    2929] interface ProgressEvent : Event {
    30     [InitializedByEventConstructor] readonly attribute boolean lengthComputable;
    31     [InitializedByEventConstructor] readonly attribute unsigned long long loaded;
    32     [InitializedByEventConstructor] readonly attribute unsigned long long total;
     30    readonly attribute boolean lengthComputable;
     31    readonly attribute unsigned long long loaded;
     32    readonly attribute unsigned long long total;
    3333};
    3434
  • trunk/Source/WebCore/dom/UIEvent.idl

    r207279 r207302  
    1919
    2020[
    21     ConstructorTemplate=Event,
     21    LegacyConstructorTemplate=Event,
    2222] interface UIEvent : Event {
    23     [InitializedByEventConstructor] readonly attribute DOMWindow view;
    24     [InitializedByEventConstructor] readonly attribute long detail;
     23    [LegacyInitializedByEventConstructor] readonly attribute DOMWindow view;
     24    [LegacyInitializedByEventConstructor] readonly attribute long detail;
    2525   
    2626    // FIXME: Using "undefined" as default parameter value is wrong.
  • trunk/Source/WebCore/html/track/TrackEvent.idl

    r165676 r207302  
    2626[
    2727    Conditional=VIDEO_TRACK,
    28     ConstructorTemplate=Event
     28    LegacyConstructorTemplate=Event
    2929] interface TrackEvent : Event {
    30     [InitializedByEventConstructor, CustomGetter] readonly attribute object track;
     30    [LegacyInitializedByEventConstructor, CustomGetter] readonly attribute object track;
    3131};
    3232
Note: See TracChangeset for help on using the changeset viewer.