Diff
Modified: trunk/LayoutTests/ChangeLog (281297 => 281298)
--- trunk/LayoutTests/ChangeLog 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/LayoutTests/ChangeLog 2021-08-20 07:55:13 UTC (rev 281298)
@@ -1,3 +1,12 @@
+2021-08-20 Youenn Fablet <[email protected]>
+
+ Add support for RTCPeerConnection.canTrickleIceCandidates
+ https://bugs.webkit.org/show_bug.cgi?id=229287
+
+ Reviewed by Eric Carlson.
+
+ * webrtc/rtcpeerconnection-error-messages-expected.txt:
+
2021-08-19 Tim Nguyen <[email protected]>
Implement top layer rendering bits
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (281297 => 281298)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-20 07:55:13 UTC (rev 281298)
@@ -1,3 +1,14 @@
+2021-08-20 Youenn Fablet <[email protected]>
+
+ Add support for RTCPeerConnection.canTrickleIceCandidates
+ https://bugs.webkit.org/show_bug.cgi?id=229287
+
+ Reviewed by Eric Carlson.
+
+ * web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates-expected.txt:
+ * web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt:
+ * web-platform-tests/webrtc/idlharness.https.window-expected.txt:
+
2021-08-19 Antti Koivisto <[email protected]>
[:has() pseudo-class] Basic support
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates-expected.txt (281297 => 281298)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates-expected.txt 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-canTrickleIceCandidates-expected.txt 2021-08-20 07:55:13 UTC (rev 281298)
@@ -1,5 +1,5 @@
-FAIL canTrickleIceCandidates property is null prior to setRemoteDescription assert_equals: canTrickleIceCandidates property is null expected (object) null but got (undefined) undefined
-FAIL canTrickleIceCandidates property is true after setRemoteDescription with a=ice-options:trickle assert_true: canTrickleIceCandidates property is true after setRemoteDescription expected true got undefined
-FAIL canTrickleIceCandidates property is false after setRemoteDescription without a=ice-options:trickle assert_false: canTrickleIceCandidates property is false after setRemoteDescription expected false got undefined
+PASS canTrickleIceCandidates property is null prior to setRemoteDescription
+PASS canTrickleIceCandidates property is true after setRemoteDescription with a=ice-options:trickle
+PASS canTrickleIceCandidates property is false after setRemoteDescription without a=ice-options:trickle
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt (281297 => 281298)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-constructor-expected.txt 2021-08-20 07:55:13 UTC (rev 281298)
@@ -20,5 +20,5 @@
PASS iceGatheringState initial value
PASS iceConnectionState initial value
PASS connectionState initial value
-FAIL canTrickleIceCandidates initial value assert_equals: expected (object) null but got (undefined) undefined
+PASS canTrickleIceCandidates initial value
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt (281297 => 281298)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt 2021-08-20 07:55:13 UTC (rev 281298)
@@ -37,7 +37,7 @@
PASS RTCPeerConnection interface: attribute iceGatheringState
PASS RTCPeerConnection interface: attribute iceConnectionState
PASS RTCPeerConnection interface: attribute connectionState
-FAIL RTCPeerConnection interface: attribute canTrickleIceCandidates assert_true: The prototype object must have a property "canTrickleIceCandidates" expected true got false
+PASS RTCPeerConnection interface: attribute canTrickleIceCandidates
PASS RTCPeerConnection interface: operation restartIce()
PASS RTCPeerConnection interface: operation getConfiguration()
FAIL RTCPeerConnection interface: operation setConfiguration(optional RTCConfiguration) assert_equals: property has wrong .length expected 0 but got 1
@@ -88,7 +88,7 @@
PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceGatheringState" with the proper type
PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "iceConnectionState" with the proper type
PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "connectionState" with the proper type
-FAIL RTCPeerConnection interface: new RTCPeerConnection() must inherit property "canTrickleIceCandidates" with the proper type assert_inherits: property "canTrickleIceCandidates" not found in prototype chain
+PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "canTrickleIceCandidates" with the proper type
PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "restartIce()" with the proper type
PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "getConfiguration()" with the proper type
PASS RTCPeerConnection interface: new RTCPeerConnection() must inherit property "setConfiguration(optional RTCConfiguration)" with the proper type
Modified: trunk/LayoutTests/webrtc/rtcpeerconnection-error-messages-expected.txt (281297 => 281298)
--- trunk/LayoutTests/webrtc/rtcpeerconnection-error-messages-expected.txt 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/LayoutTests/webrtc/rtcpeerconnection-error-messages-expected.txt 2021-08-20 07:55:13 UTC (rev 281298)
@@ -8,7 +8,7 @@
TypeError: The RTCPeerConnection.iceGatheringState getter can only be used on instances of RTCPeerConnection
TypeError: The RTCPeerConnection.iceConnectionState getter can only be used on instances of RTCPeerConnection
TypeError: The RTCPeerConnection.connectionState getter can only be used on instances of RTCPeerConnection
-[object RTCPeerConnection] has no property named canTrickleIceCandidates
+TypeError: The RTCPeerConnection.canTrickleIceCandidates getter can only be used on instances of RTCPeerConnection
[object RTCPeerConnection] has no property named defaultIceServers
TypeError: Can only call RTCPeerConnection.getConfiguration on instances of RTCPeerConnection
TypeError: Can only call RTCPeerConnection.setConfiguration on instances of RTCPeerConnection
Modified: trunk/Source/WebCore/ChangeLog (281297 => 281298)
--- trunk/Source/WebCore/ChangeLog 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/ChangeLog 2021-08-20 07:55:13 UTC (rev 281298)
@@ -1,3 +1,27 @@
+2021-08-20 Youenn Fablet <[email protected]>
+
+ Add support for RTCPeerConnection.canTrickleIceCandidates
+ https://bugs.webkit.org/show_bug.cgi?id=229287
+
+ Reviewed by Eric Carlson.
+
+ Add support for https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-cantrickleicecandidates.
+ Return null in case connection is closed or setRemoteDescription was never called successfully.
+ Add binding code to get the value from webrtc backend.
+ Covered by rebased tests.
+
+ * Modules/mediastream/PeerConnectionBackend.h:
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::canTrickleIceCandidates const):
+ * Modules/mediastream/RTCPeerConnection.h:
+ * Modules/mediastream/RTCPeerConnection.idl:
+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+ (WebCore::LibWebRTCMediaEndpoint::canTrickleIceCandidates const):
+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+ * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+ (WebCore::LibWebRTCPeerConnectionBackend::canTrickleIceCandidates const):
+ * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
+
2021-08-19 Tim Nguyen <[email protected]>
Implement top layer rendering bits
Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2021-08-20 07:55:13 UTC (rev 281298)
@@ -134,6 +134,8 @@
virtual void disableICECandidateFiltering();
void enableICECandidateFiltering();
+ virtual std::optional<bool> canTrickleIceCandidates() const = 0;
+
virtual void applyRotationForOutgoingVideoSources() { }
#if !RELEASE_LOG_DISABLED
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2021-08-20 07:55:13 UTC (rev 281298)
@@ -334,6 +334,13 @@
});
}
+std::optional<bool> RTCPeerConnection::canTrickleIceCandidates() const
+{
+ if (isClosed() || !remoteDescription())
+ return { };
+ return m_backend-> canTrickleIceCandidates();
+}
+
// Implementation of https://w3c.github.io/webrtc-pc/#set-pc-configuration
ExceptionOr<Vector<MediaEndpointConfiguration::IceServerInfo>> RTCPeerConnection::iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet)
{
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2021-08-20 07:55:13 UTC (rev 281298)
@@ -126,6 +126,7 @@
RTCIceGatheringState iceGatheringState() const { return m_iceGatheringState; }
RTCIceConnectionState iceConnectionState() const { return m_iceConnectionState; }
RTCPeerConnectionState connectionState() const { return m_connectionState; }
+ std::optional<bool> canTrickleIceCandidates() const;
void restartIce() { m_backend->restartIce(); }
const RTCConfiguration& getConfiguration() const { return m_configuration; }
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2021-08-20 07:55:13 UTC (rev 281298)
@@ -99,8 +99,7 @@
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
readonly attribute RTCPeerConnectionState connectionState;
- // FIXME 169644: missing canTrickleIceCandidates
- // FIXME 169644: missing defaultIceServers
+ readonly attribute boolean? canTrickleIceCandidates;
undefined restartIce();
RTCConfiguration getConfiguration();
@@ -140,8 +139,4 @@
// 8.2 Statistics API
Promise<RTCStatsReport> getStats(optional MediaStreamTrack? selector = null);
-
-
- // 9.6 Identity Provider API
- // FIXME 169644: missing IdP
};
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2021-08-20 07:55:13 UTC (rev 281298)
@@ -402,6 +402,13 @@
}
}
+std::optional<bool> LibWebRTCMediaEndpoint::canTrickleIceCandidates() const
+{
+ if (!m_backend)
+ return { };
+ return m_backend->can_trickle_ice_candidates();
+}
+
void LibWebRTCMediaEndpoint::newTransceiver(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>&& rtcTransceiver)
{
auto rtcReceiver = rtcTransceiver->receiver();
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h 2021-08-20 07:55:13 UTC (rev 281298)
@@ -117,6 +117,8 @@
void setSenderSourceFromTrack(LibWebRTCRtpSenderBackend&, MediaStreamTrack&);
void collectTransceivers();
+ std::optional<bool> canTrickleIceCandidates() const;
+
void suspend();
void resume();
LibWebRTCProvider::SuspendableSocketFactory* rtcSocketFactory() { return m_rtcSocketFactory.get(); }
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp 2021-08-20 07:55:13 UTC (rev 281298)
@@ -464,6 +464,11 @@
}
}
+std::optional<bool> LibWebRTCPeerConnectionBackend::canTrickleIceCandidates() const
+{
+ return m_endpoint->canTrickleIceCandidates();
+}
+
} // namespace WebCore
#endif // USE(LIBWEBRTC)
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h (281297 => 281298)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h 2021-08-20 07:50:20 UTC (rev 281297)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h 2021-08-20 07:55:13 UTC (rev 281298)
@@ -79,6 +79,8 @@
RefPtr<RTCSessionDescription> currentRemoteDescription() const final;
RefPtr<RTCSessionDescription> pendingRemoteDescription() const final;
+ std::optional<bool> canTrickleIceCandidates() const final;
+
void emulatePlatformEvent(const String&) final { }
void applyRotationForOutgoingVideoSources() final;