WebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
authoradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jun 2016 16:18:38 +0000 (16:18 +0000)
committeradam.bergkvist@ericsson.com <adam.bergkvist@ericsson.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Jun 2016 16:18:38 +0000 (16:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159132

Reviewed by Eric Carlson.

Source/WebCore:

Use the WEB_RTC build flag instead of MEDIA_STREAM since this event is related to
RTCPeerConnection. Also remove PassRefPtr usage.

Updated existing expected results.

* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::create):
(WebCore::MediaStreamEvent::MediaStreamEvent):
* Modules/mediastream/MediaStreamEvent.h:
* Modules/mediastream/MediaStreamEvent.idl:
* dom/EventNames.in:

LayoutTests:

Update skip lists and expected results to not expect the MediaStreamEvent constructor in
the global scope (it's under the WEB_RTC build flag).

* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
(all above) Remove expected results associated with MediaStreamEvent constructor.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
Skip MediaStreamEvent constructor test on ports that dont't build with WEB_RTC yet.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202625 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaStreamEvent.cpp
Source/WebCore/Modules/mediastream/MediaStreamEvent.h
Source/WebCore/Modules/mediastream/MediaStreamEvent.idl
Source/WebCore/dom/EventNames.in

index 3dc5b2c..0d7fdc4 100644 (file)
@@ -1,3 +1,20 @@
+2016-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
+
+        WebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
+        https://bugs.webkit.org/show_bug.cgi?id=159132
+
+        Reviewed by Eric Carlson.
+
+        Update skip lists and expected results to not expect the MediaStreamEvent constructor in
+        the global scope (it's under the WEB_RTC build flag).
+
+        * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        (all above) Remove expected results associated with MediaStreamEvent constructor.
+        * platform/ios-simulator/TestExpectations:
+        * platform/mac/TestExpectations:
+        Skip MediaStreamEvent constructor test on ports that dont't build with WEB_RTC yet.
+
 2016-06-29  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
         [GTK] Fix the expectations for crypto/subtle tests after r202535.
index 7f7d902..476221a 100644 (file)
@@ -56,6 +56,9 @@ fast/history/page-cache-closed-audiocontext.html
 fast/history/page-cache-running-audiocontext.html
 fast/history/page-cache-suspended-audiocontext.html
 
+# WebRTC tests are skipped on iOS for now.
+fast/events/constructors/media-stream-event-constructor.html
+
 # No mousewheel events on iOS
 fast/scrolling/iframe-scrollable-after-back.html [ Skip ]
 fast/scrolling/overflow-scrollable-after-back.html [ Skip ]
index 1f884c6..5cfb480 100644 (file)
@@ -958,11 +958,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').hasOw
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').value is MediaStreamEvent
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamTrack').value is MediaStreamTrack
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamTrack').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamTrack').hasOwnProperty('set') is false
index fb596ab..167e4dc 100644 (file)
@@ -164,6 +164,7 @@ fast/mediastream/MediaStreamTrack-onended.html
 fast/mediastream/MediaStreamTrack.html
 
 # WebRTC is not supported yet.
+fast/events/constructors/media-stream-event-constructor.html
 fast/mediastream/RTCIceCandidate.html
 fast/mediastream/RTCPeerConnection-AddRemoveStream.html
 fast/mediastream/RTCPeerConnection-createAnswer.html
index 9f152bd..9fe2847 100644 (file)
@@ -958,11 +958,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').hasOw
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamAudioSourceNode').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').value is MediaStreamEvent
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamTrack').value is MediaStreamTrack
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamTrack').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'MediaStreamTrack').hasOwnProperty('set') is false
index 9b99b06..7dfe48e 100644 (file)
@@ -1,5 +1,24 @@
 2016-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
 
