Title: [207174] trunk/Source/WebCore
Revision
207174
Author
[email protected]
Date
2016-10-11 16:07:35 -0700 (Tue, 11 Oct 2016)

Log 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:
- https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-events.html#UIRequestEvent

* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::create):
(WebCore::UIRequestEvent::UIRequestEvent):
(WebCore::UIRequestEvent::createForBindings): Deleted.
* Modules/indieui/UIRequestEvent.h:
* Modules/indieui/UIRequestEvent.idl:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207173 => 207174)


--- trunk/Source/WebCore/ChangeLog	2016-10-11 22:45:22 UTC (rev 207173)
+++ trunk/Source/WebCore/ChangeLog	2016-10-11 23:07:35 UTC (rev 207174)
@@ -1,3 +1,21 @@
+2016-10-11  Chris Dumez  <[email protected]>
+
+        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:
+        - https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-events.html#UIRequestEvent
+
+        * Modules/indieui/UIRequestEvent.cpp:
+        (WebCore::UIRequestEvent::create):
+        (WebCore::UIRequestEvent::UIRequestEvent):
+        (WebCore::UIRequestEvent::createForBindings): Deleted.
+        * Modules/indieui/UIRequestEvent.h:
+        * Modules/indieui/UIRequestEvent.idl:
+
 2016-10-11  Dean Jackson  <[email protected]>
 
         Implement prefers-reduced-motion media query

Modified: trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp (207173 => 207174)


--- trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp	2016-10-11 22:45:22 UTC (rev 207173)
+++ trunk/Source/WebCore/Modules/indieui/UIRequestEvent.cpp	2016-10-11 23:07:35 UTC (rev 207174)
@@ -30,9 +30,9 @@
 
 namespace WebCore {
 
-Ref<UIRequestEvent> UIRequestEvent::createForBindings(const AtomicString& type, const UIRequestEventInit& initializer)
+Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted)
 {
-    return adoptRef(*new UIRequestEvent(type, initializer));
+    return adoptRef(*new UIRequestEvent(type, initializer, isTrusted));
 }
 
 Ref<UIRequestEvent> UIRequestEvent::create(const AtomicString& type, bool bubbles, bool cancelable, DOMWindow* view, int detail, RefPtr<EventTarget>&& receiver)
@@ -40,8 +40,8 @@
     return adoptRef(*new UIRequestEvent(type, bubbles, cancelable, view, detail, WTFMove(receiver)));
 }
 
-UIRequestEvent::UIRequestEvent(const AtomicString& type, const UIRequestEventInit& initializer)
-    : UIEvent(type, initializer)
+UIRequestEvent::UIRequestEvent(const AtomicString& type, const Init& initializer, IsTrusted isTrusted)
+    : UIEvent(type, initializer, isTrusted)
     , m_receiver(initializer.receiver)
 {
 }

Modified: trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h (207173 => 207174)


--- trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h	2016-10-11 22:45:22 UTC (rev 207173)
+++ trunk/Source/WebCore/Modules/indieui/UIRequestEvent.h	2016-10-11 23:07:35 UTC (rev 207174)
@@ -32,15 +32,15 @@
 #if ENABLE(INDIE_UI)
 
 namespace WebCore {
-    
-struct UIRequestEventInit : public UIEventInit {
-    RefPtr<EventTarget> receiver;
-};
 
 class UIRequestEvent : public UIEvent {
 public:
     static Ref<UIRequestEvent> create(const AtomicString& type, bool bubbles, bool cancelable, DOMWindow*, int detail, RefPtr<EventTarget>&& receiver);
-    static Ref<UIRequestEvent> createForBindings(const AtomicString& eventType, const UIRequestEventInit&);
+
+    struct Init : UIEventInit {
+        RefPtr<EventTarget> receiver;
+    };
+    static Ref<UIRequestEvent> create(const AtomicString& eventType, const Init&, IsTrusted = IsTrusted::No);
     
     virtual ~UIRequestEvent();
     
@@ -49,7 +49,7 @@
 protected:
     UIRequestEvent(const AtomicString& type, bool bubbles, bool cancelable, DOMWindow*, int detail, RefPtr<EventTarget>&& receiver);
     
-    UIRequestEvent(const AtomicString& type, const UIRequestEventInit&);
+    UIRequestEvent(const AtomicString& type, const Init&, IsTrusted);
     
     EventInterface eventInterface() const override;
     

Modified: trunk/Source/WebCore/Modules/indieui/UIRequestEvent.idl (207173 => 207174)


--- trunk/Source/WebCore/Modules/indieui/UIRequestEvent.idl	2016-10-11 22:45:22 UTC (rev 207173)
+++ trunk/Source/WebCore/Modules/indieui/UIRequestEvent.idl	2016-10-11 23:07:35 UTC (rev 207174)
@@ -25,8 +25,11 @@
  
 [
     Conditional=INDIE_UI,
-    ConstructorTemplate=Event
+    Constructor(DOMString typeArg, optional UIRequestEventInit dictUIRequestEventInit),
 ] interface UIRequestEvent : UIEvent { 
     readonly attribute EventTarget receiver;
 };
 
+dictionary UIRequestEventInit : UIEventInit {
+    EventTarget? receiver = null;
+};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to