Diff
Modified: trunk/LayoutTests/ChangeLog (146581 => 146582)
--- trunk/LayoutTests/ChangeLog 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/ChangeLog 2013-03-22 09:29:37 UTC (rev 146582)
@@ -1,3 +1,18 @@
+2013-03-22 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Finalize the RTCPeerConnection states
+ https://bugs.webkit.org/show_bug.cgi?id=112792
+
+ Reviewed by Adam Barth.
+
+ * fast/mediastream/RTCPeerConnection-datachannel.html:
+ * fast/mediastream/RTCPeerConnection-dtmf.html:
+ * fast/mediastream/RTCPeerConnection-events-expected.txt:
+ * fast/mediastream/RTCPeerConnection-events.html:
+ * fast/mediastream/RTCPeerConnection-ice.html:
+ * fast/mediastream/RTCPeerConnection-state-expected.txt:
+ * fast/mediastream/RTCPeerConnection-state.html:
+
2013-03-22 Ádám Kallai <[email protected]>
[Qt] Unreviewed gardening. Unskip a now passing test after r146393.
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-datachannel.html (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-datachannel.html 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-datachannel.html 2013-03-22 09:29:37 UTC (rev 146582)
@@ -92,7 +92,7 @@
shouldBe("dc.reliable", "false");
pc = new webkitRTCPeerConnection(null, null);
-pc._onicechange_ = pc_onicechange;
+pc._oniceconnectionstatechange_ = pc_onicechange;
pc._ondatachannel_ = pc_ondatachannel;
window.jsTestIsAsync = true;
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-dtmf.html (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-dtmf.html 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-dtmf.html 2013-03-22 09:29:37 UTC (rev 146582)
@@ -53,7 +53,7 @@
shouldBe('stream.getVideoTracks().length', '0');
pc = new webkitRTCPeerConnection(null, null);
- pc._onicechange_ = pc_onicechange;
+ pc._oniceconnectionstatechange_ = pc_onicechange;
}
shouldNotThrow("navigator.webkitGetUserMedia({audio:true}, gotStream, error);");
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-events-expected.txt (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-events-expected.txt 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-events-expected.txt 2013-03-22 09:29:37 UTC (rev 146582)
@@ -8,7 +8,7 @@
PASS onNegotiationNeeded was called.
PASS onNegotiationNeeded done.
PASS onStateChange was called.
-PASS pc.readyState is 'closed'
+PASS pc.signalingState is 'closed'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-events.html (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-events.html 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-events.html 2013-03-22 09:29:37 UTC (rev 146582)
@@ -26,13 +26,13 @@
function onStateChange(event) {
testPassed('onStateChange was called.');
- shouldBe("pc.readyState", "'closed'");
+ shouldBe("pc.signalingState", "'closed'");
finishJSTest();
}
function onNegotiationNeeded(event) {
testPassed('onNegotiationNeeded was called.');
- pc._onstatechange_ = onStateChange;
+ pc._onsignalingstatechange_ = onStateChange;
pc.close();
testPassed('onNegotiationNeeded done.')
}
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html 2013-03-22 09:29:37 UTC (rev 146582)
@@ -22,7 +22,7 @@
testPassed("onIceCandidate was called.");
shouldBe('event.candidate.candidate', '"nano nano"');
- pc._onicechange_ = onIceChange2;
+ pc._oniceconnectionstatechange_ = onIceChange2;
pc.close();
}
@@ -36,7 +36,7 @@
}
shouldNotThrow('pc = new webkitRTCPeerConnection(null, null);');
-pc._onicechange_ = onIceChange1;
+pc._oniceconnectionstatechange_ = onIceChange1;
window.jsTestIsAsync = true;
window.successfullyParsed = true;
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-state-expected.txt (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-state-expected.txt 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-state-expected.txt 2013-03-22 09:29:37 UTC (rev 146582)
@@ -4,9 +4,9 @@
PASS pc = new webkitRTCPeerConnection({iceServers:[]}, null); did not throw exception.
-PASS pc.readyState is "stable"
+PASS pc.signalingState is "stable"
PASS stateChanged was called
-PASS pc.readyState is "closed"
+PASS pc.signalingState is "closed"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-state.html (146581 => 146582)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-state.html 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-state.html 2013-03-22 09:29:37 UTC (rev 146582)
@@ -12,13 +12,13 @@
function stateChanged()
{
testPassed("stateChanged was called");
- shouldBe('pc.readyState','"closed"');
+ shouldBeEqualToString('pc.signalingState', 'closed');
finishJSTest();
}
shouldNotThrow('pc = new webkitRTCPeerConnection({iceServers:[]}, null);');
-shouldBe('pc.readyState', '"stable"');
-pc._onstatechange_ = stateChanged;
+shouldBeEqualToString('pc.signalingState', 'stable');
+pc._onsignalingstatechange_ = stateChanged;
pc.close();
window.jsTestIsAsync = true;
Modified: trunk/Source/Platform/ChangeLog (146581 => 146582)
--- trunk/Source/Platform/ChangeLog 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/Platform/ChangeLog 2013-03-22 09:29:37 UTC (rev 146582)
@@ -1,3 +1,12 @@
+2013-03-22 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Finalize the RTCPeerConnection states
+ https://bugs.webkit.org/show_bug.cgi?id=112792
+
+ Reviewed by Adam Barth.
+
+ * chromium/public/WebRTCPeerConnectionHandlerClient.h:
+
2013-03-21 David Grogan <[email protected]>
Unreviewed, rolling out r146560.
Modified: trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h (146581 => 146582)
--- trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h 2013-03-22 09:29:37 UTC (rev 146582)
@@ -48,13 +48,16 @@
};
enum ICEConnectionState {
- ICEConnectionStateStarting = 1,
+ ICEConnectionStateNew = 1,
ICEConnectionStateChecking = 2,
ICEConnectionStateConnected = 3,
ICEConnectionStateCompleted = 4,
ICEConnectionStateFailed = 5,
ICEConnectionStateDisconnected = 6,
ICEConnectionStateClosed = 7,
+
+ // DEPRECATED
+ ICEConnectionStateStarting = 1,
};
enum ICEGatheringState {
Modified: trunk/Source/WebCore/ChangeLog (146581 => 146582)
--- trunk/Source/WebCore/ChangeLog 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebCore/ChangeLog 2013-03-22 09:29:37 UTC (rev 146582)
@@ -1,3 +1,35 @@
+2013-03-22 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Finalize the RTCPeerConnection states
+ https://bugs.webkit.org/show_bug.cgi?id=112792
+
+ Reviewed by Adam Barth.
+
+ This patch finalized the RTCPeerConnection state and events. These changes
+ have not yet pushed out to the editors draft; but they are uncontroversial
+ and agreed upon.
+
+ readyState will be deleted; please use the replacement signalingState which is already available.
+ onstatechange -> onsignalingstatechange
+ onicechange -> oniceconnectionstatechange
+ ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
+ RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"
+
+ Patch covered by modified tests.
+
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::RTCPeerConnection):
+ (WebCore::RTCPeerConnection::iceConnectionState):
+ (WebCore::RTCPeerConnection::changeSignalingState):
+ (WebCore::RTCPeerConnection::changeIceGatheringState):
+ (WebCore::RTCPeerConnection::changeIceConnectionState):
+ * Modules/mediastream/RTCPeerConnection.h:
+ (RTCPeerConnection):
+ * Modules/mediastream/RTCPeerConnection.idl:
+ * dom/EventNames.h:
+ (WebCore):
+ * platform/mediastream/RTCPeerConnectionHandlerClient.h:
+
2013-03-22 Mike West <[email protected]>
Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (146581 => 146582)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2013-03-22 09:29:37 UTC (rev 146582)
@@ -135,7 +135,7 @@
: ActiveDOMObject(context)
, m_signalingState(SignalingStateStable)
, m_iceGatheringState(IceGatheringStateNew)
- , m_iceConnectionState(IceConnectionStateStarting)
+ , m_iceConnectionState(IceConnectionStateNew)
, m_scheduledEventTimer(this, &RTCPeerConnection::scheduledEventTimerFired)
, m_stopped(false)
{
@@ -296,11 +296,6 @@
ec = SYNTAX_ERR;
}
-String RTCPeerConnection::readyState() const
-{
- return signalingState();
-}
-
String RTCPeerConnection::signalingState() const
{
switch (m_signalingState) {
@@ -340,8 +335,8 @@
String RTCPeerConnection::iceConnectionState() const
{
switch (m_iceConnectionState) {
- case IceConnectionStateStarting:
- return ASCIILiteral("starting");
+ case IceConnectionStateNew:
+ return ASCIILiteral("new");
case IceConnectionStateChecking:
return ASCIILiteral("checking");
case IceConnectionStateConnected:
@@ -622,23 +617,20 @@
{
if (m_signalingState != SignalingStateClosed && m_signalingState != signalingState) {
m_signalingState = signalingState;
- scheduleDispatchEvent(Event::create(eventNames().statechangeEvent, false, false));
+ scheduleDispatchEvent(Event::create(eventNames().signalingstatechangeEvent, false, false));
}
}
void RTCPeerConnection::changeIceGatheringState(IceGatheringState iceGatheringState)
{
- if (m_iceGatheringState != iceGatheringState) {
- m_iceGatheringState = iceGatheringState;
- scheduleDispatchEvent(Event::create(eventNames().gatheringchangeEvent, false, false));
- }
+ m_iceGatheringState = iceGatheringState;
}
void RTCPeerConnection::changeIceConnectionState(IceConnectionState iceConnectionState)
{
if (m_iceConnectionState != IceConnectionStateClosed && m_iceConnectionState != iceConnectionState) {
m_iceConnectionState = iceConnectionState;
- scheduleDispatchEvent(Event::create(eventNames().icechangeEvent, false, false));
+ scheduleDispatchEvent(Event::create(eventNames().iceconnectionstatechangeEvent, false, false));
}
}
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (146581 => 146582)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2013-03-22 09:29:37 UTC (rev 146582)
@@ -72,9 +72,6 @@
void setRemoteDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<VoidCallback>, PassRefPtr<RTCErrorCallback>, ExceptionCode&);
PassRefPtr<RTCSessionDescription> remoteDescription(ExceptionCode&);
- // DEPRECATED
- String readyState() const;
-
String signalingState() const;
void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionCode&);
@@ -105,11 +102,10 @@
DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded);
DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange);
DEFINE_ATTRIBUTE_EVENT_LISTENER(addstream);
DEFINE_ATTRIBUTE_EVENT_LISTENER(removestream);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(gatheringchange);
- DEFINE_ATTRIBUTE_EVENT_LISTENER(icechange);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(iceconnectionstatechange);
DEFINE_ATTRIBUTE_EVENT_LISTENER(datachannel);
// RTCPeerConnectionHandlerClient
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (146581 => 146582)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2013-03-22 09:29:37 UTC (rev 146582)
@@ -52,9 +52,6 @@
readonly attribute RTCSessionDescription remoteDescription
getter raises(DOMException);
- // DEPRECATED
- readonly attribute DOMString readyState;
-
readonly attribute DOMString signalingState;
void updateIce(in [Optional] Dictionary configuration, in [Optional] Dictionary mediaConstraints)
@@ -88,11 +85,10 @@
attribute EventListener onnegotiationneeded;
attribute EventListener onicecandidate;
- attribute EventListener onstatechange;
+ attribute EventListener onsignalingstatechange;
attribute EventListener onaddstream;
attribute EventListener onremovestream;
- attribute EventListener ongatheringchange;
- attribute EventListener onicechange;
+ attribute EventListener oniceconnectionstatechange;
attribute EventListener ondatachannel;
// EventTarget interface
Modified: trunk/Source/WebCore/dom/EventNames.h (146581 => 146582)
--- trunk/Source/WebCore/dom/EventNames.h 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebCore/dom/EventNames.h 2013-03-22 09:29:37 UTC (rev 146582)
@@ -227,15 +227,14 @@
macro(connecting) \
macro(addstream) \
macro(removestream) \
- macro(statechange) \
+ macro(signalingstatechange) \
macro(removetrack) \
macro(mute) \
macro(unmute) \
- macro(icechange) \
+ macro(iceconnectionstatechange) \
macro(icecandidate) \
macro(negotiationneeded) \
macro(datachannel) \
- macro(gatheringchange) \
macro(tonechange) \
\
macro(show) \
Modified: trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h (146581 => 146582)
--- trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h 2013-03-22 09:29:37 UTC (rev 146582)
@@ -53,7 +53,7 @@
};
enum IceConnectionState {
- IceConnectionStateStarting = 1,
+ IceConnectionStateNew = 1,
IceConnectionStateChecking = 2,
IceConnectionStateConnected = 3,
IceConnectionStateCompleted = 4,
Modified: trunk/Source/WebKit/chromium/ChangeLog (146581 => 146582)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-03-22 09:29:37 UTC (rev 146582)
@@ -1,3 +1,12 @@
+2013-03-22 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Finalize the RTCPeerConnection states
+ https://bugs.webkit.org/show_bug.cgi?id=112792
+
+ Reviewed by Adam Barth.
+
+ * src/AssertMatchingEnums.cpp:
+
2013-03-22 Sheriff Bot <[email protected]>
Unreviewed, rolling out r146534 and r146565.
Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (146581 => 146582)
--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2013-03-22 09:23:41 UTC (rev 146581)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2013-03-22 09:29:37 UTC (rev 146582)
@@ -577,7 +577,8 @@
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::SignalingStateHaveRemotePrAnswer, RTCPeerConnectionHandlerClient::SignalingStateHaveRemotePrAnswer);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::SignalingStateClosed, RTCPeerConnectionHandlerClient::SignalingStateClosed);
-COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEConnectionStateStarting, RTCPeerConnectionHandlerClient::IceConnectionStateStarting);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEConnectionStateStarting, RTCPeerConnectionHandlerClient::IceConnectionStateNew);
+COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEConnectionStateNew, RTCPeerConnectionHandlerClient::IceConnectionStateNew);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEConnectionStateChecking, RTCPeerConnectionHandlerClient::IceConnectionStateChecking);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEConnectionStateConnected, RTCPeerConnectionHandlerClient::IceConnectionStateConnected);
COMPILE_ASSERT_MATCHING_ENUM(WebRTCPeerConnectionHandlerClient::ICEConnectionStateCompleted, RTCPeerConnectionHandlerClient::IceConnectionStateCompleted);