Title: [116127] trunk
Revision
116127
Author
[email protected]
Date
2012-05-04 10:55:20 -0700 (Fri, 04 May 2012)

Log Message

MediaStream API: Make PeerConnection00's API fully compliant with the draft
https://bugs.webkit.org/show_bug.cgi?id=85491

Reviewed by Adam Barth.

Source/Platform:

* chromium/public/WebPeerConnection00HandlerClient.h:

Source/WebCore:

Mainly making the relevant API's use objects (aka Dictionaries) instead of the temporary strings,
but also making a few API's exception aware and changing the name of a flag.

Test: fast/mediastream/peerconnection-iceoptions.html

* Modules/mediastream/PeerConnection00.cpp:
(WebCore::PeerConnection00::createMediaHints):
(WebCore::PeerConnection00::createOffer):
(WebCore):
(WebCore::PeerConnection00::createAnswer):
(WebCore::PeerConnection00::createIceOptions):
(WebCore::PeerConnection00::createDefaultIceOptions):
(WebCore::PeerConnection00::startIce):
(WebCore::PeerConnection00::addStream):
(WebCore::PeerConnection00::changeReadyState):
* Modules/mediastream/PeerConnection00.h:
(WebCore):
(PeerConnection00):
* Modules/mediastream/PeerConnection00.idl:
* platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp:
(WebCore::PeerConnection00HandlerInternal::startIce):

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:

LayoutTests:

* fast/mediastream/peerconnection-Attributes-expected.txt:
* fast/mediastream/peerconnection-iceoptions-expected.txt: Added.
* fast/mediastream/peerconnection-iceoptions.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (116126 => 116127)


--- trunk/LayoutTests/ChangeLog	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/LayoutTests/ChangeLog	2012-05-04 17:55:20 UTC (rev 116127)
@@ -1,3 +1,14 @@
+2012-05-04  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Make PeerConnection00's API fully compliant with the draft
+        https://bugs.webkit.org/show_bug.cgi?id=85491
+
+        Reviewed by Adam Barth.
+
+        * fast/mediastream/peerconnection-Attributes-expected.txt:
+        * fast/mediastream/peerconnection-iceoptions-expected.txt: Added.
+        * fast/mediastream/peerconnection-iceoptions.html: Added.
+
 2012-05-04  Zan Dobersek  <[email protected]>
 
         [Gtk] Many tests revealed as passing after moving from Skipped to test_expectations.txt

Modified: trunk/LayoutTests/fast/mediastream/peerconnection-Attributes-expected.txt (116126 => 116127)


--- trunk/LayoutTests/fast/mediastream/peerconnection-Attributes-expected.txt	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/LayoutTests/fast/mediastream/peerconnection-Attributes-expected.txt	2012-05-04 17:55:20 UTC (rev 116127)
@@ -7,7 +7,7 @@
 PASS typeof pc.removeStream === 'function' is true
 PASS typeof pc.close === 'function' is true
 PASS pc.NEW === 0 is true
-FAIL pc.OPENING === 1 should be true. Was false.
+PASS pc.OPENING === 1 is true
 PASS pc.ACTIVE === 2 is true
 PASS pc.CLOSED === 3 is true
 PASS pc.ICE_GATHERING === 0x100 is true

Added: trunk/LayoutTests/fast/mediastream/peerconnection-iceoptions-expected.txt (0 => 116127)


