Changeset 207515 in webkit


Ignore:
Timestamp:
Oct 18, 2016 7:26:50 PM (7 years ago)
Author:
Chris Dumez
Message:

[Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
https://bugs.webkit.org/show_bug.cgi?id=163630

Reviewed by Darin Adler.

Source/WebCore:

Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
IDL now that all our events use proper constructors instead.

  • bindings/scripts/CodeGenerator.pm:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(IsConstructable):

  • bindings/scripts/IDLAttributes.txt:
  • dom/Event.h:

(WebCore::Event::create):

  • dom/Event.idl:
  • dom/UIEvent.h:

(WebCore::UIEvent::create):

  • dom/UIEvent.idl:

LayoutTests:

Update / rebaseline existing tests to reflect minor behavior changes.

  • fast/events/constructors/event-constructors-expected.txt:
  • fast/events/constructors/event-constructors.html:
  • fast/events/constructors/ui-event-constructor-expected.txt:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207514 r207515  
     12016-10-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
     4        https://bugs.webkit.org/show_bug.cgi?id=163630
     5
     6        Reviewed by Darin Adler.
     7
     8        Update / rebaseline existing tests to reflect minor behavior changes.
     9
     10        * fast/events/constructors/event-constructors-expected.txt:
     11        * fast/events/constructors/event-constructors.html:
     12        * fast/events/constructors/ui-event-constructor-expected.txt:
     13
    1142016-10-18  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/LayoutTests/fast/events/constructors/event-constructors-expected.txt

    r93951 r207515  
    2222PASS (new Event('eventType', undefined)).bubbles is false
    2323PASS (new Event('eventType', undefined)).cancelable is false
    24 PASS (new Event('eventType', 0)).bubbles is false
    25 PASS (new Event('eventType', 0)).cancelable is false
     24PASS new Event('eventType', 0) threw exception TypeError: Type error.
    2625PASS (new Event('eventType', window)).bubbles is false
    2726PASS (new Event('eventType', window)).cancelable is false
  • trunk/LayoutTests/fast/events/constructors/event-constructors.html

    r155267 r207515  
    5252
    5353// A number as the initializer.
    54 // FIXME: Should this throw?
    55 test("new Event('eventType', 0)", false, false);
     54shouldThrowErrorName("new Event('eventType', 0)", "TypeError");
    5655
    5756// The window as the initializer.
  • trunk/LayoutTests/fast/events/constructors/ui-event-constructor-expected.txt

    r203950 r207515  
    1414PASS new UIEvent('eventType', { view: window }).view is window
    1515PASS new UIEvent('eventType', { view: this }).view is this
    16 PASS new UIEvent('eventType', { view: testObject }).view threw exception TypeError: Dictionary member is not of type Window.
    17 PASS new UIEvent('eventType', { view: document }).view threw exception TypeError: Dictionary member is not of type Window.
     16PASS new UIEvent('eventType', { view: testObject }).view threw exception TypeError: Type error.
     17PASS new UIEvent('eventType', { view: document }).view threw exception TypeError: Type error.
    1818PASS new UIEvent('eventType', { view: undefined }).view is null
    1919PASS new UIEvent('eventType', { view: null }).view is null
    20 PASS new UIEvent('eventType', { view: false }).view threw exception TypeError: Dictionary member is not of type Window.
    21 PASS new UIEvent('eventType', { view: true }).view threw exception TypeError: Dictionary member is not of type Window.
    22 PASS new UIEvent('eventType', { view: '' }).view threw exception TypeError: Dictionary member is not of type Window.
    23 PASS new UIEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Dictionary member is not of type Window.
    24 PASS new UIEvent('eventType', { view: 12345 }).view threw exception TypeError: Dictionary member is not of type Window.
    25 PASS new UIEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Dictionary member is not of type Window.
    26 PASS new UIEvent('eventType', { view: NaN }).view threw exception TypeError: Dictionary member is not of type Window.
    27 PASS new UIEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Dictionary member is not of type Window.
    28 PASS new UIEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Dictionary member is not of type Window.
     20PASS new UIEvent('eventType', { view: false }).view threw exception TypeError: Type error.
     21PASS new UIEvent('eventType', { view: true }).view threw exception TypeError: Type error.
     22PASS new UIEvent('eventType', { view: '' }).view threw exception TypeError: Type error.
     23PASS new UIEvent('eventType', { view: 'chocolate' }).view threw exception TypeError: Type error.
     24PASS new UIEvent('eventType', { view: 12345 }).view threw exception TypeError: Type error.
     25PASS new UIEvent('eventType', { view: 18446744073709551615 }).view threw exception TypeError: Type error.
     26PASS new UIEvent('eventType', { view: NaN }).view threw exception TypeError: Type error.
     27PASS new UIEvent('eventType', { view: {valueOf: function () { return window; } } }).view threw exception TypeError: Type error.
     28PASS new UIEvent('eventType', { get view() { return 123; } }).view threw exception TypeError: Type error.
    2929PASS new UIEvent('eventType', { get view() { throw 'UIEvent Error'; } }) threw exception UIEvent Error.
    3030PASS new UIEvent('eventType', { detail: 0 }).detail is 0
  • trunk/Source/WebCore/ChangeLog

    r207514 r207515  
     12016-10-18  Chris Dumez  <cdumez@apple.com>
     2
     3        [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
     4        https://bugs.webkit.org/show_bug.cgi?id=163630
     5
     6        Reviewed by Darin Adler.
     7
     8        Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
     9        IDL now that all our events use proper constructors instead.
     10
     11        * bindings/scripts/CodeGenerator.pm:
     12        * bindings/scripts/CodeGeneratorJS.pm:
     13        (GenerateHeader):
     14        (GenerateConstructorDefinition):
     15        (GenerateConstructorHelperMethods):
     16        (IsConstructable):
     17        * bindings/scripts/IDLAttributes.txt:
     18        * dom/Event.h:
     19        (WebCore::Event::create):
     20        * dom/Event.idl:
     21        * dom/UIEvent.h:
     22        (WebCore::UIEvent::create):
     23        * dom/UIEvent.idl:
     24
    1252016-10-18  Chris Dumez  <cdumez@apple.com>
    226
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r207479 r207515  
    17511751                463EB6221B8789E00096ED51 /* TagCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 463EB6201B8789CB0096ED51 /* TagCollection.cpp */; };
    17521752                463EB6231B8789E00096ED51 /* TagCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 463EB6211B8789CB0096ED51 /* TagCollection.h */; };
     1753                465307D01DB6EE4800E4137C /* JSUIEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E045EF1DAA104F00B0D8B9 /* JSUIEventInit.h */; };
     1754                465307D11DB6EE4A00E4137C /* JSUIEventInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83E045EE1DAA104F00B0D8B9 /* JSUIEventInit.cpp */; };
    17531755                465A8E791C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */; };
    17541756                4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; };
     
    59775979                E125F83D182411E700D84CD9 /* JSCryptoOperationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E125F83B182411E700D84CD9 /* JSCryptoOperationData.cpp */; };
    59785980                E125F83E182411E700D84CD9 /* JSCryptoOperationData.h in Headers */ = {isa = PBXBuildFile; fileRef = E125F83C182411E700D84CD9 /* JSCryptoOperationData.h */; };
    5979 
    59805981                E125F8411824253A00D84CD9 /* CryptoAlgorithmAES_CBC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E125F83F1824253A00D84CD9 /* CryptoAlgorithmAES_CBC.cpp */; };
    59815982                E125F8421824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h in Headers */ = {isa = PBXBuildFile; fileRef = E125F8401824253A00D84CD9 /* CryptoAlgorithmAES_CBC.h */; };
     
    73287329                0F4710AD1DB56AFC002DCEC3 /* DOMRectReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMRectReadOnly.h; sourceTree = "<group>"; };
    73297330                0F4710AE1DB56AFC002DCEC3 /* DOMRectReadOnly.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMRectReadOnly.idl; sourceTree = "<group>"; };
    7330                 0F4710B51DB56BE8002DCEC3 /* JSDOMRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMRect.cpp; path = JSDOMRect.cpp; sourceTree = "<group>"; };
    7331                 0F4710B61DB56BE8002DCEC3 /* JSDOMRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMRect.h; path = JSDOMRect.h; sourceTree = "<group>"; };
    7332                 0F4710B71DB56BE8002DCEC3 /* JSDOMRectInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMRectInit.cpp; path = JSDOMRectInit.cpp; sourceTree = "<group>"; };
    7333                 0F4710B81DB56BE8002DCEC3 /* JSDOMRectInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMRectInit.h; path = JSDOMRectInit.h; sourceTree = "<group>"; };
    7334                 0F4710B91DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSDOMRectReadOnly.cpp; path = JSDOMRectReadOnly.cpp; sourceTree = "<group>"; };
    7335                 0F4710BA1DB56BE8002DCEC3 /* JSDOMRectReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSDOMRectReadOnly.h; path = JSDOMRectReadOnly.h; sourceTree = "<group>"; };
     7331                0F4710B51DB56BE8002DCEC3 /* JSDOMRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMRect.cpp; sourceTree = "<group>"; };
     7332                0F4710B61DB56BE8002DCEC3 /* JSDOMRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMRect.h; sourceTree = "<group>"; };
     7333                0F4710B71DB56BE8002DCEC3 /* JSDOMRectInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMRectInit.cpp; sourceTree = "<group>"; };
     7334                0F4710B81DB56BE8002DCEC3 /* JSDOMRectInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMRectInit.h; sourceTree = "<group>"; };
     7335                0F4710B91DB56BE8002DCEC3 /* JSDOMRectReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMRectReadOnly.cpp; sourceTree = "<group>"; };
     7336                0F4710BA1DB56BE8002DCEC3 /* JSDOMRectReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMRectReadOnly.h; sourceTree = "<group>"; };
    73367337                0F4966991DB408C100A274BB /* DOMPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPoint.h; sourceTree = "<group>"; };
    73377338                0F49669A1DB408C100A274BB /* DOMPoint.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMPoint.idl; sourceTree = "<group>"; };
     
    1469714698                                5EA725CE1ACABCD900EAD17B /* MediaDevices.h */,
    1469814699                                5EA725CF1ACABCD900EAD17B /* MediaDevices.idl */,
    14699                                 07ABEF6B1D8A1C5800F21972 /* MediaDevicesEnumerationRequest.cpp */,
    14700                                 07ABEF6D1D8A1C7600F21972 /* MediaDevicesEnumerationRequest.h */,
     14700                                07ABEF6B1D8A1C5800F21972 /* MediaDevicesEnumerationRequest.cpp */,
     14701                                07ABEF6D1D8A1C7600F21972 /* MediaDevicesEnumerationRequest.h */,
    1470114702                                07394EC71BAB2CCD00BE99CD /* MediaDevicesRequest.cpp */,
    1470214703                                07394EC91BAB2CD700BE99CD /* MediaDevicesRequest.h */,
     
    2421524216                                69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */,
    2421624217                                AAC08CF315F941FD00F1E188 /* AccessibilitySVGRoot.h in Headers */,
     24218                                465307D01DB6EE4800E4137C /* JSUIEventInit.h in Headers */,
    2421724219                                29A8122B0FBB9C1D00510293 /* AccessibilityTable.h in Headers */,
    2421824220                                29A812320FBB9C1D00510293 /* AccessibilityTableCell.h in Headers */,
     
    2816228164                                1AFFC4541D5E81CB00267A66 /* BlacklistUpdater.mm in Sources */,
    2816328165                                976D6C78122B8A3D001FD1F7 /* Blob.cpp in Sources */,
     28166                                465307D11DB6EE4A00E4137C /* JSUIEventInit.cpp in Sources */,
    2816428167                                2EDEF1F3121B0EFC00726DB2 /* BlobData.cpp in Sources */,
    2816528168                                E1D31CDC19196020001005A3 /* BlobDataFileReference.cpp in Sources */,
  • trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm

    r207462 r207515  
    381381}
    382382
    383 sub IsConstructorTemplate
    384 {
    385     my $object = shift;
    386     my $interface = shift;
    387     my $template = shift;
    388 
    389     return $interface->extendedAttributes->{"LegacyConstructorTemplate"} && $interface->extendedAttributes->{"LegacyConstructorTemplate"} eq $template;
    390 }
    391 
    392383sub IsNumericType
    393384{
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r207505 r207515  
    12731273
    12741274    AddClassForwardIfNeeded("JSDOMWindowShell") if $interfaceName eq "DOMWindow";
    1275     AddClassForwardIfNeeded("JSDictionary") if $codeGenerator->IsConstructorTemplate($interface, "Event");
    12761275
    12771276    my $exportMacro = GetExportMacroForJSClass($interface);
     
    17241723        push(@headerContent, "// Custom constructor\n");
    17251724        push(@headerContent, "JSC::EncodedJSValue JSC_HOST_CALL construct${className}(JSC::ExecState&);\n\n");
    1726     }
    1727 
    1728     if ($codeGenerator->IsConstructorTemplate($interface, "Event")) {
    1729         push(@headerContent, "bool fill${interfaceName}Init(${interfaceName}Init&, JSDictionary&);\n\n");
    17301725    }
    17311726
     
    57045699
    57055700    if (IsConstructable($interface)) {
    5706         if ($codeGenerator->IsConstructorTemplate($interface, "Event")) {
    5707             $implIncludes{"JSDictionary.h"} = 1;
    5708             $implIncludes{"<runtime/Error.h>"} = 1;
    5709 
    5710             push(@$outputArray, <<END);
    5711 template<> EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct(ExecState* state)
    5712 {
    5713     VM& vm = state->vm();
    5714     auto throwScope = DECLARE_THROW_SCOPE(vm);
    5715     auto* jsConstructor = jsCast<${constructorClassName}*>(state->callee());
    5716     ASSERT(jsConstructor);
    5717 
    5718     if (!jsConstructor->scriptExecutionContext())
    5719         return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, \"${visibleInterfaceName}\");
    5720 
    5721     if (UNLIKELY(state->argumentCount() < 1))
    5722         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
    5723 
    5724     AtomicString eventType = state->uncheckedArgument(0).toString(state)->toAtomicString(state);
    5725     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
    5726 
    5727     ${interfaceName}Init eventInit;
    5728 
    5729     JSValue initializerValue = state->argument(1);
    5730     if (!initializerValue.isUndefinedOrNull()) {
    5731         // Given the above test, this will always yield an object.
    5732         JSObject* initializerObject = initializerValue.toObject(state);
    5733         ASSERT(!throwScope.exception());
    5734 
    5735         // Create the dictionary wrapper from the initializer object.
    5736         JSDictionary dictionary(state, initializerObject);
    5737 
    5738         // Attempt to fill in the EventInit.
    5739         if (!fill${interfaceName}Init(eventInit, dictionary))
    5740             return JSValue::encode(jsUndefined());
    5741     }
    5742 
    5743     Ref<${interfaceName}> event = ${interfaceName}::createForBindings(eventType, eventInit);
    5744     return JSValue::encode(createWrapper<${interfaceName}>(jsConstructor->globalObject(), WTFMove(event)));
    5745 }
    5746 
    5747 bool fill${interfaceName}Init(${interfaceName}Init& eventInit, JSDictionary& dictionary)
    5748 {
    5749 END
    5750 
    5751             if ($interface->parent) {
    5752                 my $interfaceBase = $interface->parent;
    5753                 push(@implContent, <<END);
    5754     if (!fill${interfaceBase}Init(eventInit, dictionary))
    5755         return false;
    5756 
    5757 END
    5758             }
    5759 
    5760             for (my $index = 0; $index < @{$interface->attributes}; $index++) {
    5761                 my $attribute = @{$interface->attributes}[$index];
    5762                 if ($attribute->signature->extendedAttributes->{LegacyInitializedByEventConstructor}) {
    5763                     my $attributeName = $attribute->signature->name;
    5764                     my $attributeImplName = $attribute->signature->extendedAttributes->{ImplementedAs} || $attributeName;
    5765                     my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
    5766 
    5767                     push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
    5768 
    5769                     push(@implContent, <<END);
    5770     if (!dictionary.tryGetProperty("${attributeName}", eventInit.${attributeImplName}))
    5771         return false;
    5772 END
    5773                     push(@implContent, "#endif\n") if $conditionalString;
    5774 
    5775                 }
    5776             }
    5777 
    5778             push(@$outputArray, <<END);
    5779     return true;
    5780 }
    5781 
    5782 END
    5783          } elsif ($interface->extendedAttributes->{CustomConstructor}) {
     5701        if ($interface->extendedAttributes->{CustomConstructor}) {
    57845702            push(@$outputArray, "template<> JSC::EncodedJSValue JSC_HOST_CALL ${constructorClassName}::construct(JSC::ExecState* exec)\n");
    57855703            push(@$outputArray, "{\n");
     
    59055823    my $constructorClassName = $generatingNamedConstructor ? "${className}NamedConstructor" : "${className}Constructor";
    59065824    my $leastConstructorLength = 0;
    5907     if ($codeGenerator->IsConstructorTemplate($interface, "Event")) {
    5908         $leastConstructorLength = 1;
    5909     } elsif ($interface->extendedAttributes->{Constructor} || $interface->extendedAttributes->{CustomConstructor}) {
     5825    if ($interface->extendedAttributes->{Constructor} || $interface->extendedAttributes->{CustomConstructor}) {
    59105826        my @constructors = @{$interface->constructors};
    59115827        my @customConstructors = @{$interface->customConstructors};
     
    60155931        || $interface->extendedAttributes->{Constructor}
    60165932        || $interface->extendedAttributes->{NamedConstructor}
    6017         || $interface->extendedAttributes->{LegacyConstructorTemplate}
    60185933        || $interface->extendedAttributes->{JSBuiltinConstructor};
    60195934}
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt

    r207355 r207515  
    9393JSGenerateToNativeObject
    9494JSLegacyParent=*
    95 LegacyConstructorTemplate=Event
    96 LegacyInitializedByEventConstructor
    9795LenientThis
    9896MasqueradesAsUndefined
  • trunk/Source/WebCore/dom/Event.h

    r206964 r207515  
    8888    }
    8989
    90     static Ref<Event> createForBindings(const AtomicString& type, const EventInit& initializer)
    91     {
    92         return adoptRef(*new Event(type, initializer));
     90    static Ref<Event> create(const AtomicString& type, const EventInit& initializer, IsTrusted isTrusted = IsTrusted::No)
     91    {
     92        return adoptRef(*new Event(type, initializer, isTrusted));
    9393    }
    9494
     
    194194    WEBCORE_EXPORT Event(const AtomicString& type, bool canBubble, bool cancelable);
    195195    Event(const AtomicString& type, bool canBubble, bool cancelable, double timestamp);
    196     Event(const AtomicString& type, const EventInit&, IsTrusted = IsTrusted::No);
     196    Event(const AtomicString& type, const EventInit&, IsTrusted);
    197197
    198198    virtual void receivedTarget();
  • trunk/Source/WebCore/dom/Event.idl

    r207302 r207515  
    2020
    2121[
    22     LegacyConstructorTemplate=Event,
     22    Constructor(DOMString type, optional EventInit eventInitDict),
    2323    CustomToJSObject,
    2424    ExportToWrappedFunction,
     
    5252    readonly attribute EventTarget currentTarget;
    5353    readonly attribute unsigned short eventPhase;
    54     [LegacyInitializedByEventConstructor] readonly attribute boolean bubbles;
    55     [LegacyInitializedByEventConstructor] readonly attribute boolean cancelable;
    56     [LegacyInitializedByEventConstructor, EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
     54    readonly attribute boolean bubbles;
     55    readonly attribute boolean cancelable;
     56    [EnabledAtRuntime=ShadowDOM] readonly attribute boolean composed;
    5757    readonly attribute DOMTimeStamp timeStamp;
    5858
  • trunk/Source/WebCore/dom/UIEvent.h

    r206971 r207515  
    4343        return adoptRef(*new UIEvent);
    4444    }
    45     static Ref<UIEvent> createForBindings(const AtomicString& type, const UIEventInit& initializer)
     45    static Ref<UIEvent> create(const AtomicString& type, const UIEventInit& initializer, IsTrusted isTrusted = IsTrusted::No)
    4646    {
    47         return adoptRef(*new UIEvent(type, initializer));
     47        return adoptRef(*new UIEvent(type, initializer, isTrusted));
    4848    }
    4949    virtual ~UIEvent();
     
    7171    UIEvent(const AtomicString& type, bool canBubble, bool cancelable, DOMWindow*, int detail);
    7272    UIEvent(const AtomicString& type, bool canBubble, bool cancelable, double timestamp, DOMWindow*, int detail);
    73     UIEvent(const AtomicString&, const UIEventInit&, IsTrusted = IsTrusted::No);
     73    UIEvent(const AtomicString&, const UIEventInit&, IsTrusted);
    7474
    7575private:
  • trunk/Source/WebCore/dom/UIEvent.idl

    r207302 r207515  
    1919
    2020[
    21     LegacyConstructorTemplate=Event,
     21    Constructor(DOMString type, optional UIEventInit eventInitDict)
    2222] interface UIEvent : Event {
    23     [LegacyInitializedByEventConstructor] readonly attribute DOMWindow view;
    24     [LegacyInitializedByEventConstructor] readonly attribute long detail;
     23    readonly attribute DOMWindow view;
     24    readonly attribute long detail;
    2525   
    2626    // FIXME: Using "undefined" as default parameter value is wrong.
Note: See TracChangeset for help on using the changeset viewer.