+        WebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
+        https://bugs.webkit.org/show_bug.cgi?id=159132
+
+        Reviewed by Eric Carlson.
+
+        Use the WEB_RTC build flag instead of MEDIA_STREAM since this event is related to
+        RTCPeerConnection. Also remove PassRefPtr usage.
+
+        Updated existing expected results.
+
+        * Modules/mediastream/MediaStreamEvent.cpp:
+        (WebCore::MediaStreamEvent::create):
+        (WebCore::MediaStreamEvent::MediaStreamEvent):
+        * Modules/mediastream/MediaStreamEvent.h:
+        * Modules/mediastream/MediaStreamEvent.idl:
+        * dom/EventNames.in:
+
+2016-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
+
         REGRESSION(r202337) [WebRTC] Crash when loading html5test.com
         https://bugs.webkit.org/show_bug.cgi?id=159145
 
index 355471e..3072e10 100644 (file)
 #include "config.h"
 #include "MediaStreamEvent.h"
 
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(WEB_RTC)
 
 #include "EventNames.h"
 #include "MediaStream.h"
 
 namespace WebCore {
 
-Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream> stream)
+Ref<MediaStreamEvent> MediaStreamEvent::create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&& stream)
 {
-    return adoptRef(*new MediaStreamEvent(type, canBubble, cancelable, stream));
+    return adoptRef(*new MediaStreamEvent(type, canBubble, cancelable, WTFMove(stream)));
 }
 
 Ref<MediaStreamEvent> MediaStreamEvent::createForBindings(const AtomicString& type, const MediaStreamEventInit& initializer)
@@ -42,9 +42,9 @@ Ref<MediaStreamEvent> MediaStreamEvent::createForBindings(const AtomicString& ty
     return adoptRef(*new MediaStreamEvent(type, initializer));
 }
 
-MediaStreamEvent::MediaStreamEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream> stream)
+MediaStreamEvent::MediaStreamEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&& stream)
     : Event(type, canBubble, cancelable)
-    , m_stream(stream)
+    , m_stream(WTFMove(stream))
 {
 }
 
@@ -70,5 +70,5 @@ EventInterface MediaStreamEvent::eventInterface() const
 
 } // namespace WebCore
 
-#endif // ENABLE(MEDIA_STREAM)
+#endif // ENABLE(WEB_RTC)
 
index f026046..229e3cb 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef MediaStreamEvent_h
 #define MediaStreamEvent_h
 
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(WEB_RTC)
 
 #include "Event.h"
 #include "MediaStream.h"
@@ -41,7 +41,7 @@ class MediaStreamEvent : public Event {
 public:
     virtual ~MediaStreamEvent();
 
-    static Ref<MediaStreamEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream>);
+    static Ref<MediaStreamEvent> create(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&&);
     static Ref<MediaStreamEvent> createForBindings(const AtomicString& type, const MediaStreamEventInit& initializer);
 
     MediaStream* stream() const;
@@ -49,7 +49,7 @@ public:
     virtual EventInterface eventInterface() const;
 
 private:
-    MediaStreamEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<MediaStream>);
+    MediaStreamEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<MediaStream>&&);
     MediaStreamEvent(const AtomicString& type, const MediaStreamEventInit&);
 
     RefPtr<MediaStream> m_stream;
@@ -57,6 +57,6 @@ private:
 
 } // namespace WebCore
 
-#endif // ENABLE(MEDIA_STREAM)
+#endif // ENABLE(WEB_RTC)
 
 #endif // MediaStreamEvent_h
index b44729c..620005f 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 [
-    Conditional=MEDIA_STREAM,
+    Conditional=WEB_RTC,
     ConstructorTemplate=Event
 ] interface MediaStreamEvent : Event {
    [InitializedByEventConstructor] readonly attribute MediaStream stream;
index 8bec9a4..4be4dfd 100644 (file)
@@ -38,7 +38,7 @@ ApplePayShippingMethodSelectedEvent conditional=APPLE_PAY
 ApplePayValidateMerchantEvent conditional=APPLE_PAY
 AudioProcessingEvent conditional=WEB_AUDIO
 OfflineAudioCompletionEvent conditional=WEB_AUDIO
-MediaStreamEvent conditional=MEDIA_STREAM
+MediaStreamEvent conditional=WEB_RTC
 MediaStreamTrackEvent conditional=MEDIA_STREAM
 RTCIceCandidateEvent conditional=WEB_RTC
 RTCDataChannelEvent conditional=WEB_RTC