Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (232942 => 232943)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-06-18 20:48:07 UTC (rev 232943)
@@ -1,3 +1,15 @@
+2018-06-18 Youenn Fablet <you...@apple.com>
+
+ Expose RTCPeerConnectionIceEventInit constructor
+ https://bugs.webkit.org/show_bug.cgi?id=186770
+
+ Reviewed by Alex Christensen.
+
+ * web-platform-tests/webrtc/RTCPeerConnectionIceEvent-constructor-expected.txt:
+ Updated expectation as per patch.
+ * web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:
+ Rebasing this file, changes are unrelated but test is marked as flaky.
+
2018-06-16 Brendan McLoughlin <bren...@bocoup.com>
Sync additional web-platform-tests directories up to 197cdad
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnectionIceEvent-constructor-expected.txt (232942 => 232943)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnectionIceEvent-constructor-expected.txt 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnectionIceEvent-constructor-expected.txt 2018-06-18 20:48:07 UTC (rev 232943)
@@ -1,12 +1,10 @@
-FAIL RTCPeerConnectionIceEvent with no arguments throws TypeError assert_throws: function "() => {
- new RTCPeerConnectionIceEvent();
- }" threw object "ReferenceError: Can't find variable: RTCPeerConnectionIceEvent" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL RTCPeerConnectionIceEvent with no eventInitDict (default) Can't find variable: RTCPeerConnectionIceEvent
-FAIL RTCPeerConnectionIceEvent with empty object as eventInitDict (default) Can't find variable: RTCPeerConnectionIceEvent
-FAIL RTCPeerConnectionIceEvent.candidate is null when constructed with { candidate: null } Can't find variable: RTCPeerConnectionIceEvent
-FAIL RTCPeerConnectionIceEvent.candidate is null when constructed with { candidate: undefined } Can't find variable: RTCPeerConnectionIceEvent
-FAIL RTCPeerConnectionIceEvent with RTCIceCandidate Can't find variable: RTCPeerConnectionIceEvent
-FAIL RTCPeerConnectionIceEvent with non RTCIceCandidate object throws assert_throws: function "() => new RTCPeerConnectionIceEvent("type", { candidate: plain })" threw object "ReferenceError: Can't find variable: RTCPeerConnectionIceEvent" ("ReferenceError") expected object "TypeError" ("TypeError")
-FAIL RTCPeerConnectionIceEvent bubbles and cancelable Can't find variable: RTCPeerConnectionIceEvent
+PASS RTCPeerConnectionIceEvent with no arguments throws TypeError
+PASS RTCPeerConnectionIceEvent with no eventInitDict (default)
+PASS RTCPeerConnectionIceEvent with empty object as eventInitDict (default)
+PASS RTCPeerConnectionIceEvent.candidate is null when constructed with { candidate: null }
+PASS RTCPeerConnectionIceEvent.candidate is null when constructed with { candidate: undefined }
+PASS RTCPeerConnectionIceEvent with RTCIceCandidate
+PASS RTCPeerConnectionIceEvent with non RTCIceCandidate object throws
+PASS RTCPeerConnectionIceEvent bubbles and cancelable
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt (232942 => 232943)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt 2018-06-18 20:48:07 UTC (rev 232943)
@@ -1,69 +1,123 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Can only call RTCPeerConnection.createOffer on instances of RTCPeerConnection
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Can only call RTCPeerConnection.createAnswer on instances of RTCPeerConnection
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Can only call RTCPeerConnection.addIceCandidate on instances of RTCPeerConnection
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Can only call RTCPeerConnection.getStats on instances of RTCPeerConnection
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Argument 1 ('description') to RTCPeerConnection.setLocalDescription must be an instance of RTCSessionDescription
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Argument 1 ('description') to RTCPeerConnection.setRemoteDescription must be an instance of RTCSessionDescription
+CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Not enough arguments
Description
This test verifies the availability of the RTCPeerConnection interface.
+Harness Error (FAIL), message = Not enough arguments
+
PASS EventTarget interface: existence and properties of interface object
PASS EventTarget interface object length
PASS EventTarget interface object name
PASS EventTarget interface: existence and properties of interface prototype object
PASS EventTarget interface: existence and properties of interface prototype object's "constructor" property
+PASS EventTarget interface: existence and properties of interface prototype object's @@unscopables property
PASS RTCPeerConnection interface: existence and properties of interface object
PASS RTCPeerConnection interface object length
PASS RTCPeerConnection interface object name
PASS RTCPeerConnection interface: existence and properties of interface prototype object
PASS RTCPeerConnection interface: existence and properties of interface prototype object's "constructor" property
+PASS RTCPeerConnection interface: existence and properties of interface prototype object's @@unscopables property
PASS RTCPeerConnection interface: operation createOffer(RTCOfferOptions)
+PASS Unscopable handled correctly for createOffer(RTCOfferOptions) on RTCPeerConnection
PASS RTCPeerConnection interface: operation createAnswer(RTCAnswerOptions)
+PASS Unscopable handled correctly for createAnswer(RTCAnswerOptions) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation setLocalDescription(RTCSessionDescription) assert_equals: property has wrong .length expected 1 but got 0
+PASS Unscopable handled correctly for setLocalDescription(RTCSessionDescription) on RTCPeerConnection
PASS RTCPeerConnection interface: attribute localDescription
+PASS Unscopable handled correctly for localDescription property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute currentLocalDescription
+PASS Unscopable handled correctly for currentLocalDescription property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute pendingLocalDescription
+PASS Unscopable handled correctly for pendingLocalDescription property on RTCPeerConnection
FAIL RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescription) assert_equals: property has wrong .length expected 1 but got 0
+PASS Unscopable handled correctly for setRemoteDescription(RTCSessionDescription) on RTCPeerConnection
PASS RTCPeerConnection interface: attribute remoteDescription
+PASS Unscopable handled correctly for remoteDescription property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute currentRemoteDescription
+PASS Unscopable handled correctly for currentRemoteDescription property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute pendingRemoteDescription
+PASS Unscopable handled correctly for pendingRemoteDescription property on RTCPeerConnection
PASS RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidate)
+PASS Unscopable handled correctly for addIceCandidate(RTCIceCandidate) on RTCPeerConnection
PASS RTCPeerConnection interface: attribute signalingState
+PASS Unscopable handled correctly for signalingState property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute iceGatheringState
+PASS Unscopable handled correctly for iceGatheringState property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute iceConnectionState
+PASS Unscopable handled correctly for iceConnectionState property on RTCPeerConnection
FAIL RTCPeerConnection interface: attribute canTrickleIceCandidates assert_true: The prototype object must have a property "canTrickleIceCandidates" expected true got false
+PASS Unscopable handled correctly for canTrickleIceCandidates property on RTCPeerConnection
PASS RTCPeerConnection interface: operation getConfiguration()
+PASS Unscopable handled correctly for getConfiguration() on RTCPeerConnection
PASS RTCPeerConnection interface: operation setConfiguration(RTCConfiguration)
+PASS Unscopable handled correctly for setConfiguration(RTCConfiguration) on RTCPeerConnection
PASS RTCPeerConnection interface: operation close()
+PASS Unscopable handled correctly for close() on RTCPeerConnection
PASS RTCPeerConnection interface: attribute onnegotiationneeded
+PASS Unscopable handled correctly for onnegotiationneeded property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute onicecandidate
+PASS Unscopable handled correctly for onicecandidate property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute onsignalingstatechange
+PASS Unscopable handled correctly for onsignalingstatechange property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute oniceconnectionstatechange
+PASS Unscopable handled correctly for oniceconnectionstatechange property on RTCPeerConnection
PASS RTCPeerConnection interface: attribute onicegatheringstatechange
+PASS Unscopable handled correctly for onicegatheringstatechange property on RTCPeerConnection
FAIL RTCPeerConnection interface: operation createOffer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback, RTCOfferOptions) assert_throws: calling operation with this = null didn't throw TypeError function "function () {
fn.apply(obj, args);
}" did not throw
+PASS Unscopable handled correctly for createOffer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback, RTCOfferOptions) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation setLocalDescription(RTCSessionDescription, VoidFunction, RTCPeerConnectionErrorCallback) assert_equals: property has wrong .length expected 1 but got 0
+PASS Unscopable handled correctly for setLocalDescription(RTCSessionDescription, VoidFunction, RTCPeerConnectionErrorCallback) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation createAnswer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback) assert_throws: calling operation with this = null didn't throw TypeError function "function () {
fn.apply(obj, args);
}" did not throw
+PASS Unscopable handled correctly for createAnswer(RTCSessionDescriptionCallback, RTCPeerConnectionErrorCallback) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescription, VoidFunction, RTCPeerConnectionErrorCallback) assert_equals: property has wrong .length expected 1 but got 0
+PASS Unscopable handled correctly for setRemoteDescription(RTCSessionDescription, VoidFunction, RTCPeerConnectionErrorCallback) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidate, VoidFunction, RTCPeerConnectionErrorCallback) assert_throws: calling operation with this = null didn't throw TypeError function "function () {
fn.apply(obj, args);
}" did not throw
+PASS Unscopable handled correctly for addIceCandidate(RTCIceCandidate, VoidFunction, RTCPeerConnectionErrorCallback) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation getStats(MediaStreamTrack, RTCStatsCallback, RTCPeerConnectionErrorCallback) assert_throws: calling operation with this = null didn't throw TypeError function "function () {
fn.apply(obj, args);
}" did not throw
+PASS Unscopable handled correctly for getStats(MediaStreamTrack, RTCStatsCallback, RTCPeerConnectionErrorCallback) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation generateCertificate(AlgorithmIdentifier) assert_own_property: interface object missing static operation expected property "generateCertificate" missing
+PASS Unscopable handled correctly for generateCertificate(AlgorithmIdentifier) on RTCPeerConnection
PASS RTCPeerConnection interface: operation getSenders()
+PASS Unscopable handled correctly for getSenders() on RTCPeerConnection
PASS RTCPeerConnection interface: operation getReceivers()
+PASS Unscopable handled correctly for getReceivers() on RTCPeerConnection
PASS RTCPeerConnection interface: operation addTrack(MediaStreamTrack, MediaStream)
+PASS Unscopable handled correctly for addTrack(MediaStreamTrack, MediaStream) on RTCPeerConnection
PASS RTCPeerConnection interface: operation removeTrack(RTCRtpSender)
+PASS Unscopable handled correctly for removeTrack(RTCRtpSender) on RTCPeerConnection
PASS RTCPeerConnection interface: attribute ontrack
+PASS Unscopable handled correctly for ontrack property on RTCPeerConnection
PASS RTCPeerConnection interface: operation createDataChannel(DOMString, RTCDataChannelInit)
+PASS Unscopable handled correctly for createDataChannel(DOMString, RTCDataChannelInit) on RTCPeerConnection
PASS RTCPeerConnection interface: attribute ondatachannel
+PASS Unscopable handled correctly for ondatachannel property on RTCPeerConnection
FAIL RTCPeerConnection interface: attribute dtmf assert_true: The prototype object must have a property "dtmf" expected true got false
+PASS Unscopable handled correctly for dtmf property on RTCPeerConnection
PASS RTCPeerConnection interface: operation getStats(MediaStreamTrack)
+PASS Unscopable handled correctly for getStats(MediaStreamTrack) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation setIdentityProvider(DOMString, DOMString, DOMString) assert_own_property: interface prototype object missing non-static operation expected property "setIdentityProvider" missing
+PASS Unscopable handled correctly for setIdentityProvider(DOMString, DOMString, DOMString) on RTCPeerConnection
FAIL RTCPeerConnection interface: operation getIdentityAssertion() assert_own_property: interface prototype object missing non-static operation expected property "getIdentityAssertion" missing
+PASS Unscopable handled correctly for getIdentityAssertion() on RTCPeerConnection
FAIL RTCPeerConnection interface: attribute peerIdentity assert_true: The prototype object must have a property "peerIdentity" expected true got false
+PASS Unscopable handled correctly for peerIdentity property on RTCPeerConnection
FAIL RTCPeerConnection interface: attribute idpLoginUrl assert_true: The prototype object must have a property "idpLoginUrl" expected true got false
+PASS Unscopable handled correctly for idpLoginUrl property on RTCPeerConnection
PASS RTCPeerConnection must be primary interface of pc
PASS Stringification of pc
PASS RTCPeerConnection interface: pc must inherit property "createOffer(RTCOfferOptions)" with the proper type
Modified: trunk/Source/WebCore/ChangeLog (232942 => 232943)
--- trunk/Source/WebCore/ChangeLog 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/ChangeLog 2018-06-18 20:48:07 UTC (rev 232943)
@@ -1,3 +1,35 @@
+2018-06-18 Youenn Fablet <you...@apple.com>
+
+ Expose RTCPeerConnectionIceEventInit constructor
+ https://bugs.webkit.org/show_bug.cgi?id=186770
+
+ Reviewed by Alex Christensen.
+
+ Add event constructor as per specification.
+ Add support for the url attribute.
+ For that purpose, we need to pipe that information from LibWebRTCMediaEndpoint
+ up to RTCPeerConnectionIceEvent.
+
+ Covered by rebased test.
+
+ * Modules/mediastream/PeerConnectionBackend.cpp:
+ (WebCore::PeerConnectionBackend::fireICECandidateEvent):
+ (WebCore::PeerConnectionBackend::disableICECandidateFiltering):
+ (WebCore::PeerConnectionBackend::newICECandidate):
+ (WebCore::PeerConnectionBackend::doneGatheringCandidates):
+ (WebCore::PeerConnectionBackend::finishedRegisteringMDNSName):
+ * Modules/mediastream/PeerConnectionBackend.h:
+ * Modules/mediastream/RTCPeerConnectionIceEvent.cpp:
+ (WebCore::RTCPeerConnectionIceEvent::create):
+ (WebCore::RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent):
+ * Modules/mediastream/RTCPeerConnectionIceEvent.h:
+ (WebCore::RTCPeerConnectionIceEvent::url const):
+ * Modules/mediastream/RTCPeerConnectionIceEvent.idl:
+ * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+ (WebCore::LibWebRTCMediaEndpoint::OnIceCandidate):
+ * bindings/js/WebCoreBuiltinNames.h:
+ * dom/EventNames.in:
+
2018-06-18 Simon Fraser <simon.fra...@apple.com>
SVGTransformListValues wastes 127KB of Vector capacity on nytimes.com
Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (232942 => 232943)
--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp 2018-06-18 20:48:07 UTC (rev 232943)
@@ -352,11 +352,11 @@
endOfIceCandidates(WTFMove(*m_endOfIceCandidatePromise));
}
-void PeerConnectionBackend::fireICECandidateEvent(RefPtr<RTCIceCandidate>&& candidate)
+void PeerConnectionBackend::fireICECandidateEvent(RefPtr<RTCIceCandidate>&& candidate, String&& serverURL)
{
ASSERT(isMainThread());
- m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(false, false, WTFMove(candidate)));
+ m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(false, false, WTFMove(candidate), WTFMove(serverURL)));
}
void PeerConnectionBackend::enableICECandidateFiltering()
@@ -368,7 +368,7 @@
{
m_shouldFilterICECandidates = false;
for (auto& pendingICECandidate : m_pendingICECandidates)
- fireICECandidateEvent(RTCIceCandidate::create(WTFMove(pendingICECandidate.sdp), WTFMove(pendingICECandidate.mid), pendingICECandidate.sdpMLineIndex));
+ fireICECandidateEvent(RTCIceCandidate::create(WTFMove(pendingICECandidate.sdp), WTFMove(pendingICECandidate.mid), pendingICECandidate.sdpMLineIndex), WTFMove(pendingICECandidate.serverURL));
m_pendingICECandidates.clear();
}
@@ -424,18 +424,18 @@
return filteredSDP.toString();
}
-void PeerConnectionBackend::newICECandidate(String&& sdp, String&& mid, unsigned short sdpMLineIndex)
+void PeerConnectionBackend::newICECandidate(String&& sdp, String&& mid, unsigned short sdpMLineIndex, String&& serverURL)
{
ALWAYS_LOG(LOGIDENTIFIER, "Gathered ice candidate:", sdp);
m_finishedGatheringCandidates = false;
if (!m_shouldFilterICECandidates) {
- fireICECandidateEvent(RTCIceCandidate::create(WTFMove(sdp), WTFMove(mid), sdpMLineIndex));
+ fireICECandidateEvent(RTCIceCandidate::create(WTFMove(sdp), WTFMove(mid), sdpMLineIndex), WTFMove(serverURL));
return;
}
if (sdp.find(" host ", 0) != notFound) {
// FIXME: We might need to clear all pending candidates when setting again local description.
- m_pendingICECandidates.append(PendingICECandidate { String { sdp }, WTFMove(mid), sdpMLineIndex});
+ m_pendingICECandidates.append(PendingICECandidate { String { sdp }, WTFMove(mid), sdpMLineIndex, WTFMove(serverURL) });
if (RuntimeEnabledFeatures::sharedFeatures().mdnsICECandidatesEnabled()) {
auto ipAddress = extractIPAddres(sdp);
// We restrict to IPv4 candidates for now.
@@ -444,7 +444,7 @@
}
return;
}
- fireICECandidateEvent(RTCIceCandidate::create(filterICECandidate(WTFMove(sdp)), WTFMove(mid), sdpMLineIndex));
+ fireICECandidateEvent(RTCIceCandidate::create(filterICECandidate(WTFMove(sdp)), WTFMove(mid), sdpMLineIndex), WTFMove(serverURL));
}
void PeerConnectionBackend::doneGatheringCandidates()
@@ -456,7 +456,7 @@
if (m_waitingForMDNSRegistration)
return;
- m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(false, false, nullptr));
+ m_peerConnection.fireEvent(RTCPeerConnectionIceEvent::create(false, false, nullptr, { }));
m_peerConnection.updateIceGatheringState(RTCIceGatheringState::Complete);
m_pendingICECandidates.clear();
}
@@ -487,7 +487,7 @@
if (candidate.sdp.find(ipAddress) != notFound) {
auto sdp = candidate.sdp;
sdp.replace(ipAddress, name);
- fireICECandidateEvent(RTCIceCandidate::create(String(sdp), String(candidate.mid), candidate.sdpMLineIndex));
+ fireICECandidateEvent(RTCIceCandidate::create(WTFMove(sdp), WTFMove(candidate.mid), candidate.sdpMLineIndex), WTFMove(candidate.serverURL));
candidates.append(&candidate);
}
}
Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h (232942 => 232943)
--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2018-06-18 20:48:07 UTC (rev 232943)
@@ -113,7 +113,7 @@
virtual void emulatePlatformEvent(const String& action) = 0;
- void newICECandidate(String&& sdp, String&& mid, unsigned short sdpMLineIndex);
+ void newICECandidate(String&& sdp, String&& mid, unsigned short sdpMLineIndex, String&& serverURL);
void disableICECandidateFiltering();
void enableICECandidateFiltering();
@@ -131,7 +131,7 @@
void finishedRegisteringMDNSName(const String& ipAddress, const String& name);
protected:
- void fireICECandidateEvent(RefPtr<RTCIceCandidate>&&);
+ void fireICECandidateEvent(RefPtr<RTCIceCandidate>&&, String&& url);
void doneGatheringCandidates();
void updateSignalingState(RTCSignalingState);
@@ -179,6 +179,7 @@
String sdp;
String mid;
unsigned short sdpMLineIndex;
+ String serverURL;
};
Vector<PendingICECandidate> m_pendingICECandidates;
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.cpp (232942 => 232943)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.cpp 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.cpp 2018-06-18 20:48:07 UTC (rev 232943)
@@ -32,14 +32,20 @@
namespace WebCore {
-Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate)
+Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL)
{
- return adoptRef(*new RTCPeerConnectionIceEvent(canBubble, cancelable, WTFMove(candidate)));
+ return adoptRef(*new RTCPeerConnectionIceEvent(eventNames().icecandidateEvent, canBubble, cancelable, WTFMove(candidate), WTFMove(serverURL)));
}
-RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate)
- : Event(eventNames().icecandidateEvent, canBubble, cancelable)
+Ref<RTCPeerConnectionIceEvent> RTCPeerConnectionIceEvent::create(const AtomicString& type, Init&& init)
+{
+ return adoptRef(*new RTCPeerConnectionIceEvent(type, init.bubbles, init.cancelable, WTFMove(init.candidate), WTFMove(init.url)));
+}
+
+RTCPeerConnectionIceEvent::RTCPeerConnectionIceEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&& candidate, String&& serverURL)
+ : Event(type, canBubble, cancelable)
, m_candidate(WTFMove(candidate))
+ , m_url(WTFMove(serverURL))
{
}
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.h (232942 => 232943)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.h 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.h 2018-06-18 20:48:07 UTC (rev 232943)
@@ -36,16 +36,24 @@
public:
virtual ~RTCPeerConnectionIceEvent();
- static Ref<RTCPeerConnectionIceEvent> create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&);
+ struct Init : EventInit {
+ RefPtr<RTCIceCandidate> candidate;
+ String url;
+ };
+ static Ref<RTCPeerConnectionIceEvent> create(const AtomicString& type, Init&&);
+ static Ref<RTCPeerConnectionIceEvent> create(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&, String&& serverURL);
+
RTCIceCandidate* candidate() const;
+ const String& url() const { return m_url; }
virtual EventInterface eventInterface() const;
private:
- RTCPeerConnectionIceEvent(bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&);
+ RTCPeerConnectionIceEvent(const AtomicString& type, bool canBubble, bool cancelable, RefPtr<RTCIceCandidate>&&, String&& serverURL);
RefPtr<RTCIceCandidate> m_candidate;
+ String m_url;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.idl (232942 => 232943)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.idl 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceEvent.idl 2018-06-18 20:48:07 UTC (rev 232943)
@@ -23,12 +23,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// FIXME 169662: missing Constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict)
+dictionary RTCPeerConnectionIceEventInit : EventInit {
+ RTCIceCandidate? candidate;
+ DOMString? url;
+};
+
[
- NoInterfaceObject,
Conditional=WEB_RTC,
+ Constructor(DOMString type, optional RTCPeerConnectionIceEventInit eventInitDict),
EnabledAtRuntime=PeerConnection
] interface RTCPeerConnectionIceEvent : Event {
readonly attribute RTCIceCandidate? candidate;
- // FIXME 169662: missing url
+ readonly attribute DOMString? url;
};
Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp (232942 => 232943)
--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp 2018-06-18 20:48:07 UTC (rev 232943)
@@ -867,10 +867,10 @@
auto sdpMLineIndex = safeCast<unsigned short>(rtcCandidate->sdp_mline_index());
- callOnMainThread([protectedThis = makeRef(*this), mid = fromStdString(rtcCandidate->sdp_mid()), sdp = fromStdString(sdp), sdpMLineIndex]() mutable {
+ callOnMainThread([protectedThis = makeRef(*this), mid = fromStdString(rtcCandidate->sdp_mid()), sdp = fromStdString(sdp), sdpMLineIndex, url = "" mutable {
if (protectedThis->isStopped())
return;
- protectedThis->m_peerConnectionBackend.newICECandidate(WTFMove(sdp), WTFMove(mid), sdpMLineIndex);
+ protectedThis->m_peerConnectionBackend.newICECandidate(WTFMove(sdp), WTFMove(mid), sdpMLineIndex, WTFMove(url));
});
}
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (232942 => 232943)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-06-18 20:48:07 UTC (rev 232943)
@@ -127,6 +127,7 @@
macro(RTCIceCandidate) \
macro(RTCIceTransport) \
macro(RTCPeerConnection) \
+ macro(RTCPeerConnectionIceEvent) \
macro(RTCRtpReceiver) \
macro(RTCRtpSender) \
macro(RTCRtpTransceiver) \
Modified: trunk/Source/WebCore/dom/EventNames.in (232942 => 232943)
--- trunk/Source/WebCore/dom/EventNames.in 2018-06-18 20:11:01 UTC (rev 232942)
+++ trunk/Source/WebCore/dom/EventNames.in 2018-06-18 20:48:07 UTC (rev 232943)
@@ -53,6 +53,7 @@
RTCPeerConnectionIceEvent conditional=WEB_RTC
RTCDataChannelEvent conditional=WEB_RTC
RTCDTMFToneChangeEvent conditional=WEB_RTC_DTMF
+RTCPeerConnectionIceEvent conditional=WEB_RTC
RTCTrackEvent conditional=WEB_RTC
SpeechSynthesisEvent conditional=SPEECH_SYNTHESIS
WebGLContextEvent conditional=WEBGL