--- trunk/LayoutTests/fast/mediastream/peerconnection-iceoptions-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/mediastream/peerconnection-iceoptions-expected.txt	2012-05-04 17:55:20 UTC (rev 116127)
@@ -0,0 +1,16 @@
+Tests PeerConenction00::startIce().
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS pc.startIce() did not throw exception.
+PASS pc.startIce(5) threw exception TypeError: Not an object..
+PASS pc.startIce(null) did not throw exception.
+PASS pc.startIce(undefined) did not throw exception.
+PASS pc.startIce({}) did not throw exception.
+PASS pc.startIce({"use_candidates":"all"}) did not throw exception.
+PASS pc.startIce({"use_candidates":"foobar"}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/mediastream/peerconnection-iceoptions.html (0 => 116127)


--- trunk/LayoutTests/fast/mediastream/peerconnection-iceoptions.html	                        (rev 0)
+++ trunk/LayoutTests/fast/mediastream/peerconnection-iceoptions.html	2012-05-04 17:55:20 UTC (rev 116127)
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+</body>
+<script>
+description("Tests PeerConenction00::startIce().");
+
+function shouldNotThrow(_expression_)
+{
+  try {
+    eval(_expression_);
+    testPassed(_expression_ + " did not throw exception.");
+  } catch(e) {
+    testFailed(_expression_ + " should not throw exception. Threw exception " + e);
+  }
+}
+
+function test(_expression_, expressionShouldThrow, expectedException) {
+    if (expressionShouldThrow) {
+        if (expectedException)
+            shouldThrow(_expression_, '(function() { return "' + expectedException + '"; })();');
+        else
+            shouldThrow(_expression_, '(function() { return "Error: TYPE_MISMATCH_ERR: DOM Exception 17"; })();');
+    } else {
+        shouldNotThrow(_expression_);
+    }
+}
+
+var pc = new webkitPeerConnection00("", function() {});
+
+test('pc.startIce()', false);
+test('pc.startIce(5)', true, 'TypeError: Not an object.');
+test('pc.startIce(null)', false);
+test('pc.startIce(undefined)', false);
+test('pc.startIce({})', false);
+test('pc.startIce({"use_candidates":"all"})', false);
+test('pc.startIce({"use_candidates":"foobar"})', true);
+
+window.successfullyParsed = true;
+</script>
+<script src=""
+</html>

Modified: trunk/Source/Platform/ChangeLog (116126 => 116127)


--- trunk/Source/Platform/ChangeLog	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/Platform/ChangeLog	2012-05-04 17:55:20 UTC (rev 116127)
@@ -1,3 +1,12 @@
+2012-05-04  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Make PeerConnection00's API fully compliant with the draft
+        https://bugs.webkit.org/show_bug.cgi?id=85491
+
+        Reviewed by Adam Barth.
+
+        * chromium/public/WebPeerConnection00HandlerClient.h:
+
 2012-05-02  Dana Jansens  <[email protected]>
 
         [chromium] Don't occlude pixels in a surface that are needed for a background filter blur

Modified: trunk/Source/Platform/chromium/public/WebPeerConnection00HandlerClient.h (116126 => 116127)


--- trunk/Source/Platform/chromium/public/WebPeerConnection00HandlerClient.h	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/Platform/chromium/public/WebPeerConnection00HandlerClient.h	2012-05-04 17:55:20 UTC (rev 116127)
@@ -40,9 +40,12 @@
 public:
     enum ReadyState {
         ReadyStateNew = 0,
+        ReadyStateOpening = 1,
+        ReadyStateActive = 2,
+        ReadyStateClosed = 3,
+
+        // DEPRECATED
         ReadyStateNegotiating = 1,
-        ReadyStateActive = 2,
-        ReadyStateClosed = 3
     };
 
     enum ICEState {

Modified: trunk/Source/WebCore/ChangeLog (116126 => 116127)


--- trunk/Source/WebCore/ChangeLog	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebCore/ChangeLog	2012-05-04 17:55:20 UTC (rev 116127)
@@ -1,3 +1,32 @@
+2012-05-04  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Make PeerConnection00's API fully compliant with the draft
+        https://bugs.webkit.org/show_bug.cgi?id=85491
+
+        Reviewed by Adam Barth.
+
+        Mainly making the relevant API's use objects (aka Dictionaries) instead of the temporary strings,
+        but also making a few API's exception aware and changing the name of a flag.
+
+        Test: fast/mediastream/peerconnection-iceoptions.html
+
+        * Modules/mediastream/PeerConnection00.cpp:
+        (WebCore::PeerConnection00::createMediaHints):
+        (WebCore::PeerConnection00::createOffer):
+        (WebCore):
+        (WebCore::PeerConnection00::createAnswer):
+        (WebCore::PeerConnection00::createIceOptions):
+        (WebCore::PeerConnection00::createDefaultIceOptions):
+        (WebCore::PeerConnection00::startIce):
+        (WebCore::PeerConnection00::addStream):
+        (WebCore::PeerConnection00::changeReadyState):
+        * Modules/mediastream/PeerConnection00.h:
+        (WebCore):
+        (PeerConnection00):
+        * Modules/mediastream/PeerConnection00.idl:
+        * platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp:
+        (WebCore::PeerConnection00HandlerInternal::startIce):
+
 2012-05-04  David Tseng  <[email protected]>
 
         Chromium should include MenuListPopups' and MenuListOptions' within the ax tree.

Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnection00.cpp (116126 => 116127)


--- trunk/Source/WebCore/Modules/mediastream/PeerConnection00.cpp	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnection00.cpp	2012-05-04 17:55:20 UTC (rev 116127)
@@ -91,52 +91,60 @@
     return false;
 }
 
-PassRefPtr<MediaHints> PeerConnection00::parseMediaHints(const String& mediaHints)
+PassRefPtr<MediaHints> PeerConnection00::createMediaHints(const Dictionary& dictionary)
 {
-    Vector<String> hintsList;
-    mediaHints.split(",", hintsList);
     bool audio = hasLocalAudioTrack();
     bool video = hasLocalVideoTrack();
-    for (Vector<String>::iterator i = hintsList.begin(); i != hintsList.end(); ++i) {
-        if (*i == "audio")
-            audio = true;
-        else if (*i == "no_audio")
-            audio = false;
-        else if (*i == "video")
-            video = true;
-        else if (*i == "no_video")
-            video = false;
-    }
+    dictionary.get("has_audio", audio);
+    dictionary.get("has_video", audio);
+    return MediaHints::create(audio, video);
+}
 
+PassRefPtr<MediaHints> PeerConnection00::createMediaHints()
+{
+    bool audio = hasLocalAudioTrack();
+    bool video = hasLocalVideoTrack();
     return MediaHints::create(audio, video);
 }
 
-PassRefPtr<SessionDescription> PeerConnection00::createOffer()
+PassRefPtr<SessionDescription> PeerConnection00::createOffer(ExceptionCode& ec)
 {
-    return createOffer("");
+    return createOffer(createMediaHints(), ec);
 }
 
-PassRefPtr<SessionDescription> PeerConnection00::createOffer(const String& mediaHintsString)
+PassRefPtr<SessionDescription> PeerConnection00::createOffer(const Dictionary& dictionary, ExceptionCode& ec)
 {
-    RefPtr<MediaHints> mediaHints = parseMediaHints(mediaHintsString);
-    RefPtr<SessionDescriptionDescriptor> descriptor = m_peerHandler->createOffer(mediaHints.release());
-    if (!descriptor)
+    return createOffer(createMediaHints(dictionary), ec);
+}
+
+PassRefPtr<SessionDescription> PeerConnection00::createOffer(PassRefPtr<MediaHints> mediaHints, ExceptionCode& ec)
+{
+    RefPtr<SessionDescriptionDescriptor> descriptor = m_peerHandler->createOffer(mediaHints);
+    if (!descriptor) {
+        ec = SYNTAX_ERR;
         return 0;
+    }
 
     return SessionDescription::create(descriptor.release());
 }
 
-PassRefPtr<SessionDescription> PeerConnection00::createAnswer(const String& offer)
+PassRefPtr<SessionDescription> PeerConnection00::createAnswer(const String& offer, ExceptionCode& ec)
 {
-    return createAnswer(offer, "");
+    return createAnswer(offer, createMediaHints(), ec);
 }
 
-PassRefPtr<SessionDescription> PeerConnection00::createAnswer(const String& offer, const String& mediaHintsString)
+PassRefPtr<SessionDescription> PeerConnection00::createAnswer(const String& offer, const Dictionary& dictionary, ExceptionCode& ec)
 {
-    RefPtr<MediaHints> mediaHints = parseMediaHints(mediaHintsString);
-    RefPtr<SessionDescriptionDescriptor> descriptor = m_peerHandler->createAnswer(offer, mediaHints.release());
-    if (!descriptor)
+    return createAnswer(offer, createMediaHints(dictionary), ec);
+}
+
+PassRefPtr<SessionDescription> PeerConnection00::createAnswer(const String& offer, PassRefPtr<MediaHints> hints, ExceptionCode& ec)
+{
+    RefPtr<SessionDescriptionDescriptor> descriptor = m_peerHandler->createAnswer(offer, hints);
+    if (!descriptor) {
+        ec = SYNTAX_ERR;
         return 0;
+    }
 
     return SessionDescription::create(descriptor.release());
 }
@@ -215,32 +223,53 @@
     return desc.release();
 }
 
