<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[281225] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/281225">281225</a></dd>
<dt>Author</dt> <dd>youenn@apple.com</dd>
<dt>Date</dt> <dd>2021-08-19 00:36:49 -0700 (Thu, 19 Aug 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for RTCDtlsTransport
https://bugs.webkit.org/show_bug.cgi?id=229133

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt:
* web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt:
* web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt:
* web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt:
* web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt:
* web-platform-tests/webrtc/protocol/bundle.https-expected.txt:
* web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt:

Source/ThirdParty/libwebrtc:

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:

Source/WebCore:

RTCDtlsTransport is an object representing the transport used by RTCRtp senders and receivers.
Add WebIDL and backend implementation.
In particular, we set sender/receiver transports as per spec when setting the descriptions.
Add support for state and certificates access. Add support for statechange event.

Covered by rebased tests.

* CMakeLists.txt:
* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCDtlsTransport.cpp: Added.
(WebCore::RTCDtlsTransport::RTCDtlsTransport):
(WebCore::RTCDtlsTransport::~RTCDtlsTransport):
(WebCore::RTCDtlsTransport::getRemoteCertificates):
(WebCore::RTCDtlsTransport::stop):
(WebCore::RTCDtlsTransport::virtualHasPendingActivity const):
(WebCore::RTCDtlsTransport::onStateChanged):
(WebCore::RTCDtlsTransport::onError):
* Modules/mediastream/RTCDtlsTransport.h: Added.
* Modules/mediastream/RTCDtlsTransport.idl: Added.
* Modules/mediastream/RTCDtlsTransportBackend.h: Added.
(WebCore::operator==):
* Modules/mediastream/RTCDtlsTransportState.h: Added.
* Modules/mediastream/RTCDtlsTransportState.idl: Added.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::getOrCreateDtlsTransport):
(WebCore::RTCPeerConnection::updateTransceiverTransports):
(WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription):
(WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription):
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCRtpReceiver.cpp:
* Modules/mediastream/RTCRtpReceiver.h:
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpReceiverBackend.h:
* Modules/mediastream/RTCRtpSender.cpp:
* Modules/mediastream/RTCRtpSender.h:
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/RTCRtpSenderBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp: Added.
(WebCore::toRTCDtlsTransportState):
(WebCore::LibWebRTCDtlsTransportBackendObserver::LibWebRTCDtlsTransportBackendObserver):
(WebCore::LibWebRTCDtlsTransportBackendObserver::updateState):
(WebCore::LibWebRTCDtlsTransportBackendObserver::start):
(WebCore::LibWebRTCDtlsTransportBackendObserver::stop):
(WebCore::LibWebRTCDtlsTransportBackendObserver::OnStateChange):
(WebCore::LibWebRTCDtlsTransportBackendObserver::OnError):
(WebCore::LibWebRTCDtlsTransportBackend::LibWebRTCDtlsTransportBackend):
(WebCore::LibWebRTCDtlsTransportBackend::~LibWebRTCDtlsTransportBackend):
(WebCore::LibWebRTCDtlsTransportBackend::registerClient):
(WebCore::LibWebRTCDtlsTransportBackend::unregisterClient):
* Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h: Added.
* Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
(WebCore::LibWebRTCRtpReceiverBackend::rtpDtlsTransportBackend):
* Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
(WebCore::LibWebRTCRtpSenderBackend::rtpDtlsTransportBackend):
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
* Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/WebCoreBuiltinNames.h:
* dom/EventTargetFactory.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCDtlsTransportgetRemoteCertificatesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCDtlsTransportstateexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionaddIceCandidateconnectionSetupexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionhelpertestexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectioniceConnectionStatehttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectioniceGatheringStateexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectiononnegotiationneededexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionsetLocalDescriptionanswerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionsetLocalDescriptionofferexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCRtpSendertransporthttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCRtpTransceiverhttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcidlharnesshttpswindowexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcprotocolbundlehttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/bundle.https-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebrtcprotocolcryptosuitehttpsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt</a></li>
<li><a href="#trunkSourceThirdPartylibwebrtcChangeLog">trunk/Source/ThirdParty/libwebrtc/ChangeLog</a></li>
<li><a href="#trunkSourceThirdPartylibwebrtcConfigurationslibwebrtciOSexp">trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp</a></li>
<li><a href="#trunkSourceThirdPartylibwebrtcConfigurationslibwebrtciOSsimexp">trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp</a></li>
<li><a href="#trunkSourceThirdPartylibwebrtcConfigurationslibwebrtcmacexp">trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesinputxcfilelist">trunk/Source/WebCore/DerivedSources-input.xcfilelist</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesoutputxcfilelist">trunk/Source/WebCore/DerivedSources-output.xcfilelist</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamPeerConnectionBackendcpp">trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamPeerConnectionBackendh">trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionh">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpReceiverh">trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpReceiveridl">trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpReceiverBackendh">trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSenderh">trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSenderidl">trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSenderBackendh">trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpReceiverBackendcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpReceiverBackendh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCUtilscpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCUtilsh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetFactoryin">trunk/Source/WebCore/dom/EventTargetFactory.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransportcpp">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransporth">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransportidl">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransportBackendh">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportBackend.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransportStateh">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransportStateidl">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCDtlsTransportBackendcpp">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCDtlsTransportBackendh">trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2021-08-19  Youenn Fablet  <youenn@apple.com>
+
+        Add support for RTCDtlsTransport
+        https://bugs.webkit.org/show_bug.cgi?id=229133
+
+        Reviewed by Eric Carlson.
+
+        * web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt:
+        * web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt:
+        * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt:
+        * web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt:
+        * web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt:
+        * web-platform-tests/webrtc/protocol/bundle.https-expected.txt:
+        * web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt:
+
</ins><span class="cx"> 2021-08-18  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, reverting r281206.
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCDtlsTransportgetRemoteCertificatesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt     2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt        2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL RTCDtlsTransport.prototype.getRemoteCertificates undefined is not an object (evaluating 'dtlsTransport.state')
</del><ins>+PASS RTCDtlsTransport.prototype.getRemoteCertificates
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCDtlsTransportstateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt     2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt        2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL DTLS transport goes to connected state promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: RTCDtlsTransport"
-FAIL close() causes the local transport to close immediately promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'dtlstransport.state')"
-FAIL close() causes the other end's DTLS transport to close promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'dtlstransport.state')"
</del><ins>+PASS DTLS transport goes to connected state
+FAIL close() causes the local transport to close immediately assert_equals: expected "closed" but got "connected"
+PASS close() causes the other end's DTLS transport to close
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionaddIceCandidateconnectionSetupexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt  2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt     2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-FAIL Candidates are added dynamically; connection should work promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
-FAIL Candidates are added at PC1; connection should work promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
-FAIL Candidates are added at PC2; connection should work promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</del><ins>+PASS Candidates are added dynamically; connection should work
+PASS Candidates are added at PC1; connection should work
+PASS Candidates are added at PC2; connection should work
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionhelpertestexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><span class="cx"> 
</span><del>-FAIL Setting up a connection using helpers and defaults should work promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</del><ins>+PASS Setting up a connection using helpers and defaults should work
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectioniceConnectionStatehttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -6,9 +6,9 @@
</span><span class="cx"> PASS connection with audio track should eventually have connected connection state
</span><span class="cx"> PASS connection with audio and video tracks should eventually have connected connection state
</span><span class="cx"> PASS ICE can connect in a recvonly usecase
</span><del>-FAIL iceConnectionState changes at the right time, with bundle policy balanced promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'caller_transceiver1.receiver.transport.iceTransport')"
-FAIL iceConnectionState changes at the right time, with bundle policy max-bundle promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'caller_transceiver1.receiver.transport.iceTransport')"
-FAIL iceConnectionState changes at the right time, with bundle policy max-compat promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'caller_transceiver1.receiver.transport.iceTransport')"
</del><ins>+FAIL iceConnectionState changes at the right time, with bundle policy balanced promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
+FAIL iceConnectionState changes at the right time, with bundle policy max-bundle promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
+FAIL iceConnectionState changes at the right time, with bundle policy max-compat promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</ins><span class="cx"> PASS Responder ICE connection state behaves as expected
</span><span class="cx"> PASS Closing a PeerConnection should not fire iceconnectionstatechange event
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectioniceGatheringStateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt        2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt   2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -4,11 +4,9 @@
</span><span class="cx"> PASS Initial iceGatheringState should be new
</span><span class="cx"> PASS iceGatheringState should eventually become complete after setLocalDescription
</span><span class="cx"> TIMEOUT setLocalDescription(reoffer) with no new transports should not cause iceGatheringState to change Test timed out
</span><del>-NOTRUN rolling back an ICE restart when gathering is complete should not result in iceGatheringState changes
</del><ins>+NOTRUN setLocalDescription() with no transports should not cause iceGatheringState to change
</ins><span class="cx"> NOTRUN setLocalDescription(reoffer) with a new transport should cause iceGatheringState to go to "checking" and then "complete"
</span><span class="cx"> NOTRUN sRD does not cause ICE gathering state changes
</span><del>-NOTRUN setLocalDescription(rollback) of original offer should cause iceGatheringState to reach "new" when starting in "complete"
-NOTRUN setLocalDescription(rollback) of original offer should cause iceGatheringState to reach "new" when starting in "gathering"
</del><span class="cx"> NOTRUN renegotiation that closes all transports should result in ICE gathering state "new"
</span><span class="cx"> FAIL connection with one data channel should eventually have connected connection state undefined is not an object (evaluating 'pc2.sctp.transport')
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectiononnegotiationneededexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -13,6 +13,6 @@
</span><span class="cx"> PASS removeTrack should cause negotiationneeded to fire on the caller
</span><span class="cx"> PASS removeTrack should cause negotiationneeded to fire on the callee
</span><span class="cx"> PASS Updating the direction of the transceiver should cause negotiationneeded to fire
</span><del>-FAIL Calling setStreams should cause negotiationneeded to fire promise_test: Unhandled rejection with value: object "TypeError: transceiver.sender.setStreams is not a function. (In 'transceiver.sender.setStreams(stream)', 'transceiver.sender.setStreams' is undefined)"
</del><ins>+PASS Calling setStreams should cause negotiationneeded to fire
</ins><span class="cx"> PASS Adding two transceivers, one at a time, results in the expected number of negotiationneeded events
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionsetLocalDescriptionanswerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt       2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><span class="cx"> 
</span><span class="cx"> PASS setLocalDescription() with valid answer should succeed
</span><span class="cx"> FAIL setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v="
</span><del>-FAIL setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to apply the description for 0: Local fingerprint does not match identity. Expected: sha-256 94:08:AE:B7:34:87:16:81:D4:31:42:BE:25:5D:E7:FA:1A:71:B4:51:9A:BF:D5:83:BE:FA:66:2D:51:49:7A:25 Got: sha-256 77:1A:44:22:03:5C:81:A3:27:FA:09:EB:C9:AD:DD:19:A6:AE:4A:AF:A0:1C:69:E7:9D:11:12:E5:96:4F:C4:F7" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
-FAIL Calling setLocalDescription(answer) from stable state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Description type incompatible with current signaling state" that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13
-FAIL Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Description type incompatible with current signaling state" that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13
-FAIL Setting previously generated answer after a call to createOffer should work promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
</del><ins>+FAIL setLocalDescription() with answer not created by own createAnswer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local answer sdp: Failed to apply the description for m= section with mid='0': Local fingerprint does not match identity. Expected: sha-256 0D:E2:FA:94:4D:00:FD:19:00:18:DC:96:C0:5D:20:81:53:91:E1:DE:73:E9:B6:99:A3:64:B9:F1:58:69:81:18 Got: sha-256 94:25:42:B4:B7:8C:8C:F5:DF:C5:ED:6A:82:03:44:0D:4E:1B:0A:B7:76:D6:BE:DA:72:80:7D:3D:6C:78:2B:F3" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
+FAIL Calling setLocalDescription(answer) from stable state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Local description type 2 is incompatible with current signaling state 0" that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13
+FAIL Calling setLocalDescription(answer) from have-local-offer state should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "InvalidStateError: Local description type 2 is incompatible with current signaling state 1" that is not a DOMException InvalidModificationError: property "code" is equal to 11, expected 13
+FAIL Setting previously generated answer after a call to createOffer should work promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"
</ins><span class="cx"> FAIL setLocalDescription(answer) should update internal state with a queued task, in the right order assert_not_equals: pendingRemoteDescription should not be set synchronously after a call to sLD got disallowed value null
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCPeerConnectionsetLocalDescriptionofferexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt        2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt   2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> 
</span><span class="cx"> PASS setLocalDescription with valid offer should succeed
</span><span class="cx"> FAIL setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v="
</span><del>-FAIL setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to apply the description for 0: Local fingerprint does not match identity. Expected: sha-256 5D:F6:6D:28:A7:DC:C3:E4:F3:81:FD:B0:DD:0F:03:45:D7:C8:E5:70:18:11:02:4B:91:49:45:52:1F:8E:BD:FA Got: sha-256 B1:90:88:57:15:70:3A:0F:B6:FC:B9:1B:02:8A:66:84:00:0C:2E:ED:2C:54:51:29:7F:98:48:DC:1C:59:7F:87" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
</del><ins>+FAIL setLocalDescription() with offer not created by own createOffer() should reject with InvalidModificationError promise_rejects_dom: function "function () { throw e }" threw object "OperationError: Failed to set local offer sdp: Failed to apply the description for m= section with mid='0': Local fingerprint does not match identity. Expected: sha-256 AC:89:BE:E6:A4:DB:0A:BB:A7:A5:85:7E:53:F6:60:11:D8:97:44:6D:D0:A1:4C:32:80:B3:03:94:C8:83:AD:A8 Got: sha-256 34:AF:27:F0:FE:EF:83:BC:1D:76:C6:89:C7:D9:81:7C:C3:FB:DA:F0:04:CF:D3:81:FC:62:FA:9A:84:B5:3B:E8" that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
</ins><span class="cx"> FAIL Set created offer other than last offer should reject with InvalidModificationError assert_unreached: Should have rejected: undefined Reached unreachable code
</span><span class="cx"> PASS Creating and setting offer multiple times should succeed
</span><del>-FAIL Setting previously generated offer after a call to createAnswer should work promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
</del><ins>+FAIL Setting previously generated offer after a call to createAnswer should work promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"
</ins><span class="cx"> FAIL Negotiation works when there has been a repeated setLocalDescription(offer) assert_equals: expected 1 but got 0
</span><span class="cx"> FAIL setLocalDescription(offer) should update internal state with a queued task, in the right order assert_equals: pendingRemoteDescription should never be set due to sLD expected null but got object "[object RTCSessionDescription]"
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCRtpSendertransporthttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt       2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> 
</span><del>-FAIL RTCRtpSender.transport is null when unconnected assert_equals: expected (object) null but got (undefined) undefined
-FAIL RTCRtpSender/receiver.transport has a value when connected promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'sender.transport.iceTransport')"
-FAIL RTCRtpSender/receiver.transport at the right time, with bundle policy balanced assert_equals: expected (object) null but got (undefined) undefined
-FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy balanced assert_equals: expected (object) null but got (undefined) undefined
-FAIL RTCRtpSender/receiver.transport at the right time, with bundle policy max-bundle assert_equals: expected (object) null but got (undefined) undefined
-FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy max-bundle assert_equals: expected (object) null but got (undefined) undefined
-FAIL RTCRtpSender/receiver.transport at the right time, with bundle policy max-compat assert_equals: expected (object) null but got (undefined) undefined
-FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy max-compat assert_equals: expected (object) null but got (undefined) undefined
</del><ins>+PASS RTCRtpSender.transport is null when unconnected
+PASS RTCRtpSender/receiver.transport has a value when connected
+PASS RTCRtpSender/receiver.transport at the right time, with bundle policy balanced
+FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy balanced promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'caller.sctp.transport')"
+PASS RTCRtpSender/receiver.transport at the right time, with bundle policy max-bundle
+FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy max-bundle promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'caller.sctp.transport')"
+PASS RTCRtpSender/receiver.transport at the right time, with bundle policy max-compat
+FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy max-compat promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'caller.sctp.transport')"
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcRTCRtpTransceiverhttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt    2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,6 +1,4 @@
</span><span class="cx"> 
</span><del>-Harness Error (TIMEOUT), message = null
-
</del><span class="cx"> PASS checkAddTransceiverNoTrack
</span><span class="cx"> PASS checkAddTransceiverWithTrack
</span><span class="cx"> PASS checkAddTransceiverWithAddTrack
</span><span class="lines">@@ -12,7 +10,7 @@
</span><span class="cx"> PASS checkNoMidOffer
</span><span class="cx"> PASS checkNoMidAnswer
</span><span class="cx"> PASS checkSetDirection
</span><del>-PASS checkCurrentDirection
</del><ins>+FAIL checkCurrentDirection assert_equals: expected "[{currentDirection:null}]" but got "[{currentDirection:\"inactive\"}]"
</ins><span class="cx"> PASS checkSendrecvWithNoSendTrack
</span><span class="cx"> PASS checkSendrecvWithTracklessStream
</span><span class="cx"> PASS checkAddTransceiverNoTrackDoesntPair
</span><span class="lines">@@ -23,20 +21,20 @@
</span><span class="cx"> PASS checkReplaceTrackNullDoesntPreventPairing
</span><span class="cx"> PASS checkRemoveAndReadd
</span><span class="cx"> PASS checkAddTrackExistingTransceiverThenRemove
</span><del>-FAIL checkRemoveTrackNegotiation promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
</del><ins>+FAIL checkRemoveTrackNegotiation promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"
</ins><span class="cx"> FAIL checkMute assert_true: expected true got false
</span><del>-FAIL checkStop assert_equals: expected "[{currentDirection:null,direction:\"sendrecv\",receiver:{track:{kind:\"audio\",readyState:\"ended\"}},sender:{track:{kind:\"audio\"}},stopped:true}]" but got "[{currentDirection:null,direction:\"sendrecv\",receiver:{track:{kind:\"audio\",readyState:\"ended\"}},sender:{track:null},stopped:true}]"
-FAIL checkStopAfterCreateOffer assert_equals: expected "[{mid:null,stopped:true}]" but got "[{mid:\"0\",stopped:true}]"
-FAIL checkStopAfterSetLocalOffer assert_equals: expected "[{mid:null,stopped:true}]" but got "[{mid:\"0\",stopped:true}]"
-FAIL checkStopAfterSetRemoteOffer assert_equals: expected "[]" but got "[{isTrusted:true}]"
-FAIL checkStopAfterCreateAnswer assert_equals: expected "[{mid:null,stopped:true}]" but got "[{mid:\"0\",stopped:true}]"
-TIMEOUT checkStopAfterSetLocalAnswer Test timed out
-NOTRUN checkStopAfterClose
-NOTRUN checkLocalRollback
-NOTRUN checkRollbackAndSetRemoteOfferWithDifferentType
-NOTRUN checkRemoteRollback
-NOTRUN checkMsectionReuse
-NOTRUN checkStopAfterCreateOfferWithReusedMsection
-NOTRUN checkAddIceCandidateToStoppedTransceiver
-NOTRUN checkBundleTagRejected
</del><ins>+FAIL checkStop assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\",receiver:{track:{kind:\"audio\",readyState:\"ended\"}},sender:{track:{kind:\"audio\"}}}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\",receiver:{track:{kind:\"audio\",readyState:\"ended\"}},sender:{track:null}}]"
+FAIL checkStopAfterCreateOffer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]"
+FAIL checkStopAfterSetLocalOffer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]"
+FAIL checkStopAfterSetRemoteOffer assert_equals: expected "stopped" but got "inactive"
+FAIL checkStopAfterCreateAnswer assert_equals: expected "[{currentDirection:null,direction:\"stopped\"}]" but got "[{currentDirection:null,direction:\"inactive\"}]"
+FAIL checkStopAfterSetLocalAnswer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]"
+PASS checkStopAfterClose
+FAIL checkLocalRollback promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1"
+FAIL checkRollbackAndSetRemoteOfferWithDifferentType promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1"
+FAIL checkRemoteRollback promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"
+FAIL checkMsectionReuse assert_equals: expected "[{currentDirection:null,mid:null}]" but got "[{currentDirection:\"inactive\",mid:\"0\"}]"
+PASS checkStopAfterCreateOfferWithReusedMsection
+FAIL checkAddIceCandidateToStoppedTransceiver promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"
+FAIL checkBundleTagRejected promise_test: Unhandled rejection with value: object "InvalidAccessError: Failed to set remote offer sdp: The m= section with mid='1' should be rejected."
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcidlharnesshttpswindowexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt    2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -232,7 +232,7 @@
</span><span class="cx"> PASS RTCRtpSender interface: existence and properties of interface prototype object's "constructor" property
</span><span class="cx"> PASS RTCRtpSender interface: existence and properties of interface prototype object's @@unscopables property
</span><span class="cx"> PASS RTCRtpSender interface: attribute track
</span><del>-FAIL RTCRtpSender interface: attribute transport assert_true: The prototype object must have a property "transport" expected true got false
</del><ins>+PASS RTCRtpSender interface: attribute transport
</ins><span class="cx"> PASS RTCRtpSender interface: operation getCapabilities(DOMString)
</span><span class="cx"> PASS RTCRtpSender interface: operation setParameters(RTCRtpSendParameters)
</span><span class="cx"> PASS RTCRtpSender interface: operation getParameters()
</span><span class="lines">@@ -243,7 +243,7 @@
</span><span class="cx"> PASS RTCRtpSender must be primary interface of new RTCPeerConnection().addTransceiver('audio').sender
</span><span class="cx"> PASS Stringification of new RTCPeerConnection().addTransceiver('audio').sender
</span><span class="cx"> PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "track" with the proper type
</span><del>-FAIL RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "transport" with the proper type assert_inherits: property "transport" not found in prototype chain
</del><ins>+PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "transport" with the proper type
</ins><span class="cx"> PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "getCapabilities(DOMString)" with the proper type
</span><span class="cx"> PASS RTCRtpSender interface: calling getCapabilities(DOMString) on new RTCPeerConnection().addTransceiver('audio').sender with too few arguments must throw TypeError
</span><span class="cx"> PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "setParameters(RTCRtpSendParameters)" with the proper type
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx"> PASS RTCRtpReceiver interface: existence and properties of interface prototype object's "constructor" property
</span><span class="cx"> PASS RTCRtpReceiver interface: existence and properties of interface prototype object's @@unscopables property
</span><span class="cx"> PASS RTCRtpReceiver interface: attribute track
</span><del>-FAIL RTCRtpReceiver interface: attribute transport assert_true: The prototype object must have a property "transport" expected true got false
</del><ins>+PASS RTCRtpReceiver interface: attribute transport
</ins><span class="cx"> PASS RTCRtpReceiver interface: operation getCapabilities(DOMString)
</span><span class="cx"> PASS RTCRtpReceiver interface: operation getParameters()
</span><span class="cx"> PASS RTCRtpReceiver interface: operation getContributingSources()
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx"> PASS RTCRtpReceiver must be primary interface of new RTCPeerConnection().addTransceiver('audio').receiver
</span><span class="cx"> PASS Stringification of new RTCPeerConnection().addTransceiver('audio').receiver
</span><span class="cx"> PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "track" with the proper type
</span><del>-FAIL RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "transport" with the proper type assert_inherits: property "transport" not found in prototype chain
</del><ins>+PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "transport" with the proper type
</ins><span class="cx"> PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "getCapabilities(DOMString)" with the proper type
</span><span class="cx"> PASS RTCRtpReceiver interface: calling getCapabilities(DOMString) on new RTCPeerConnection().addTransceiver('audio').receiver with too few arguments must throw TypeError
</span><span class="cx"> PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "getParameters()" with the proper type
</span><span class="lines">@@ -301,17 +301,17 @@
</span><span class="cx"> PASS RTCRtpTransceiver interface: new RTCPeerConnection().addTransceiver('audio') must inherit property "stop()" with the proper type
</span><span class="cx"> PASS RTCRtpTransceiver interface: new RTCPeerConnection().addTransceiver('audio') must inherit property "setCodecPreferences(sequence<RTCRtpCodecCapability>)" with the proper type
</span><span class="cx"> PASS RTCRtpTransceiver interface: calling setCodecPreferences(sequence<RTCRtpCodecCapability>) on new RTCPeerConnection().addTransceiver('audio') with too few arguments must throw TypeError
</span><del>-FAIL RTCDtlsTransport interface: existence and properties of interface object assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface object length assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface object name assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: existence and properties of interface prototype object assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: attribute iceTransport assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: attribute state assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: operation getRemoteCertificates() assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: attribute onstatechange assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
-FAIL RTCDtlsTransport interface: attribute onerror assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
</del><ins>+PASS RTCDtlsTransport interface: existence and properties of interface object
+PASS RTCDtlsTransport interface object length
+PASS RTCDtlsTransport interface object name
+PASS RTCDtlsTransport interface: existence and properties of interface prototype object
+PASS RTCDtlsTransport interface: existence and properties of interface prototype object's "constructor" property
+PASS RTCDtlsTransport interface: existence and properties of interface prototype object's @@unscopables property
+FAIL RTCDtlsTransport interface: attribute iceTransport assert_true: The prototype object must have a property "iceTransport" expected true got false
+PASS RTCDtlsTransport interface: attribute state
+PASS RTCDtlsTransport interface: operation getRemoteCertificates()
+PASS RTCDtlsTransport interface: attribute onstatechange
+PASS RTCDtlsTransport interface: attribute onerror
</ins><span class="cx"> FAIL RTCDtlsTransport must be primary interface of idlTestObjects.dtlsTransport assert_equals: wrong typeof object expected "object" but got "undefined"
</span><span class="cx"> FAIL Stringification of idlTestObjects.dtlsTransport assert_equals: wrong typeof object expected "object" but got "undefined"
</span><span class="cx"> FAIL RTCDtlsTransport interface: idlTestObjects.dtlsTransport must inherit property "iceTransport" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcprotocolbundlehttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/bundle.https-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/bundle.https-expected.txt      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/bundle.https-expected.txt 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> FAIL not negotiating BUNDLE creates two separate ice and dtls transports assert_not_equals: got disallowed value undefined
</span><del>-FAIL bundles on the first transport and closes the second assert_not_equals: got disallowed value undefined
</del><ins>+PASS bundles on the first transport and closes the second
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebrtcprotocolcryptosuitehttpsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt        2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt   2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,10 +1,10 @@
</span><span class="cx"> 
</span><span class="cx"> FAIL tlsVersion is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
</span><del>-FAIL tlsVersion is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</del><ins>+PASS tlsVersion is acceptable on video-only
</ins><span class="cx"> FAIL dtlsCipher is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
</span><del>-FAIL dtlsCipher is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</del><ins>+FAIL dtlsCipher is acceptable on video-only assert_true: expected true got false
</ins><span class="cx"> FAIL srtpCipher is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
</span><del>-FAIL srtpCipher is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</del><ins>+PASS srtpCipher is acceptable on video-only
</ins><span class="cx"> FAIL tlsGroup is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
</span><del>-FAIL tlsGroup is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
</del><ins>+FAIL tlsGroup is acceptable on video-only assert_true: Value present: expected true got false
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceThirdPartylibwebrtcChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/libwebrtc/ChangeLog      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2021-08-19  Youenn Fablet  <youenn@apple.com>
+
+        Add support for RTCDtlsTransport
+        https://bugs.webkit.org/show_bug.cgi?id=229133
+
+        Reviewed by Eric Carlson.
+
+        * Configurations/libwebrtc.iOS.exp:
+        * Configurations/libwebrtc.iOSsim.exp:
+        * Configurations/libwebrtc.mac.exp:
+
</ins><span class="cx"> 2021-08-13  Youenn Fablet  <youenn@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Use profile auto level for WebRTC H264 encoder on Apple Silicon
</span></span></pre></div>
<a id="trunkSourceThirdPartylibwebrtcConfigurationslibwebrtciOSexp"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp       2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -324,3 +324,4 @@
</span><span class="cx"> __ZNK3rtc13SocketAddress4HashEv
</span><span class="cx"> __ZNK3rtc13SocketAddresseqERKS0_
</span><span class="cx"> __ZNK3rtc9IPAddress5IsNilEv
</span><ins>+__ZN3rtc12SSLCertChainD1Ev
</ins></span></pre></div>
<a id="trunkSourceThirdPartylibwebrtcConfigurationslibwebrtciOSsimexp"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp    2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -324,3 +324,4 @@
</span><span class="cx"> __ZNK3rtc13SocketAddress4HashEv
</span><span class="cx"> __ZNK3rtc13SocketAddresseqERKS0_
</span><span class="cx"> __ZNK3rtc9IPAddress5IsNilEv
</span><ins>+__ZN3rtc12SSLCertChainD1Ev
</ins></span></pre></div>
<a id="trunkSourceThirdPartylibwebrtcConfigurationslibwebrtcmacexp"></a>
<div class="modfile"><h4>Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp       2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -324,3 +324,4 @@
</span><span class="cx"> __ZNK3rtc13SocketAddress4HashEv
</span><span class="cx"> __ZNK3rtc13SocketAddresseqERKS0_
</span><span class="cx"> __ZNK3rtc9IPAddress5IsNilEv
</span><ins>+__ZN3rtc12SSLCertChainD1Ev
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/CMakeLists.txt 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -377,6 +377,8 @@
</span><span class="cx">     Modules/mediastream/RTCDataChannel.idl
</span><span class="cx">     Modules/mediastream/RTCDataChannelEvent.idl
</span><span class="cx">     Modules/mediastream/RTCDegradationPreference.idl
</span><ins>+    Modules/mediastream/RTCDtlsTransport.idl
+    Modules/mediastream/RTCDtlsTransportState.idl
</ins><span class="cx">     Modules/mediastream/RTCDtxStatus.idl
</span><span class="cx">     Modules/mediastream/RTCEncodedAudioFrame.idl
</span><span class="cx">     Modules/mediastream/RTCEncodedVideoFrame.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/ChangeLog      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2021-08-19  Youenn Fablet  <youenn@apple.com>
+
+        Add support for RTCDtlsTransport
+        https://bugs.webkit.org/show_bug.cgi?id=229133
+
+        Reviewed by Eric Carlson.
+
+        RTCDtlsTransport is an object representing the transport used by RTCRtp senders and receivers.
+        Add WebIDL and backend implementation.
+        In particular, we set sender/receiver transports as per spec when setting the descriptions.
+        Add support for state and certificates access. Add support for statechange event.
+
+        Covered by rebased tests.
+
+        * CMakeLists.txt:
+        * DerivedSources-input.xcfilelist:
+        * DerivedSources-output.xcfilelist:
+        * DerivedSources.make:
+        * Modules/mediastream/PeerConnectionBackend.cpp:
+        (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
+        (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
+        * Modules/mediastream/PeerConnectionBackend.h:
+        * Modules/mediastream/RTCDtlsTransport.cpp: Added.
+        (WebCore::RTCDtlsTransport::RTCDtlsTransport):
+        (WebCore::RTCDtlsTransport::~RTCDtlsTransport):
+        (WebCore::RTCDtlsTransport::getRemoteCertificates):
+        (WebCore::RTCDtlsTransport::stop):
+        (WebCore::RTCDtlsTransport::virtualHasPendingActivity const):
+        (WebCore::RTCDtlsTransport::onStateChanged):
+        (WebCore::RTCDtlsTransport::onError):
+        * Modules/mediastream/RTCDtlsTransport.h: Added.
+        * Modules/mediastream/RTCDtlsTransport.idl: Added.
+        * Modules/mediastream/RTCDtlsTransportBackend.h: Added.
+        (WebCore::operator==):
+        * Modules/mediastream/RTCDtlsTransportState.h: Added.
+        * Modules/mediastream/RTCDtlsTransportState.idl: Added.
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::getOrCreateDtlsTransport):
+        (WebCore::RTCPeerConnection::updateTransceiverTransports):
+        (WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription):
+        (WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription):
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCRtpReceiver.cpp:
+        * Modules/mediastream/RTCRtpReceiver.h:
+        * Modules/mediastream/RTCRtpReceiver.idl:
+        * Modules/mediastream/RTCRtpReceiverBackend.h:
+        * Modules/mediastream/RTCRtpSender.cpp:
+        * Modules/mediastream/RTCRtpSender.h:
+        * Modules/mediastream/RTCRtpSender.idl:
+        * Modules/mediastream/RTCRtpSenderBackend.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp: Added.
+        (WebCore::toRTCDtlsTransportState):
+        (WebCore::LibWebRTCDtlsTransportBackendObserver::LibWebRTCDtlsTransportBackendObserver):
+        (WebCore::LibWebRTCDtlsTransportBackendObserver::updateState):
+        (WebCore::LibWebRTCDtlsTransportBackendObserver::start):
+        (WebCore::LibWebRTCDtlsTransportBackendObserver::stop):
+        (WebCore::LibWebRTCDtlsTransportBackendObserver::OnStateChange):
+        (WebCore::LibWebRTCDtlsTransportBackendObserver::OnError):
+        (WebCore::LibWebRTCDtlsTransportBackend::LibWebRTCDtlsTransportBackend):
+        (WebCore::LibWebRTCDtlsTransportBackend::~LibWebRTCDtlsTransportBackend):
+        (WebCore::LibWebRTCDtlsTransportBackend::registerClient):
+        (WebCore::LibWebRTCDtlsTransportBackend::unregisterClient):
+        * Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h: Added.
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
+        (WebCore::LibWebRTCRtpReceiverBackend::rtpDtlsTransportBackend):
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
+        (WebCore::LibWebRTCRtpSenderBackend::rtpDtlsTransportBackend):
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
+        * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/WebCoreBuiltinNames.h:
+        * dom/EventTargetFactory.in:
+
</ins><span class="cx"> 2021-08-18  David Kilzer  <ddkilzer@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Bug 229264: Leak of CMBufferQueueRef (up to 752 bytes each) in com.apple.WebKit.GPU.Development process
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesinputxcfilelist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources-input.xcfilelist     2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist        2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -219,6 +219,8 @@
</span><span class="cx"> $(PROJECT_DIR)/Modules/mediastream/RTCDataChannel.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/mediastream/RTCDataChannelEvent.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/mediastream/RTCDegradationPreference.idl
</span><ins>+$(PROJECT_DIR)/Modules/mediastream/RTCDtlsTransport.idl
+$(PROJECT_DIR)/Modules/mediastream/RTCDtlsTransportState.idl
</ins><span class="cx"> $(PROJECT_DIR)/Modules/mediastream/RTCDtxStatus.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/mediastream/RTCEncodedAudioFrame.idl
</span><span class="cx"> $(PROJECT_DIR)/Modules/mediastream/RTCEncodedVideoFrame.idl
</span><span class="lines">@@ -726,13 +728,13 @@
</span><span class="cx"> $(PROJECT_DIR)/css/plugIns.css
</span><span class="cx"> $(PROJECT_DIR)/css/quirks.css
</span><span class="cx"> $(PROJECT_DIR)/css/svg.css
</span><del>-$(PROJECT_DIR)/css/typedom/StylePropertyMap.idl
-$(PROJECT_DIR)/css/typedom/StylePropertyMapReadOnly.idl
</del><ins>+$(PROJECT_DIR)/css/typedom/CSSNumericValue.idl
</ins><span class="cx"> $(PROJECT_DIR)/css/typedom/CSSStyleImageValue.idl
</span><del>-$(PROJECT_DIR)/css/typedom/CSSNumericValue.idl
</del><span class="cx"> $(PROJECT_DIR)/css/typedom/CSSStyleValue.idl
</span><span class="cx"> $(PROJECT_DIR)/css/typedom/CSSUnitValue.idl
</span><span class="cx"> $(PROJECT_DIR)/css/typedom/CSSUnparsedValue.idl
</span><ins>+$(PROJECT_DIR)/css/typedom/StylePropertyMap.idl
+$(PROJECT_DIR)/css/typedom/StylePropertyMapReadOnly.idl
</ins><span class="cx"> $(PROJECT_DIR)/dom/AbortAlgorithm.idl
</span><span class="cx"> $(PROJECT_DIR)/dom/AbortController.idl
</span><span class="cx"> $(PROJECT_DIR)/dom/AbortSignal.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesoutputxcfilelist"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources-output.xcfilelist    2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/DerivedSources-output.xcfilelist       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -312,6 +312,8 @@
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSMediaRule.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNamespaceRule.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNamespaceRule.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSPageRule.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSPageRule.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSPaintCallback.cpp
</span><span class="lines">@@ -326,16 +328,24 @@
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleDeclaration+PropertyNames.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleDeclaration.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleDeclaration.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleRule.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleRule.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleSheet.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleSheet.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSSupportsRule.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSSupportsRule.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSTransition.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSTransition.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnknownRule.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnknownRule.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCacheQueryOptions.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCacheQueryOptions.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCanvasCaptureMediaStreamTrack.cpp
</span><span class="lines">@@ -1627,6 +1637,10 @@
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDataChannelEvent.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDegradationPreference.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDegradationPreference.h
</span><ins>+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransport.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransport.h
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransportState.cpp
+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransportState.h
</ins><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtxStatus.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtxStatus.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCEncodedAudioFrame.cpp
</span><span class="lines">@@ -2241,16 +2255,6 @@
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTreeWalker.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTypeConversions.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTypeConversions.h
</span><del>-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.h
</del><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSUIEvent.cpp
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSUIEvent.h
</span><span class="cx"> $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSUIEventInit.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/DerivedSources.make    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -245,6 +245,8 @@
</span><span class="cx">     $(WebCore)/Modules/mediastream/RTCDataChannel.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/RTCDataChannelEvent.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/RTCDegradationPreference.idl \
</span><ins>+    $(WebCore)/Modules/mediastream/RTCDtlsTransport.idl \
+    $(WebCore)/Modules/mediastream/RTCDtlsTransportState.idl \
</ins><span class="cx">     $(WebCore)/Modules/mediastream/RTCDtxStatus.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/RTCEncodedAudioFrame.idl \
</span><span class="cx">     $(WebCore)/Modules/mediastream/RTCEncodedVideoFrame.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamPeerConnectionBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp       2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include "LibWebRTCCertificateGenerator.h"
</span><span class="cx"> #include "Logging.h"
</span><span class="cx"> #include "Page.h"
</span><ins>+#include "RTCDtlsTransport.h"
</ins><span class="cx"> #include "RTCIceCandidate.h"
</span><span class="cx"> #include "RTCPeerConnection.h"
</span><span class="cx"> #include "RTCPeerConnectionIceEvent.h"
</span><span class="lines">@@ -200,7 +201,7 @@
</span><span class="cx">     m_peerConnection.doTask([this, promise = WTFMove(m_setDescriptionPromise)]() mutable {
</span><span class="cx">         if (m_peerConnection.isClosed())
</span><span class="cx">             return;
</span><del>-
</del><ins>+        m_peerConnection.updateTransceiversAfterSuccessfulLocalDescription();
</ins><span class="cx">         promise->resolve();
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="lines">@@ -276,6 +277,7 @@
</span><span class="cx">         if (m_peerConnection.isClosed())
</span><span class="cx">             return;
</span><span class="cx"> 
</span><ins>+        m_peerConnection.updateTransceiversAfterSuccessfulRemoteDescription();
</ins><span class="cx">         promise->resolve();
</span><span class="cx">     });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamPeerConnectionBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx"> class PeerConnectionBackend;
</span><span class="cx"> class RTCCertificate;
</span><span class="cx"> class RTCDataChannelHandler;
</span><ins>+class RTCDtlsTransport;
+class RTCDtlsTransportBackend;
</ins><span class="cx"> class RTCIceCandidate;
</span><span class="cx"> class RTCPeerConnection;
</span><span class="cx"> class RTCRtpReceiver;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransportcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp                            (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,94 @@
</span><ins>+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "RTCDtlsTransport.h"
+
+#if ENABLE(WEB_RTC)
+
+#include "Blob.h"
+#include "EventNames.h"
+#include "Logging.h"
+#include "NotImplemented.h"
+#include "RTCDtlsTransportBackend.h"
+#include "ScriptExecutionContext.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+
+WTF_MAKE_ISO_ALLOCATED_IMPL(RTCDtlsTransport);
+
+RTCDtlsTransport::RTCDtlsTransport(ScriptExecutionContext& context, UniqueRef<RTCDtlsTransportBackend>&& backend)
+    : ActiveDOMObject(&context)
+    , m_backend(WTFMove(backend))
+{
+    suspendIfNeeded();
+    m_backend->registerClient(*this);
+}
+
+RTCDtlsTransport::~RTCDtlsTransport()
+{
+    m_backend->unregisterClient();
+}
+
+Vector<Ref<JSC::ArrayBuffer>> RTCDtlsTransport::getRemoteCertificates()
+{
+    return m_remoteCertificates;
+}
+
+void RTCDtlsTransport::stop()
+{
+    m_state = RTCDtlsTransportState::Closed;
+}
+
+bool RTCDtlsTransport::virtualHasPendingActivity() const
+{
+    return m_state != RTCDtlsTransportState::Closed && hasEventListeners();
+}
+
+void RTCDtlsTransport::onStateChanged(RTCDtlsTransportState state, Vector<Ref<JSC::ArrayBuffer>>&& certificates)
+{
+    queueTaskKeepingObjectAlive(*this, TaskSource::Networking, [this, state, certificates = WTFMove(certificates)]() mutable {
+        if (m_state == RTCDtlsTransportState::Closed)
+            return;
+
+        if (m_remoteCertificates != certificates)
+            m_remoteCertificates = WTFMove(certificates);
+
+        if (m_state != state) {
+            m_state = state;
+            dispatchEvent(Event::create(eventNames().statechangeEvent, Event::CanBubble::Yes, Event::IsCancelable::No));
+        }
+    });
+}
+
+void RTCDtlsTransport::onError()
+{
+    onStateChanged(RTCDtlsTransportState::Failed, { });
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransporth"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h                              (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_RTC)
+
+#include "ActiveDOMObject.h"
+#include "Event.h"
+#include "EventTarget.h"
+#include "RTCDtlsTransportBackend.h"
+#include <JavaScriptCore/ArrayBuffer.h>
+
+namespace WebCore {
+
+class PeerConnectionBackend;
+class RTCPeerConnection;
+class ScriptExecutionContext;
+
+class RTCDtlsTransport final : public RefCounted<RTCDtlsTransport>, public ActiveDOMObject, public EventTargetWithInlineData, public RTCDtlsTransportBackend::Client {
+    WTF_MAKE_ISO_ALLOCATED(RTCDtlsTransport);
+public:
+    static Ref<RTCDtlsTransport> create(ScriptExecutionContext& context, UniqueRef<RTCDtlsTransportBackend>&& backend) { return adoptRef(*new RTCDtlsTransport(context, WTFMove(backend))); }
+    ~RTCDtlsTransport();
+
+    using RefCounted<RTCDtlsTransport>::ref;
+    using RefCounted<RTCDtlsTransport>::deref;
+
+    RTCDtlsTransportState state() { return m_state; }
+    Vector<Ref<JSC::ArrayBuffer>> getRemoteCertificates();
+
+    const RTCDtlsTransportBackend& backend() const { return m_backend.get(); }
+
+private:
+    RTCDtlsTransport(ScriptExecutionContext&, UniqueRef<RTCDtlsTransportBackend>&&);
+
+    // EventTargetWithInlineData
+    EventTargetInterface eventTargetInterface() const final { return RTCDtlsTransportEventTargetInterfaceType; }
+    ScriptExecutionContext* scriptExecutionContext() const final { return m_scriptExecutionContext; }
+    void refEventTarget() final { ref(); }
+    void derefEventTarget() final { deref(); }
+
+    // ActiveDOMObject
+    void stop() final;
+    const char* activeDOMObjectName() const final { return "RTCDtlsTransport"; }
+    bool virtualHasPendingActivity() const final;
+
+    // RTCDtlsTransportBackend::Client
+    void onStateChanged(RTCDtlsTransportState, Vector<Ref<JSC::ArrayBuffer>>&&) final;
+    void onError() final;
+
+    UniqueRef<RTCDtlsTransportBackend> m_backend;
+    RTCDtlsTransportState m_state { RTCDtlsTransportState::New };
+    Vector<Ref<JSC::ArrayBuffer>> m_remoteCertificates;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransportidlfromrev281224trunkSourceWebCoreModulesmediastreamRTCRtpReceiverBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.idl (from rev 281224, trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h) (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.idl                            (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.idl       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    ActiveDOMObject,
+    Conditional=WEB_RTC,
+    EnabledBySetting=PeerConnection,
+    Exposed=(Window),
+] interface RTCDtlsTransport : EventTarget {
+  // [SameObject] readonly attribute RTCIceTransport iceTransport;
+  readonly attribute RTCDtlsTransportState state;
+  sequence<ArrayBuffer> getRemoteCertificates();
+  attribute EventHandler onstatechange;
+  attribute EventHandler onerror;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransportBackendhfromrev281224trunkSourceWebCoreModulesmediastreamRTCRtpReceiverBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportBackend.h (from rev 281224, trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h) (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportBackend.h                               (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportBackend.h  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,61 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_RTC)
+
+#include "RTCDtlsTransportState.h"
+#include <wtf/WeakPtr.h>
+
+namespace JSC {
+class ArrayBuffer;
+}
+
+namespace WebCore {
+
+class RTCDtlsTransportBackend {
+public:
+    virtual ~RTCDtlsTransportBackend() = default;
+
+    virtual const void* backend() const = 0;
+    
+    class Client : public CanMakeWeakPtr<Client> {
+    public:
+        virtual ~Client() = default;
+        virtual void onStateChanged(RTCDtlsTransportState, Vector<Ref<JSC::ArrayBuffer>>&&) = 0;
+        virtual void onError() = 0;
+    };
+    virtual void registerClient(Client&) = 0;
+    virtual void unregisterClient() = 0;
+};
+
+inline bool operator==(const RTCDtlsTransportBackend& a, const RTCDtlsTransportBackend& b)
+{
+    return a.backend() == b.backend();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransportStatehfromrev281224trunkSourceWebCoreModulesmediastreamRTCRtpReceiverBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.h (from rev 281224, trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h) (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.h                         (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.h    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_RTC)
+
+enum class RTCDtlsTransportState {
+    New,
+    Connecting,
+    Connected,
+    Closed,
+    Failed
+};
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransportStateidlfromrev281224trunkSourceWebCoreModulesmediastreamRTCRtpReceiverBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.idl (from rev 281224, trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h) (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.idl                               (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.idl  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[
+    Conditional=WEB_RTC,
+    EnabledBySetting=PeerConnection
+] enum RTCDtlsTransportState {
+  "new",
+  "connecting",
+  "connected",
+  "closed",
+  "failed"
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx"> #include "RTCConfiguration.h"
</span><span class="cx"> #include "RTCController.h"
</span><span class="cx"> #include "RTCDataChannel.h"
</span><ins>+#include "RTCDtlsTransport.h"
+#include "RTCDtlsTransportBackend.h"
</ins><span class="cx"> #include "RTCIceCandidate.h"
</span><span class="cx"> #include "RTCIceCandidateInit.h"
</span><span class="cx"> #include "RTCOfferOptions.h"
</span><span class="lines">@@ -833,6 +835,49 @@
</span><span class="cx">     return downcast<Document>(scriptExecutionContext());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+RefPtr<RTCDtlsTransport> RTCPeerConnection::getOrCreateDtlsTransport(std::unique_ptr<RTCDtlsTransportBackend>&& backend)
+{
+    if (!backend)
+        return nullptr;
+
+    auto* context = scriptExecutionContext();
+    if (!context)
+        return nullptr;
+
+    auto index = m_transports.findMatching([&backend](auto& transport) { return *backend == transport->backend(); });
+    if (index == notFound) {
+        index = m_transports.size();
+        m_transports.append(RTCDtlsTransport::create(*context, makeUniqueRefFromNonNullUniquePtr(WTFMove(backend))));
+    }
+
+    return m_transports[index].copyRef();
+}
+
+void RTCPeerConnection::updateTransceiverTransports()
+{
+    for (auto& transceiver : m_transceiverSet->list()) {
+        auto& sender = transceiver->sender();
+        if (auto* senderBackend = sender.backend())
+            sender.setTransport(getOrCreateDtlsTransport(senderBackend->dtlsTransportBackend()));
+
+        auto& receiver = transceiver->receiver();
+        if (auto* receiverBackend = receiver.backend())
+            receiver.setTransport(getOrCreateDtlsTransport(receiverBackend->dtlsTransportBackend()));
+    }
+}
+
+// https://w3c.github.io/webrtc-pc/#set-description step 4.9.1
+void RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription()
+{
+    updateTransceiverTransports();
+}
+
+// https://w3c.github.io/webrtc-pc/#set-description step 4.9.2
+void RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription()
+{
+    updateTransceiverTransports();
+}
+
</ins><span class="cx"> #if !RELEASE_LOG_DISABLED
</span><span class="cx"> WTFLogChannel& RTCPeerConnection::logChannel() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h     2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h        2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -58,6 +58,8 @@
</span><span class="cx"> class MediaStream;
</span><span class="cx"> class MediaStreamTrack;
</span><span class="cx"> class RTCController;
</span><ins>+class RTCDtlsTransport;
+class RTCDtlsTransportBackend;
</ins><span class="cx"> class RTCIceCandidate;
</span><span class="cx"> class RTCPeerConnectionErrorCallback;
</span><span class="cx"> class RTCSessionDescription;
</span><span class="lines">@@ -182,6 +184,9 @@
</span><span class="cx"> 
</span><span class="cx">     void doTask(Function<void()>&&);
</span><span class="cx"> 
</span><ins>+    void updateTransceiversAfterSuccessfulLocalDescription();
+    void updateTransceiversAfterSuccessfulRemoteDescription();
+
</ins><span class="cx"> #if !RELEASE_LOG_DISABLED
</span><span class="cx">     const Logger& logger() const final { return m_logger.get(); }
</span><span class="cx">     const void* logIdentifier() const final { return m_logIdentifier; }
</span><span class="lines">@@ -224,6 +229,9 @@
</span><span class="cx"> 
</span><span class="cx">     ExceptionOr<Vector<MediaEndpointConfiguration::IceServerInfo>> iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet);
</span><span class="cx"> 
</span><ins>+    RefPtr<RTCDtlsTransport> getOrCreateDtlsTransport(std::unique_ptr<RTCDtlsTransportBackend>&&);
+    void updateTransceiverTransports();
+
</ins><span class="cx">     bool m_isStopped { false };
</span><span class="cx">     RTCSignalingState m_signalingState { RTCSignalingState::Stable };
</span><span class="cx">     RTCIceGatheringState m_iceGatheringState { RTCIceGatheringState::New };
</span><span class="lines">@@ -247,6 +255,7 @@
</span><span class="cx">     Deque<std::pair<Ref<DeferredPromise>, Function<void(Ref<DeferredPromise>&&)>>> m_operations;
</span><span class="cx">     bool m_hasPendingOperation { false };
</span><span class="cx">     bool m_shouldFireNegotiationNeededOnceOperationChainIsEmpty { false };
</span><ins>+    Vector<Ref<RTCDtlsTransport>> m_transports;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpReceiverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.h        2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.h   2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx"> 
</span><span class="cx"> #include "MediaStreamTrack.h"
</span><ins>+#include "RTCDtlsTransport.h"
</ins><span class="cx"> #include "RTCRtpReceiverBackend.h"
</span><span class="cx"> #include "RTCRtpSynchronizationSource.h"
</span><span class="cx"> #include "RTCRtpTransform.h"
</span><span class="lines">@@ -69,6 +70,9 @@
</span><span class="cx"> 
</span><span class="cx">     MediaStreamTrack& track() { return m_track.get(); }
</span><span class="cx"> 
</span><ins>+    RTCDtlsTransport* transport() { return m_transport.get(); }
+    void setTransport(RefPtr<RTCDtlsTransport>&& transport) { m_transport = WTFMove(transport); }
+
</ins><span class="cx">     RTCRtpReceiverBackend* backend() { return m_backend.get(); }
</span><span class="cx">     void getStats(Ref<DeferredPromise>&&);
</span><span class="cx"> 
</span><span class="lines">@@ -86,6 +90,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     Ref<MediaStreamTrack> m_track;
</span><ins>+    RefPtr<RTCDtlsTransport> m_transport;
</ins><span class="cx">     std::unique_ptr<RTCRtpReceiverBackend> m_backend;
</span><span class="cx">     WeakPtr<PeerConnectionBackend> m_connection;
</span><span class="cx">     std::unique_ptr<RTCRtpTransform> m_transform;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpReceiveridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx">     Exposed=Window
</span><span class="cx"> ] interface RTCRtpReceiver {
</span><span class="cx">     readonly attribute MediaStreamTrack track;
</span><del>-    // FIXME 169662: missing transport
-    // FIXME 169662: missing rtcpTransport
</del><ins>+    readonly attribute RTCDtlsTransport? transport;
+
</ins><span class="cx">     [CallWith=ScriptExecutionContext] static RTCRtpCapabilities? getCapabilities(DOMString kind);
</span><span class="cx">     RTCRtpParameters getParameters();
</span><span class="cx">     sequence<RTCRtpContributingSource> getContributingSources();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpReceiverBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class RTCDtlsTransportBackend;
</ins><span class="cx"> class RTCRtpTransformBackend;
</span><span class="cx"> 
</span><span class="cx"> class RTCRtpReceiverBackend {
</span><span class="lines">@@ -40,6 +41,7 @@
</span><span class="cx">     virtual Vector<RTCRtpContributingSource> getContributingSources() const { return { }; }
</span><span class="cx">     virtual Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const { return { }; }
</span><span class="cx">     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
</span><ins>+    virtual std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSenderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h  2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h     2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "JSDOMPromiseDeferred.h"
</span><span class="cx"> #include "MediaStreamTrack.h"
</span><ins>+#include "RTCDtlsTransport.h"
</ins><span class="cx"> #include "RTCRtpSenderBackend.h"
</span><span class="cx"> #include "RTCRtpTransceiverDirection.h"
</span><span class="cx"> #include "RTCRtpTransform.h"
</span><span class="lines">@@ -64,6 +65,9 @@
</span><span class="cx"> 
</span><span class="cx">     MediaStreamTrack* track() { return m_track.get(); }
</span><span class="cx"> 
</span><ins>+    RTCDtlsTransport* transport() { return m_transport.get(); }
+    void setTransport(RefPtr<RTCDtlsTransport>&& transport) { m_transport = WTFMove(transport); }
+
</ins><span class="cx">     const String& trackId() const { return m_trackId; }
</span><span class="cx">     const String& trackKind() const { return m_trackKind; }
</span><span class="cx"> 
</span><span class="lines">@@ -103,6 +107,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     RefPtr<MediaStreamTrack> m_track;
</span><ins>+    RefPtr<RTCDtlsTransport> m_transport;
</ins><span class="cx">     String m_trackId;
</span><span class="cx">     String m_trackKind;
</span><span class="cx">     std::unique_ptr<RTCRtpSenderBackend> m_backend;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSenderidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.idl (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.idl        2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.idl   2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -35,7 +35,8 @@
</span><span class="cx">     Exposed=Window
</span><span class="cx"> ] interface RTCRtpSender {
</span><span class="cx">     readonly attribute MediaStreamTrack? track;
</span><del>-    // FIXME 169662: readonly attribute RTCDtlsTransport? transport;
</del><ins>+    readonly attribute RTCDtlsTransport? transport;
+
</ins><span class="cx">     [CallWith=ScriptExecutionContext] static RTCRtpCapabilities? getCapabilities(DOMString kind);
</span><span class="cx">     RTCRtpSendParameters getParameters();
</span><span class="cx">     Promise<undefined> setParameters(RTCRtpSendParameters parameters);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSenderBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> class MediaStreamTrack;
</span><span class="cx"> class RTCDTMFSenderBackend;
</span><ins>+class RTCDtlsTransportBackend;
</ins><span class="cx"> class RTCRtpSender;
</span><span class="cx"> class RTCRtpTransformBackend;
</span><span class="cx"> class ScriptExecutionContext;
</span><span class="lines">@@ -51,6 +52,7 @@
</span><span class="cx">     virtual std::unique_ptr<RTCDTMFSenderBackend> createDTMFBackend() = 0;
</span><span class="cx">     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
</span><span class="cx">     virtual void setMediaStreamIds(const Vector<String>&) = 0;
</span><ins>+    virtual std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCDtlsTransportBackendcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp                             (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp        2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,160 @@
</span><ins>+/*
+ * Copyright (C) 2018 Apple Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LibWebRTCDtlsTransportBackend.h"
+
+#if ENABLE(WEB_RTC) && USE(LIBWEBRTC)
+
+#include <webrtc/api/dtls_transport_interface.h>
+
+namespace WebCore {
+
+static inline RTCDtlsTransportState toRTCDtlsTransportState(webrtc::DtlsTransportState state)
+{
+    switch (state) {
+    case webrtc::DtlsTransportState::kNew:
+        return RTCDtlsTransportState::New;
+    case webrtc::DtlsTransportState::kConnecting:
+        return RTCDtlsTransportState::Connecting;
+    case webrtc::DtlsTransportState::kConnected:
+        return RTCDtlsTransportState::Connected;
+    case webrtc::DtlsTransportState::kClosed:
+        return RTCDtlsTransportState::Closed;
+    case webrtc::DtlsTransportState::kFailed:
+        return RTCDtlsTransportState::Failed;
+    case webrtc::DtlsTransportState::kNumValues:
+        ASSERT_NOT_REACHED();
+        return RTCDtlsTransportState::Failed;
+    }
+
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+class LibWebRTCDtlsTransportBackendObserver final : public ThreadSafeRefCounted<LibWebRTCDtlsTransportBackendObserver>, public webrtc::DtlsTransportObserverInterface {
+public:
+    static Ref<LibWebRTCDtlsTransportBackendObserver> create(RTCDtlsTransportBackend::Client& client, rtc::scoped_refptr<webrtc::DtlsTransportInterface>& backend) { return adoptRef(*new LibWebRTCDtlsTransportBackendObserver(client, backend)); }
+
+    void start();
+    void stop();
+
+private:
+    LibWebRTCDtlsTransportBackendObserver(RTCDtlsTransportBackend::Client&, rtc::scoped_refptr<webrtc::DtlsTransportInterface>&);
+
+    void OnStateChange(webrtc::DtlsTransportInformation) final;
+    void OnError(webrtc::RTCError) final;
+
+    void updateState(webrtc::DtlsTransportInformation&&);
+
+    rtc::scoped_refptr<webrtc::DtlsTransportInterface> m_backend;
+    WeakPtr<RTCDtlsTransportBackend::Client> m_client;
+};
+
+LibWebRTCDtlsTransportBackendObserver::LibWebRTCDtlsTransportBackendObserver(RTCDtlsTransportBackend::Client& client, rtc::scoped_refptr<webrtc::DtlsTransportInterface>& backend)
+    : m_backend(backend)
+    , m_client(makeWeakPtr(client))
+{
+    ASSERT(m_backend);
+}
+
+void LibWebRTCDtlsTransportBackendObserver::updateState(webrtc::DtlsTransportInformation&& info)
+{
+    if (!m_client)
+        return;
+
+    Vector<rtc::Buffer> certificates;
+    if (auto* remoteCertificates = info.remote_ssl_certificates()) {
+        for (size_t i = 0; i < remoteCertificates->GetSize(); ++i) {
+            rtc::Buffer certificate;
+            remoteCertificates->Get(i).ToDER(&certificate);
+            certificates.append(WTFMove(certificate));
+        }
+    }
+    m_client->onStateChanged(toRTCDtlsTransportState(info.state()), map(certificates, [](auto& certificate) -> Ref<JSC::ArrayBuffer> {
+        return JSC::ArrayBuffer::create(certificate.data(), certificate.size());
+    }));
+}
+
+void LibWebRTCDtlsTransportBackendObserver::start()
+{
+    LibWebRTCProvider::callOnWebRTCNetworkThread([this, protectedThis = makeRef(*this)]() mutable {
+        m_backend->RegisterObserver(this);
+        callOnMainThread([protectedThis = WTFMove(protectedThis), info = m_backend->Information()]() mutable {
+            protectedThis->updateState(WTFMove(info));
+        });
+    });
+}
+
+void LibWebRTCDtlsTransportBackendObserver::stop()
+{
+    m_client = nullptr;
+    LibWebRTCProvider::callOnWebRTCNetworkThread([protectedThis = makeRef(*this)] {
+        protectedThis->m_backend->UnregisterObserver();
+    });
+}
+
+void LibWebRTCDtlsTransportBackendObserver::OnStateChange(webrtc::DtlsTransportInformation info)
+{
+    callOnMainThread([protectedThis = makeRef(*this), info = WTFMove(info)]() mutable {
+        protectedThis->updateState(WTFMove(info));
+    });
+}
+
+void LibWebRTCDtlsTransportBackendObserver::OnError(webrtc::RTCError)
+{
+    callOnMainThread([protectedThis = makeRef(*this)] {
+        if (protectedThis->m_client)
+            protectedThis->m_client->onError();
+    });
+}
+
+
+LibWebRTCDtlsTransportBackend::LibWebRTCDtlsTransportBackend(rtc::scoped_refptr<webrtc::DtlsTransportInterface>&& backend)
+    : m_backend(WTFMove(backend))
+{
+    ASSERT(m_backend);
+}
+
+LibWebRTCDtlsTransportBackend::~LibWebRTCDtlsTransportBackend()
+{
+    if (m_observer)
+        m_observer->stop();
+}
+
+void LibWebRTCDtlsTransportBackend::registerClient(Client& client)
+{
+    ASSERT(!m_observer);
+    m_observer = LibWebRTCDtlsTransportBackendObserver::create(client, m_backend);
+    m_observer->start();
+}
+
+void LibWebRTCDtlsTransportBackend::unregisterClient()
+{
+    ASSERT(m_observer);
+    m_observer->stop();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC) && USE(LIBWEBRTC)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCDtlsTransportBackendhfromrev281224trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpReceiverBackendh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h (from rev 281224, trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h) (0 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h                               (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2018 Apple Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(WEB_RTC)
+
+#include "LibWebRTCMacros.h"
+#include "RTCDtlsTransportBackend.h"
+#include <wtf/WeakPtr.h>
+
+ALLOW_UNUSED_PARAMETERS_BEGIN
+
+#include <webrtc/api/scoped_refptr.h>
+
+ALLOW_UNUSED_PARAMETERS_END
+
+namespace webrtc {
+class DtlsTransportInterface;
+}
+
+namespace WebCore {
+class LibWebRTCDtlsTransportBackendObserver;
+class LibWebRTCDtlsTransportBackend final : public RTCDtlsTransportBackend, public CanMakeWeakPtr<LibWebRTCDtlsTransportBackend> {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    explicit LibWebRTCDtlsTransportBackend(rtc::scoped_refptr<webrtc::DtlsTransportInterface>&&);
+    ~LibWebRTCDtlsTransportBackend();
+
+private:
+    // RTCDtlsTransportBackend
+    const void* backend() const final { return m_backend.get(); }
+    void registerClient(Client&) final;
+    void unregisterClient() final;
+
+    rtc::scoped_refptr<webrtc::DtlsTransportInterface> m_backend;
+    RefPtr<LibWebRTCDtlsTransportBackendObserver> m_observer;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_RTC)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpReceiverBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp       2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp  2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "LibWebRTCRtpReceiverBackend.h"
</span><span class="cx"> 
</span><ins>+#include "LibWebRTCDtlsTransportBackend.h"
</ins><span class="cx"> #include "LibWebRTCRtpReceiverTransformBackend.h"
</span><span class="cx"> #include "LibWebRTCUtils.h"
</span><span class="cx"> #include "RTCRtpTransformBackend.h"
</span><span class="lines">@@ -124,6 +125,12 @@
</span><span class="cx">     return *m_transformBackend;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+std::unique_ptr<RTCDtlsTransportBackend> LibWebRTCRtpReceiverBackend::dtlsTransportBackend()
+{
+    auto backend = m_rtcReceiver->dtls_transport();
+    return backend ? makeUnique<LibWebRTCDtlsTransportBackend>(WTFMove(backend)) : nullptr;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEB_RTC) && USE(LIBWEBRTC)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpReceiverBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">     Vector<RTCRtpContributingSource> getContributingSources() const final;
</span><span class="cx">     Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const final;
</span><span class="cx">     Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() final;
</span><ins>+    std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() final;
</ins><span class="cx"> 
</span><span class="cx">     rtc::scoped_refptr<webrtc::RtpReceiverInterface> m_rtcReceiver;
</span><span class="cx">     RefPtr<RTCRtpTransformBackend> m_transformBackend;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "JSDOMPromiseDeferred.h"
</span><span class="cx"> #include "LibWebRTCDTMFSenderBackend.h"
</span><ins>+#include "LibWebRTCDtlsTransportBackend.h"
</ins><span class="cx"> #include "LibWebRTCPeerConnectionBackend.h"
</span><span class="cx"> #include "LibWebRTCRtpSenderTransformBackend.h"
</span><span class="cx"> #include "LibWebRTCUtils.h"
</span><span class="lines">@@ -167,6 +168,12 @@
</span><span class="cx">     return *m_transformBackend;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+std::unique_ptr<RTCDtlsTransportBackend> LibWebRTCRtpSenderBackend::dtlsTransportBackend()
+{
+    auto backend = m_rtcSender->dtls_transport();
+    return backend ? makeUnique<LibWebRTCDtlsTransportBackend>(WTFMove(backend)) : nullptr;
+}
+
</ins><span class="cx"> void LibWebRTCRtpSenderBackend::setMediaStreamIds(const Vector<String>& streamIds)
</span><span class="cx"> {
</span><span class="cx">     std::vector<std::string> ids;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCRtpSenderBackendh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx">     void setParameters(const RTCRtpSendParameters&, DOMPromiseDeferred<void>&&) final;
</span><span class="cx">     std::unique_ptr<RTCDTMFSenderBackend> createDTMFBackend() final;
</span><span class="cx">     Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() final;
</span><ins>+    std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() final;
</ins><span class="cx">     void setMediaStreamIds(const Vector<String>&) final;
</span><span class="cx"> 
</span><span class="cx">     void startSource();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCUtilscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp    2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp       2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #if USE(LIBWEBRTC)
</span><span class="cx"> 
</span><span class="cx"> #include "LibWebRTCMacros.h"
</span><ins>+#include "RTCDtlsTransportState.h"
</ins><span class="cx"> #include "RTCIceCandidate.h"
</span><span class="cx"> #include "RTCPeerConnection.h"
</span><span class="cx"> #include "RTCRtpSendParameters.h"
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamlibwebrtcLibWebRTCUtilsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h      2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h 2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> class RTCError;
</span><span class="cx"> 
</span><ins>+enum class DtlsTransportState;
</ins><span class="cx"> enum class Priority;
</span><span class="cx"> enum class RTCErrorType;
</span><span class="cx"> enum class RtpTransceiverDirection;
</span><span class="lines">@@ -67,7 +68,6 @@
</span><span class="cx"> RTCPriorityType toRTCPriorityType(webrtc::Priority);
</span><span class="cx"> webrtc::Priority fromRTCPriorityType(RTCPriorityType);
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> inline String fromStdString(const std::string& value)
</span><span class="cx"> {
</span><span class="cx">     return String::fromUTF8(value.data(), value.length());
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/Sources.txt    2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -161,6 +161,7 @@
</span><span class="cx"> Modules/mediastream/RTCDataChannelEvent.cpp
</span><span class="cx"> Modules/mediastream/RTCDataChannelRemoteHandler.cpp
</span><span class="cx"> Modules/mediastream/RTCDataChannelRemoteSource.cpp
</span><ins>+Modules/mediastream/RTCDtlsTransport.cpp
</ins><span class="cx"> Modules/mediastream/RTCEncodedAudioFrame.cpp
</span><span class="cx"> Modules/mediastream/RTCEncodedFrame.cpp
</span><span class="cx"> Modules/mediastream/RTCEncodedVideoFrame.cpp
</span><span class="lines">@@ -186,6 +187,7 @@
</span><span class="cx"> Modules/mediastream/UserMediaController.cpp
</span><span class="cx"> Modules/mediastream/UserMediaRequest.cpp
</span><span class="cx"> Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp
</span><ins>+Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp
</ins><span class="cx"> Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverTransformBackend.cpp
</span><span class="cx"> Modules/mediastream/libwebrtc/LibWebRTCRtpSenderTransformBackend.cpp
</span><span class="cx"> Modules/mediastream/libwebrtc/LibWebRTCRtpTransformBackend.cpp
</span><span class="lines">@@ -3295,6 +3297,8 @@
</span><span class="cx"> JSRTCDataChannelEvent.cpp
</span><span class="cx"> JSRTCDegradationPreference.cpp
</span><span class="cx"> JSRTCDtxStatus.cpp
</span><ins>+JSRTCDtlsTransport.cpp
+JSRTCDtlsTransportState.cpp
</ins><span class="cx"> JSRTCEncodedAudioFrame.cpp
</span><span class="cx"> JSRTCEncodedVideoFrame.cpp
</span><span class="cx"> JSRTCIceCandidate.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -1143,6 +1143,8 @@
</span><span class="cx">          4186BD40213EE3450001826F /* LibWebRTCRtpReceiverBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41D1A04A213EDDFE0063FB6B /* LibWebRTCRtpReceiverBackend.cpp */; };
</span><span class="cx">          4186BD4E2140B9E80001826F /* LibWebRTCRtpTransceiverBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4186BD4D2140B9E80001826F /* LibWebRTCRtpTransceiverBackend.cpp */; };
</span><span class="cx">          41885B9311B6FDA6003383BB /* FormSubmission.h in Headers */ = {isa = PBXBuildFile; fileRef = 41885B9111B6FDA6003383BB /* FormSubmission.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               4188D55C26C54D6F004858C8 /* RTCDtlsTransportBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 4188D55A26C54D6F004858C8 /* RTCDtlsTransportBackend.h */; };
+               4188D56326C551B1004858C8 /* RTCDtlsTransportState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4188D56226C551B1004858C8 /* RTCDtlsTransportState.h */; };
</ins><span class="cx">           418938B22429F9B4007FDC41 /* RetrieveRecordsOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 418938AF2429F9AB007FDC41 /* RetrieveRecordsOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 418A06CE133C04D500CD379C /* EventDispatcher.h */; };
</span><span class="cx">          418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 418F88030FF957AE0080F045 /* JSAbstractWorker.h */; };
</span><span class="lines">@@ -7927,6 +7929,14 @@
</span><span class="cx">          418807E124E458C300DDAF94 /* AbortAlgorithm.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AbortAlgorithm.h; sourceTree = "<group>"; };
</span><span class="cx">          41885B9111B6FDA6003383BB /* FormSubmission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormSubmission.h; sourceTree = "<group>"; };
</span><span class="cx">          41885B9211B6FDA6003383BB /* FormSubmission.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormSubmission.cpp; sourceTree = "<group>"; };
</span><ins>+               4188D55A26C54D6F004858C8 /* RTCDtlsTransportBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDtlsTransportBackend.h; sourceTree = "<group>"; };
+               4188D55D26C5511A004858C8 /* RTCDtlsTransport.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RTCDtlsTransport.idl; sourceTree = "<group>"; };
+               4188D55E26C5511A004858C8 /* RTCDtlsTransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCDtlsTransport.h; sourceTree = "<group>"; };
+               4188D55F26C5511A004858C8 /* RTCDtlsTransport.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RTCDtlsTransport.cpp; sourceTree = "<group>"; };
+               4188D56026C55166004858C8 /* RTCDtlsTransportState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCDtlsTransportState.idl; sourceTree = "<group>"; };
+               4188D56226C551B1004858C8 /* RTCDtlsTransportState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDtlsTransportState.h; sourceTree = "<group>"; };
+               4188D56426C5530B004858C8 /* LibWebRTCDtlsTransportBackend.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibWebRTCDtlsTransportBackend.cpp; path = libwebrtc/LibWebRTCDtlsTransportBackend.cpp; sourceTree = "<group>"; };
+               4188D56526C5530B004858C8 /* LibWebRTCDtlsTransportBackend.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibWebRTCDtlsTransportBackend.h; path = libwebrtc/LibWebRTCDtlsTransportBackend.h; sourceTree = "<group>"; };
</ins><span class="cx">           418938AF2429F9AB007FDC41 /* RetrieveRecordsOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RetrieveRecordsOptions.h; sourceTree = "<group>"; };
</span><span class="cx">          418A06CE133C04D500CD379C /* EventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcher.h; sourceTree = "<group>"; };
</span><span class="cx">          418A06CF133C04D500CD379C /* EventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventDispatcher.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -17146,6 +17156,12 @@
</span><span class="cx">                          416EDBEF25FFB22400092675 /* RTCDataChannelRemoteSource.h */,
</span><span class="cx">                          41FCB75D214866FE0038ADC6 /* RTCDegradationPreference.h */,
</span><span class="cx">                          41FCB755214865CF0038ADC6 /* RTCDegradationPreference.idl */,
</span><ins>+                               4188D55F26C5511A004858C8 /* RTCDtlsTransport.cpp */,
+                               4188D55E26C5511A004858C8 /* RTCDtlsTransport.h */,
+                               4188D55D26C5511A004858C8 /* RTCDtlsTransport.idl */,
+                               4188D55A26C54D6F004858C8 /* RTCDtlsTransportBackend.h */,
+                               4188D56226C551B1004858C8 /* RTCDtlsTransportState.h */,
+                               4188D56026C55166004858C8 /* RTCDtlsTransportState.idl */,
</ins><span class="cx">                           07221B6917CEC32700848E51 /* RTCDTMFSender.cpp */,
</span><span class="cx">                          07221B6A17CEC32700848E51 /* RTCDTMFSender.h */,
</span><span class="cx">                          07221B6B17CEC32700848E51 /* RTCDTMFSender.idl */,
</span><span class="lines">@@ -19288,6 +19304,8 @@
</span><span class="cx">                          41209E95216EC34E00A73A12 /* LibWebRTCCertificateGenerator.h */,
</span><span class="cx">                          5CDD833F1E43253D00621E92 /* LibWebRTCDataChannelHandler.cpp */,
</span><span class="cx">                          5CDD83401E43253D00621E92 /* LibWebRTCDataChannelHandler.h */,
</span><ins>+                               4188D56426C5530B004858C8 /* LibWebRTCDtlsTransportBackend.cpp */,
+                               4188D56526C5530B004858C8 /* LibWebRTCDtlsTransportBackend.h */,
</ins><span class="cx">                           417612AB1E3A993B00C3D81D /* LibWebRTCMediaEndpoint.cpp */,
</span><span class="cx">                          417612AC1E3A993B00C3D81D /* LibWebRTCMediaEndpoint.h */,
</span><span class="cx">                          415A3B732138E264001B4BAA /* LibWebRTCObservers.h */,
</span><span class="lines">@@ -34318,6 +34336,8 @@
</span><span class="cx">                          411223BE26025BC100B0A0B6 /* RTCDataChannelRemoteSource.h in Headers */,
</span><span class="cx">                          416EDC042600E81000092675 /* RTCDataChannelRemoteSourceConnection.h in Headers */,
</span><span class="cx">                          316DE7021E83AE1D0084C261 /* RTCDataChannelState.h in Headers */,
</span><ins>+                               4188D55C26C54D6F004858C8 /* RTCDtlsTransportBackend.h in Headers */,
+                               4188D56326C551B1004858C8 /* RTCDtlsTransportState.h in Headers */,
</ins><span class="cx">                           078E092017D14D1C00420AA1 /* RTCDTMFSender.h in Headers */,
</span><span class="cx">                          078E092117D14D1C00420AA1 /* RTCDTMFToneChangeEvent.h in Headers */,
</span><span class="cx">                          078E092317D14D1C00420AA1 /* RTCIceCandidate.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -191,6 +191,7 @@
</span><span class="cx">     macro(RTCDTMFToneChangeEvent) \
</span><span class="cx">     macro(RTCDataChannel) \
</span><span class="cx">     macro(RTCDataChannelEvent) \
</span><ins>+    macro(RTCDtlsTransport) \
</ins><span class="cx">     macro(RTCEncodedAudioFrame) \
</span><span class="cx">     macro(RTCEncodedVideoFrame) \
</span><span class="cx">     macro(RTCIceCandidate) \
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetFactoryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTargetFactory.in (281224 => 281225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTargetFactory.in   2021-08-19 07:05:35 UTC (rev 281224)
+++ trunk/Source/WebCore/dom/EventTargetFactory.in      2021-08-19 07:36:49 UTC (rev 281225)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> PictureInPictureWindow conditional=PICTURE_IN_PICTURE_API
</span><span class="cx"> RemotePlayback conditional=WIRELESS_PLAYBACK_TARGET
</span><span class="cx"> RTCDataChannel conditional=WEB_RTC
</span><ins>+RTCDtlsTransport conditional=WEB_RTC
</ins><span class="cx"> RTCDTMFSender conditional=WEB_RTC
</span><span class="cx"> RTCPeerConnection conditional=WEB_RTC
</span><span class="cx"> RTCRtpSFrameTransform conditional=WEB_RTC
</span></span></pre>
</div>
</div>

</body>
</html>