Changeset 207174 in webkit


Ignore:
Timestamp:
Oct 11, 2016 4:07:35 PM (8 years ago)
Author:
Chris Dumez
Message:

Update UIRequestEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163288

Reviewed by Darin Adler.

Update UIRequestEvent to stop using legacy [ConstructorTemplate=Event]
and use a constructor as in the specification:

  • Modules/indieui/UIRequestEvent.cpp:

(WebCore::UIRequestEvent::create):
(WebCore::UIRequestEvent::UIRequestEvent):
(WebCore::UIRequestEvent::createForBindings): Deleted.

  • Modules/indieui/UIRequestEvent.h:
  • Modules/indieui/UIRequestEvent.idl:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207173 r207174  
     12016-10-11  Chris Dumez  <cdumez@apple.com>
     2
     3        Update UIRequestEvent to stop using legacy [ConstructorTemplate=Event]
     4        https://bugs.webkit.org/show_bug.cgi?id=163288
     5
     6        Reviewed by Darin Adler.
     7
     8        Update UIRequestEvent to stop using legacy [ConstructorTemplate=Event]
     9        and use a constructor as in the specification:
     10        - https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-events.html#UIRequestEvent
     11
     12        * Modules/indieui/UIRequestEvent.cpp:
     13        (WebCore::UIRequestEvent::create):
     14        (WebCore::UIRequestEvent::UIRequestEvent):
     15        (WebCore::UIRequestEvent::createForBindings): Deleted.
     16        * Modules/indieui/UIRequestEvent.h:
     17        * Modules/indieui/UIRequestEvent.idl:
     18
    1192016-10-11  Dean Jackson  <dino@apple.com>
    220
  • trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp

    r204681 r207174  
    3131namespace WebCore {
    3232
    33 Ref<UIRequestEvent> UIRequestEvent::createForBindings(const AtomicString& type, const UIRequestEventInit& initializer)
     33Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted)
    3434{
    35     return adoptRef(*new UIRequestEvent(type, initializer));
     35    return adoptRef(*new UIRequestEvent(type, initializer, isTrusted));
    3636}
    3737
     
    4141}
    4242
    43 UIRequestEvent::UIRequestEvent(const AtomicString& type, const UIRequestEventInit& initializer)
    44     : UIEvent(type, initializer)
     43UIRequestEvent::UIRequestEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted)
     44    : UIEvent(type, initializer, isTrusted)
    4545    , m_receiver(initializer.receiver)
    4646{
  • trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h

    r204681 r207174  
    3333
    3434namespace WebCore {
    35    
    36 struct UIRequestEventInit : public UIEventInit {
    37     RefPtr<EventTarget> receiver;
    38 };
    3935
    4036class UIRequestEvent : public UIEvent {
    4137public:
    4238    static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, DOMWindow*, int detail, RefPtr<EventTarget>&& receiver);
    43     static Ref<UIRequestEvent> createForBindings(const AtomicString& eventType, const UIRequestEventInit&);
     39
     40    struct Init : UIEventInit {
     41        RefPtr<EventTarget> receiver;
     42    };
     43    static Ref<UIRequestEvent> create(const AtomicString& eventType, const Init&, IsTrusted = IsTrusted::No);
    4444   
    4545    virtual ~UIRequestEvent();
     
    5050    UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, DOMWindow*, int detail, RefPtr<EventTarget>&& receiver);
    5151   
    52     UIRequestEvent(const AtomicString& type, const UIRequestEventInit&);
     52    UIRequestEvent(const AtomicString& type, const Init&, IsTrusted);
    5353   
    5454    EventInterface eventInterface() const override;
  • trunk/Source/WebCore/Modules/indieui/UIRequestEvent.idl

    r151827 r207174  
    2626[
    2727    Conditional=INDIE_UI,
    28     ConstructorTemplate=Event
     28    Constructor(DOMString typeArg, optional UIRequestEventInit dictUIRequestEventInit),
    2929] interface UIRequestEvent : UIEvent {
    3030    readonly attribute EventTarget receiver;
    3131};
    3232
     33dictionary UIRequestEventInit : UIEventInit {
     34    EventTarget? receiver = null;
     35};
Note: See TracChangeset for help on using the changeset viewer.