-void PeerConnection00::startIce(ExceptionCode& ec)
+PassRefPtr<IceOptions> PeerConnection00::createIceOptions(const Dictionary& dictionary, ExceptionCode& ec)
 {
-    startIce("", ec);
-}
+    String useCandidates = "";
+    dictionary.get("use_candidates", useCandidates);
 
-void PeerConnection00::startIce(const String& options, ExceptionCode& ec)
-{
-    if (m_readyState == CLOSED) {
-        ec = INVALID_STATE_ERR;
-        return;
-    }
-
     IceOptions::UseCandidatesOption option;
-
-    if (options == "" || options == "all")
+    if (useCandidates == "" || useCandidates == "all")
         option = IceOptions::ALL;
-    else if (options == "no_relay")
+    else if (useCandidates == "no_relay")
         option = IceOptions::NO_RELAY;
-    else if (options == "only_relay")
+    else if (useCandidates == "only_relay")
         option = IceOptions::ONLY_RELAY;
     else {
         ec = TYPE_MISMATCH_ERR;
+        return 0;
+    }
+
+    return IceOptions::create(option);
+}
+
+PassRefPtr<IceOptions> PeerConnection00::createDefaultIceOptions()
+{
+    return IceOptions::create(IceOptions::ALL);
+}
+
+void PeerConnection00::startIce(ExceptionCode& ec)
+{
+    startIce(createDefaultIceOptions(), ec);
+}
+
+void PeerConnection00::startIce(const Dictionary& dictionary, ExceptionCode& ec)
+{
+    RefPtr<IceOptions> iceOptions = createIceOptions(dictionary, ec);
+    if (ec)
         return;
+
+    startIce(iceOptions.release(), ec);
+}
+
+void PeerConnection00::startIce(PassRefPtr<IceOptions> iceOptions, ExceptionCode& ec)
+{
+    if (m_readyState == CLOSED) {
+        ec = INVALID_STATE_ERR;
+        return;
     }
 
-    bool valid = m_peerHandler->startIce(IceOptions::create(option));
+    bool valid = m_peerHandler->startIce(iceOptions);
     if (!valid)
         ec = SYNTAX_ERR;
 }
