Title: [207057] trunk/Source/WebCore
Revision
207057
Author
cdu...@apple.com
Date
2016-10-11 00:09:54 -0700 (Tue, 11 Oct 2016)

Log Message

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

Reviewed by Darin Adler.

Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy
[ConstructorTemplate=Event] and use a regular constructor instead.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent):
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::createForBindings):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::~WebKitPlaybackTargetAvailabilityEvent): Deleted.
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207056 => 207057)


--- trunk/Source/WebCore/ChangeLog	2016-10-11 06:54:29 UTC (rev 207056)
+++ trunk/Source/WebCore/ChangeLog	2016-10-11 07:09:54 UTC (rev 207057)
@@ -1,3 +1,20 @@
+2016-10-11  Chris Dumez  <cdu...@apple.com>
+
+        Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy [ConstructorTemplate=Event]
+        https://bugs.webkit.org/show_bug.cgi?id=163265
+
+        Reviewed by Darin Adler.
+
+        Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy
+        [ConstructorTemplate=Event] and use a regular constructor instead.
+
+        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
+        (WebCore::WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent):
+        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
+        (WebCore::WebKitPlaybackTargetAvailabilityEvent::createForBindings):
+        (WebCore::WebKitPlaybackTargetAvailabilityEvent::~WebKitPlaybackTargetAvailabilityEvent): Deleted.
+        * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
+
 2016-10-10  Zan Dobersek  <zdober...@igalia.com>
 
         Add ENABLE_ENCRYPTED_MEDIA configuration option

Modified: trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp (207056 => 207057)


--- trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp	2016-10-11 06:54:29 UTC (rev 207056)
+++ trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp	2016-10-11 07:09:54 UTC (rev 207057)
@@ -46,8 +46,8 @@
 {
 }
 
-WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit& initializer)
-    : Event(eventType, initializer)
+WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, const Init& initializer, IsTrusted isTrusted)
+    : Event(eventType, initializer, isTrusted)
     , m_availability(initializer.availability)
 {
 }

Modified: trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h (207056 => 207057)


--- trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h	2016-10-11 06:54:29 UTC (rev 207056)
+++ trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h	2016-10-11 07:09:54 UTC (rev 207057)
@@ -32,10 +32,6 @@
 
 namespace WebCore {
 
-struct WebKitPlaybackTargetAvailabilityEventInit : public EventInit {
-    String availability;
-};
-
 class WebKitPlaybackTargetAvailabilityEvent : public Event {
 public:
     ~WebKitPlaybackTargetAvailabilityEvent() { }
@@ -45,9 +41,13 @@
         return adoptRef(*new WebKitPlaybackTargetAvailabilityEvent(eventType, available));
     }
 
-    static Ref<WebKitPlaybackTargetAvailabilityEvent> createForBindings(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit& initializer)
+    struct Init : EventInit {
+        String availability;
+    };
+
+    static Ref<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, const Init& initializer, IsTrusted isTrusted = IsTrusted::No)
     {
-        return adoptRef(*new WebKitPlaybackTargetAvailabilityEvent(eventType, initializer));
+        return adoptRef(*new WebKitPlaybackTargetAvailabilityEvent(eventType, initializer, isTrusted));
     }
 
     String availability() const { return m_availability; }
@@ -56,7 +56,7 @@
 
 private:
     explicit WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, bool available);
-    WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit&);
+    WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, const Init&, IsTrusted);
 
     String m_availability;
 };

Modified: trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl (207056 => 207057)


--- trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl	2016-10-11 06:54:29 UTC (rev 207056)
+++ trunk/Source/WebCore/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl	2016-10-11 07:09:54 UTC (rev 207057)
@@ -26,8 +26,11 @@
 
 [
     Conditional=WIRELESS_PLAYBACK_TARGET,
-    ConstructorTemplate=Event
+    Constructor(DOMString type, optional WebKitPlaybackTargetAvailabilityEventInit eventInitDict),
 ] interface WebKitPlaybackTargetAvailabilityEvent : Event {
-    [InitializedByEventConstructor] readonly attribute DOMString availability;
+    readonly attribute DOMString availability;
 };
 
+dictionary WebKitPlaybackTargetAvailabilityEventInit : EventInit {
+    DOMString availability = "";
+};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to