@@ -273,14 +302,8 @@
     return m_iceState;
 }
 
-void PeerConnection00::addStream(PassRefPtr<MediaStream> stream, ExceptionCode& ec)
+void PeerConnection00::addStream(PassRefPtr<MediaStream> prpStream, ExceptionCode& ec)
 {
-    String emptyHints;
-    return addStream(stream, emptyHints, ec);
-}
-
-void PeerConnection00::addStream(PassRefPtr<MediaStream> prpStream, const String& mediaStreamHints, ExceptionCode& ec)
-{
     RefPtr<MediaStream> stream = prpStream;
     if (!stream) {
         ec =  TYPE_MISMATCH_ERR;
@@ -297,10 +320,15 @@
 
     m_localStreams->append(stream);
 
-    // FIXME: When the spec says what the mediaStreamHints should look like send it down.
     m_peerHandler->addStream(stream->descriptor());
 }
 
+void PeerConnection00::addStream(PassRefPtr<MediaStream> stream, const Dictionary& mediaStreamHints, ExceptionCode& ec)
+{
+    // FIXME: When the spec says what the mediaStreamHints should look like use it.
+    addStream(stream, ec);
+}
+
 void PeerConnection00::removeStream(MediaStream* stream, ExceptionCode& ec)
 {
     if (m_readyState == CLOSED) {
@@ -435,7 +463,7 @@
     m_readyState = readyState;
 
     switch (m_readyState) {
-    case NEGOTIATING:
+    case OPENING:
         dispatchEvent(Event::create(eventNames().connectingEvent, false, false));
         break;
     case ACTIVE:

Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnection00.h (116126 => 116127)


--- trunk/Source/WebCore/Modules/mediastream/PeerConnection00.h	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnection00.h	2012-05-04 17:55:20 UTC (rev 116127)
@@ -34,6 +34,7 @@
 #if ENABLE(MEDIA_STREAM)
 
 #include "ActiveDOMObject.h"
+#include "Dictionary.h"
 #include "EventTarget.h"
 #include "ExceptionBase.h"
 #include "IceCallback.h"
@@ -49,6 +50,7 @@
 namespace WebCore {
 
 class MediaHints;
+class IceOptions;
 
 // Note:
 // SDP stands for Session Description Protocol, which is intended for describing
@@ -63,7 +65,7 @@
 public:
     enum ReadyState {
         NEW = 0,
-        NEGOTIATING = 1,
+        OPENING = 1,
         ACTIVE = 2,
         CLOSED = 3
     };
@@ -87,10 +89,10 @@
     static PassRefPtr<PeerConnection00> create(ScriptExecutionContext*, const String& serverConfiguration, PassRefPtr<IceCallback>);
     ~PeerConnection00();
 
-    PassRefPtr<SessionDescription> createOffer();
-    PassRefPtr<SessionDescription> createOffer(const String& mediaHints);
-    PassRefPtr<SessionDescription> createAnswer(const String& offer);
-    PassRefPtr<SessionDescription> createAnswer(const String& offer, const String& mediaHints);
+    PassRefPtr<SessionDescription> createOffer(ExceptionCode&);
+    PassRefPtr<SessionDescription> createOffer(const Dictionary& mediaHints, ExceptionCode&);
+    PassRefPtr<SessionDescription> createAnswer(const String& offer, ExceptionCode&);
+    PassRefPtr<SessionDescription> createAnswer(const String& offer, const Dictionary& mediaHints, ExceptionCode&);
 
     void setLocalDescription(int action, PassRefPtr<SessionDescription>, ExceptionCode&);
     void setRemoteDescription(int action, PassRefPtr<SessionDescription>, ExceptionCode&);
@@ -98,14 +100,14 @@
     PassRefPtr<SessionDescription> remoteDescription();
 
     void startIce(ExceptionCode&);
-    void startIce(const String& options, ExceptionCode&);
+    void startIce(const Dictionary& iceOptions, ExceptionCode&);
     void processIceMessage(PassRefPtr<IceCandidate>, ExceptionCode&);
 
     IceState iceState() const;
     ReadyState readyState() const;
 
     void addStream(const PassRefPtr<MediaStream>, ExceptionCode&);
-    void addStream(const PassRefPtr<MediaStream>, const String& mediaStreamHints, ExceptionCode&);
+    void addStream(const PassRefPtr<MediaStream>, const Dictionary& mediaStreamHints, ExceptionCode&);
     void removeStream(MediaStream*, ExceptionCode&);
     MediaStreamList* localStreams() const;
     MediaStreamList* remoteStreams() const;
@@ -147,9 +149,16 @@
 
     void changeReadyState(ReadyState);
     void changeIceState(IceState);
+
     bool hasLocalAudioTrack();
     bool hasLocalVideoTrack();
-    PassRefPtr<MediaHints> parseMediaHints(const String& mediaHintsString);
+    PassRefPtr<MediaHints> createMediaHints(const Dictionary&);
+    PassRefPtr<MediaHints> createMediaHints();
+    PassRefPtr<IceOptions> createIceOptions(const Dictionary&, ExceptionCode&);
+    PassRefPtr<IceOptions> createDefaultIceOptions();
+    PassRefPtr<SessionDescription> createOffer(PassRefPtr<MediaHints>, ExceptionCode&);
+    PassRefPtr<SessionDescription> createAnswer(const String& offer, PassRefPtr<MediaHints>, ExceptionCode&);
+    void startIce(PassRefPtr<IceOptions>, ExceptionCode&);
 
     RefPtr<IceCallback> m_iceCallback;
 

Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnection00.idl (116126 => 116127)


--- trunk/Source/WebCore/Modules/mediastream/PeerConnection00.idl	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnection00.idl	2012-05-04 17:55:20 UTC (rev 116127)
@@ -37,12 +37,11 @@
         CallWith=ScriptExecutionContext,
         EventTarget
     ] PeerConnection00 {
-        // FIXME: Make mediaHints an object
-        SessionDescription createOffer(in [Optional] DOMString mediaHints);
+        SessionDescription createOffer(in [Optional] Dictionary mediaHints)
+            raises(DOMException);
+        SessionDescription createAnswer(in DOMString offer, in [Optional] Dictionary mediaHints)
+            raises(DOMException);
 
-        // FIXME: Make mediaHints an object
-        SessionDescription createAnswer(in DOMString offer, in [Optional] DOMString mediaHints);
-
         // Actions, for setLocalDescription/setRemoteDescription.
         const unsigned short SDP_OFFER = 0x100;
         const unsigned short SDP_PRANSWER = 0x200;
@@ -50,22 +49,19 @@
 
         void setLocalDescription(in unsigned short action, in SessionDescription desc)
             raises(DOMException);
-
         void setRemoteDescription(in unsigned short action, in SessionDescription desc)
             raises(DOMException);
 
         readonly attribute SessionDescription localDescription;
-
         readonly attribute SessionDescription remoteDescription;
 
         const unsigned short NEW = 0;
-        const unsigned short NEGOTIATING = 1;
+        const unsigned short OPENING = 1;
         const unsigned short ACTIVE = 2;
         const unsigned short CLOSED = 3;
         readonly attribute unsigned short readyState;
 
-        // FIXME: Make iceOptions an object
-        void startIce(in [Optional] DOMString iceOptions)
+        void startIce(in [Optional] Dictionary iceOptions)
             raises(DOMException);
 
         void processIceMessage(in IceCandidate candidate)
@@ -80,8 +76,7 @@
         const unsigned short ICE_CLOSED = 0x700;
         readonly attribute unsigned short iceState;
 
-        // FIXME: Make mediaStreamHints an object
-        [StrictTypeChecking] void addStream(in MediaStream stream, in [Optional] DOMString mediaStreamHints)
+        [StrictTypeChecking] void addStream(in MediaStream stream, in [Optional] Dictionary mediaStreamHints)
             raises(DOMException);
         [StrictTypeChecking] void removeStream(in MediaStream stream)
             raises(DOMException);

Modified: trunk/Source/WebCore/platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp (116126 => 116127)


--- trunk/Source/WebCore/platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebCore/platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp	2012-05-04 17:55:20 UTC (rev 116127)
@@ -119,7 +119,7 @@
 bool PeerConnection00HandlerInternal::startIce(PassRefPtr<IceOptions> iceOptions)
 {
     if (!m_webHandler)
-        return false;
+        return true;
 
     return m_webHandler->startIce(iceOptions);
 }

Modified: trunk/Source/WebKit/chromium/ChangeLog (116126 => 116127)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-04 17:55:20 UTC (rev 116127)
@@ -1,3 +1,12 @@
+2012-05-04  Tommy Widenflycht  <[email protected]>
+
+        MediaStream API: Make PeerConnection00's API fully compliant with the draft
+        https://bugs.webkit.org/show_bug.cgi?id=85491
+
+        Reviewed by Adam Barth.
+
+        * src/AssertMatchingEnums.cpp:
+
 2012-05-04  Nate Chapin  <[email protected]>
 
         Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.

Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (116126 => 116127)


--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2012-05-04 17:52:29 UTC (rev 116126)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp	2012-05-04 17:55:20 UTC (rev 116127)
@@ -547,7 +547,8 @@
 COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPAnswer, PeerConnection00::SDP_ANSWER);
 
 COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNew, PeerConnection00::NEW);
-COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNegotiating, PeerConnection00::NEGOTIATING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateOpening, PeerConnection00::OPENING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNegotiating, PeerConnection00::OPENING);
 COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateActive, PeerConnection00::ACTIVE);
 COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateClosed, PeerConnection00::CLOSED);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to