Changeset 281225 in webkit


Ignore:
Timestamp:
Aug 19, 2021 12:36:49 AM (11 months ago)
Author:
youenn@apple.com
Message:

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:
Location:
trunk
Files:
3 added
44 edited
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r281215 r281225  
     12021-08-19  Youenn Fablet  <youenn@apple.com>
     2
     3        Add support for RTCDtlsTransport
     4        https://bugs.webkit.org/show_bug.cgi?id=229133
     5
     6        Reviewed by Eric Carlson.
     7
     8        * web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt:
     9        * web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt:
     10        * web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt:
     11        * web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt:
     12        * web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt:
     13        * web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt:
     14        * web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt:
     15        * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt:
     16        * web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt:
     17        * web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt:
     18        * web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt:
     19        * web-platform-tests/webrtc/protocol/bundle.https-expected.txt:
     20        * web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt:
     21
    1222021-08-18  Chris Dumez  <cdumez@apple.com>
    223
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-getRemoteCertificates-expected.txt

    r270252 r281225  
    11
    2 FAIL RTCDtlsTransport.prototype.getRemoteCertificates undefined is not an object (evaluating 'dtlsTransport.state')
     2PASS RTCDtlsTransport.prototype.getRemoteCertificates
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCDtlsTransport-state-expected.txt

    r243041 r281225  
    11
    2 FAIL DTLS transport goes to connected state promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: RTCDtlsTransport"
    3 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')"
    4 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')"
     2PASS DTLS transport goes to connected state
     3FAIL close() causes the local transport to close immediately assert_equals: expected "closed" but got "connected"
     4PASS close() causes the other end's DTLS transport to close
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-connectionSetup-expected.txt

    r270252 r281225  
    11
    2 FAIL Candidates are added dynamically; connection should work promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
    3 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')"
    4 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')"
     2PASS Candidates are added dynamically; connection should work
     3PASS Candidates are added at PC1; connection should work
     4PASS Candidates are added at PC2; connection should work
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-helper-test-expected.txt

    r270252 r281225  
    11
    2 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')"
     2PASS Setting up a connection using helpers and defaults should work
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState.https-expected.txt

    r267649 r281225  
    77PASS connection with audio and video tracks should eventually have connected connection state
    88PASS ICE can connect in a recvonly usecase
    9 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')"
    10 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')"
    11 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')"
     9FAIL 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')"
     10FAIL 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')"
     11FAIL 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')"
    1212PASS Responder ICE connection state behaves as expected
    1313PASS Closing a PeerConnection should not fire iceconnectionstatechange event
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-iceGatheringState-expected.txt

    r267649 r281225  
    55PASS iceGatheringState should eventually become complete after setLocalDescription
    66TIMEOUT setLocalDescription(reoffer) with no new transports should not cause iceGatheringState to change Test timed out
    7 NOTRUN rolling back an ICE restart when gathering is complete should not result in iceGatheringState changes
     7NOTRUN setLocalDescription() with no transports should not cause iceGatheringState to change
    88NOTRUN setLocalDescription(reoffer) with a new transport should cause iceGatheringState to go to "checking" and then "complete"
    99NOTRUN sRD does not cause ICE gathering state changes
    10 NOTRUN setLocalDescription(rollback) of original offer should cause iceGatheringState to reach "new" when starting in "complete"
    11 NOTRUN setLocalDescription(rollback) of original offer should cause iceGatheringState to reach "new" when starting in "gathering"
    1210NOTRUN renegotiation that closes all transports should result in ICE gathering state "new"
    1311FAIL connection with one data channel should eventually have connected connection state undefined is not an object (evaluating 'pc2.sctp.transport')
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onnegotiationneeded-expected.txt

    r267649 r281225  
    1414PASS removeTrack should cause negotiationneeded to fire on the callee
    1515PASS Updating the direction of the transceiver should cause negotiationneeded to fire
    16 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)"
     16PASS Calling setStreams should cause negotiationneeded to fire
    1717PASS Adding two transceivers, one at a time, results in the expected number of negotiationneeded events
    1818
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-answer-expected.txt

    r267649 r281225  
    22PASS setLocalDescription() with valid answer should succeed
    33FAIL setLocalDescription() with type answer and null sdp should use lastAnswer generated from createAnswer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v="
    4 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
    5 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
    6 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
    7 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"
     4FAIL 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
     5FAIL 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
     6FAIL 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
     7FAIL 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"
    88FAIL 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
    99
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setLocalDescription-offer-expected.txt

    r267649 r281225  
    22PASS setLocalDescription with valid offer should succeed
    33FAIL setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer promise_test: Unhandled rejection with value: object "OperationError: Expect line: v="
    4 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
     4FAIL 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
    55FAIL Set created offer other than last offer should reject with InvalidModificationError assert_unreached: Should have rejected: undefined Reached unreachable code
    66PASS Creating and setting offer multiple times should succeed
    7 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"
     7FAIL 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"
    88FAIL Negotiation works when there has been a repeated setLocalDescription(offer) assert_equals: expected 1 but got 0
    99FAIL 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]"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpSender-transport.https-expected.txt

    r264202 r281225  
    11
    2 FAIL RTCRtpSender.transport is null when unconnected assert_equals: expected (object) null but got (undefined) undefined
    3 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')"
    4 FAIL RTCRtpSender/receiver.transport at the right time, with bundle policy balanced assert_equals: expected (object) null but got (undefined) undefined
    5 FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy balanced assert_equals: expected (object) null but got (undefined) undefined
    6 FAIL RTCRtpSender/receiver.transport at the right time, with bundle policy max-bundle assert_equals: expected (object) null but got (undefined) undefined
    7 FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy max-bundle assert_equals: expected (object) null but got (undefined) undefined
    8 FAIL RTCRtpSender/receiver.transport at the right time, with bundle policy max-compat assert_equals: expected (object) null but got (undefined) undefined
    9 FAIL RTCRtpSender/receiver/SCTP transport at the right time, with bundle policy max-compat assert_equals: expected (object) null but got (undefined) undefined
     2PASS RTCRtpSender.transport is null when unconnected
     3PASS RTCRtpSender/receiver.transport has a value when connected
     4PASS RTCRtpSender/receiver.transport at the right time, with bundle policy balanced
     5FAIL 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')"
     6PASS RTCRtpSender/receiver.transport at the right time, with bundle policy max-bundle
     7FAIL 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')"
     8PASS RTCRtpSender/receiver.transport at the right time, with bundle policy max-compat
     9FAIL 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')"
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpTransceiver.https-expected.txt

    r267649 r281225  
    1 
    2 Harness Error (TIMEOUT), message = null
    31
    42PASS checkAddTransceiverNoTrack
     
    1311PASS checkNoMidAnswer
    1412PASS checkSetDirection
    15 PASS checkCurrentDirection
     13FAIL checkCurrentDirection assert_equals: expected "[{currentDirection:null}]" but got "[{currentDirection:\"inactive\"}]"
    1614PASS checkSendrecvWithNoSendTrack
    1715PASS checkSendrecvWithTracklessStream
     
    2422PASS checkRemoveAndReadd
    2523PASS checkAddTrackExistingTransceiverThenRemove
    26 FAIL checkRemoveTrackNegotiation promise_test: Unhandled rejection with value: object "InvalidStateError: Description type incompatible with current signaling state"
     24FAIL checkRemoveTrackNegotiation promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"
    2725FAIL checkMute assert_true: expected true got false
    28 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}]"
    29 FAIL checkStopAfterCreateOffer assert_equals: expected "[{mid:null,stopped:true}]" but got "[{mid:\"0\",stopped:true}]"
    30 FAIL checkStopAfterSetLocalOffer assert_equals: expected "[{mid:null,stopped:true}]" but got "[{mid:\"0\",stopped:true}]"
    31 FAIL checkStopAfterSetRemoteOffer assert_equals: expected "[]" but got "[{isTrusted:true}]"
    32 FAIL checkStopAfterCreateAnswer assert_equals: expected "[{mid:null,stopped:true}]" but got "[{mid:\"0\",stopped:true}]"
    33 TIMEOUT checkStopAfterSetLocalAnswer Test timed out
    34 NOTRUN checkStopAfterClose
    35 NOTRUN checkLocalRollback
    36 NOTRUN checkRollbackAndSetRemoteOfferWithDifferentType
    37 NOTRUN checkRemoteRollback
    38 NOTRUN checkMsectionReuse
    39 NOTRUN checkStopAfterCreateOfferWithReusedMsection
    40 NOTRUN checkAddIceCandidateToStoppedTransceiver
    41 NOTRUN checkBundleTagRejected
     26FAIL 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}}]"
     27FAIL checkStopAfterCreateOffer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]"
     28FAIL checkStopAfterSetLocalOffer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]"
     29FAIL checkStopAfterSetRemoteOffer assert_equals: expected "stopped" but got "inactive"
     30FAIL checkStopAfterCreateAnswer assert_equals: expected "[{currentDirection:null,direction:\"stopped\"}]" but got "[{currentDirection:null,direction:\"inactive\"}]"
     31FAIL checkStopAfterSetLocalAnswer assert_equals: expected "[{currentDirection:\"sendrecv\",direction:\"stopped\"}]" but got "[{currentDirection:\"sendrecv\",direction:\"inactive\"}]"
     32PASS checkStopAfterClose
     33FAIL checkLocalRollback promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1"
     34FAIL checkRollbackAndSetRemoteOfferWithDifferentType promise_test: Unhandled rejection with value: object "InvalidStateError: Local description type 3 is incompatible with current signaling state 1"
     35FAIL checkRemoteRollback promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 3 is incompatible with current signaling state 2"
     36FAIL checkMsectionReuse assert_equals: expected "[{currentDirection:null,mid:null}]" but got "[{currentDirection:\"inactive\",mid:\"0\"}]"
     37PASS checkStopAfterCreateOfferWithReusedMsection
     38FAIL checkAddIceCandidateToStoppedTransceiver promise_test: Unhandled rejection with value: object "InvalidStateError: Remote description type 0 is incompatible with current signaling state 1"
     39FAIL checkBundleTagRejected promise_test: Unhandled rejection with value: object "InvalidAccessError: Failed to set remote offer sdp: The m= section with mid='1' should be rejected."
    4240
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/idlharness.https.window-expected.txt

    r279385 r281225  
    233233PASS RTCRtpSender interface: existence and properties of interface prototype object's @@unscopables property
    234234PASS RTCRtpSender interface: attribute track
    235 FAIL RTCRtpSender interface: attribute transport assert_true: The prototype object must have a property "transport" expected true got false
     235PASS RTCRtpSender interface: attribute transport
    236236PASS RTCRtpSender interface: operation getCapabilities(DOMString)
    237237PASS RTCRtpSender interface: operation setParameters(RTCRtpSendParameters)
     
    244244PASS Stringification of new RTCPeerConnection().addTransceiver('audio').sender
    245245PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "track" with the proper type
    246 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
     246PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "transport" with the proper type
    247247PASS RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "getCapabilities(DOMString)" with the proper type
    248248PASS RTCRtpSender interface: calling getCapabilities(DOMString) on new RTCPeerConnection().addTransceiver('audio').sender with too few arguments must throw TypeError
     
    263263PASS RTCRtpReceiver interface: existence and properties of interface prototype object's @@unscopables property
    264264PASS RTCRtpReceiver interface: attribute track
    265 FAIL RTCRtpReceiver interface: attribute transport assert_true: The prototype object must have a property "transport" expected true got false
     265PASS RTCRtpReceiver interface: attribute transport
    266266PASS RTCRtpReceiver interface: operation getCapabilities(DOMString)
    267267PASS RTCRtpReceiver interface: operation getParameters()
     
    272272PASS Stringification of new RTCPeerConnection().addTransceiver('audio').receiver
    273273PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "track" with the proper type
    274 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
     274PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "transport" with the proper type
    275275PASS RTCRtpReceiver interface: new RTCPeerConnection().addTransceiver('audio').receiver must inherit property "getCapabilities(DOMString)" with the proper type
    276276PASS RTCRtpReceiver interface: calling getCapabilities(DOMString) on new RTCPeerConnection().addTransceiver('audio').receiver with too few arguments must throw TypeError
     
    302302PASS RTCRtpTransceiver interface: new RTCPeerConnection().addTransceiver('audio') must inherit property "setCodecPreferences(sequence<RTCRtpCodecCapability>)" with the proper type
    303303PASS RTCRtpTransceiver interface: calling setCodecPreferences(sequence<RTCRtpCodecCapability>) on new RTCPeerConnection().addTransceiver('audio') with too few arguments must throw TypeError
    304 FAIL RTCDtlsTransport interface: existence and properties of interface object assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    305 FAIL RTCDtlsTransport interface object length assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    306 FAIL RTCDtlsTransport interface object name assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    307 FAIL RTCDtlsTransport interface: existence and properties of interface prototype object assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    308 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
    309 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
    310 FAIL RTCDtlsTransport interface: attribute iceTransport assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    311 FAIL RTCDtlsTransport interface: attribute state assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    312 FAIL RTCDtlsTransport interface: operation getRemoteCertificates() assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    313 FAIL RTCDtlsTransport interface: attribute onstatechange assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
    314 FAIL RTCDtlsTransport interface: attribute onerror assert_own_property: self does not have own property "RTCDtlsTransport" expected property "RTCDtlsTransport" missing
     304PASS RTCDtlsTransport interface: existence and properties of interface object
     305PASS RTCDtlsTransport interface object length
     306PASS RTCDtlsTransport interface object name
     307PASS RTCDtlsTransport interface: existence and properties of interface prototype object
     308PASS RTCDtlsTransport interface: existence and properties of interface prototype object's "constructor" property
     309PASS RTCDtlsTransport interface: existence and properties of interface prototype object's @@unscopables property
     310FAIL RTCDtlsTransport interface: attribute iceTransport assert_true: The prototype object must have a property "iceTransport" expected true got false
     311PASS RTCDtlsTransport interface: attribute state
     312PASS RTCDtlsTransport interface: operation getRemoteCertificates()
     313PASS RTCDtlsTransport interface: attribute onstatechange
     314PASS RTCDtlsTransport interface: attribute onerror
    315315FAIL RTCDtlsTransport must be primary interface of idlTestObjects.dtlsTransport assert_equals: wrong typeof object expected "object" but got "undefined"
    316316FAIL Stringification of idlTestObjects.dtlsTransport assert_equals: wrong typeof object expected "object" but got "undefined"
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/bundle.https-expected.txt

    r264202 r281225  
    11
    22FAIL not negotiating BUNDLE creates two separate ice and dtls transports assert_not_equals: got disallowed value undefined
    3 FAIL bundles on the first transport and closes the second assert_not_equals: got disallowed value undefined
     3PASS bundles on the first transport and closes the second
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/crypto-suite.https-expected.txt

    r264202 r281225  
    11
    22FAIL tlsVersion is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
    3 FAIL tlsVersion is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
     3PASS tlsVersion is acceptable on video-only
    44FAIL dtlsCipher is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
    5 FAIL dtlsCipher is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
     5FAIL dtlsCipher is acceptable on video-only assert_true: expected true got false
    66FAIL srtpCipher is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
    7 FAIL srtpCipher is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
     7PASS srtpCipher is acceptable on video-only
    88FAIL tlsGroup is acceptable on data-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'pc1.sctp.transport')"
    9 FAIL tlsGroup is acceptable on video-only promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'transport.state')"
     9FAIL tlsGroup is acceptable on video-only assert_true: Value present: expected true got false
    1010
  • trunk/Source/ThirdParty/libwebrtc/ChangeLog

    r281030 r281225  
     12021-08-19  Youenn Fablet  <youenn@apple.com>
     2
     3        Add support for RTCDtlsTransport
     4        https://bugs.webkit.org/show_bug.cgi?id=229133
     5
     6        Reviewed by Eric Carlson.
     7
     8        * Configurations/libwebrtc.iOS.exp:
     9        * Configurations/libwebrtc.iOSsim.exp:
     10        * Configurations/libwebrtc.mac.exp:
     11
    1122021-08-13  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp

    r279461 r281225  
    325325__ZNK3rtc13SocketAddresseqERKS0_
    326326__ZNK3rtc9IPAddress5IsNilEv
     327__ZN3rtc12SSLCertChainD1Ev
  • trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp

    r279461 r281225  
    325325__ZNK3rtc13SocketAddresseqERKS0_
    326326__ZNK3rtc9IPAddress5IsNilEv
     327__ZN3rtc12SSLCertChainD1Ev
  • trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp

    r279461 r281225  
    325325__ZNK3rtc13SocketAddresseqERKS0_
    326326__ZNK3rtc9IPAddress5IsNilEv
     327__ZN3rtc12SSLCertChainD1Ev
  • trunk/Source/WebCore/CMakeLists.txt

    r280968 r281225  
    378378    Modules/mediastream/RTCDataChannelEvent.idl
    379379    Modules/mediastream/RTCDegradationPreference.idl
     380    Modules/mediastream/RTCDtlsTransport.idl
     381    Modules/mediastream/RTCDtlsTransportState.idl
    380382    Modules/mediastream/RTCDtxStatus.idl
    381383    Modules/mediastream/RTCEncodedAudioFrame.idl
  • trunk/Source/WebCore/ChangeLog

    r281223 r281225  
     12021-08-19  Youenn Fablet  <youenn@apple.com>
     2
     3        Add support for RTCDtlsTransport
     4        https://bugs.webkit.org/show_bug.cgi?id=229133
     5
     6        Reviewed by Eric Carlson.
     7
     8        RTCDtlsTransport is an object representing the transport used by RTCRtp senders and receivers.
     9        Add WebIDL and backend implementation.
     10        In particular, we set sender/receiver transports as per spec when setting the descriptions.
     11        Add support for state and certificates access. Add support for statechange event.
     12
     13        Covered by rebased tests.
     14
     15        * CMakeLists.txt:
     16        * DerivedSources-input.xcfilelist:
     17        * DerivedSources-output.xcfilelist:
     18        * DerivedSources.make:
     19        * Modules/mediastream/PeerConnectionBackend.cpp:
     20        (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
     21        (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
     22        * Modules/mediastream/PeerConnectionBackend.h:
     23        * Modules/mediastream/RTCDtlsTransport.cpp: Added.
     24        (WebCore::RTCDtlsTransport::RTCDtlsTransport):
     25        (WebCore::RTCDtlsTransport::~RTCDtlsTransport):
     26        (WebCore::RTCDtlsTransport::getRemoteCertificates):
     27        (WebCore::RTCDtlsTransport::stop):
     28        (WebCore::RTCDtlsTransport::virtualHasPendingActivity const):
     29        (WebCore::RTCDtlsTransport::onStateChanged):
     30        (WebCore::RTCDtlsTransport::onError):
     31        * Modules/mediastream/RTCDtlsTransport.h: Added.
     32        * Modules/mediastream/RTCDtlsTransport.idl: Added.
     33        * Modules/mediastream/RTCDtlsTransportBackend.h: Added.
     34        (WebCore::operator==):
     35        * Modules/mediastream/RTCDtlsTransportState.h: Added.
     36        * Modules/mediastream/RTCDtlsTransportState.idl: Added.
     37        * Modules/mediastream/RTCPeerConnection.cpp:
     38        (WebCore::RTCPeerConnection::getOrCreateDtlsTransport):
     39        (WebCore::RTCPeerConnection::updateTransceiverTransports):
     40        (WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription):
     41        (WebCore::RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription):
     42        * Modules/mediastream/RTCPeerConnection.h:
     43        * Modules/mediastream/RTCRtpReceiver.cpp:
     44        * Modules/mediastream/RTCRtpReceiver.h:
     45        * Modules/mediastream/RTCRtpReceiver.idl:
     46        * Modules/mediastream/RTCRtpReceiverBackend.h:
     47        * Modules/mediastream/RTCRtpSender.cpp:
     48        * Modules/mediastream/RTCRtpSender.h:
     49        * Modules/mediastream/RTCRtpSender.idl:
     50        * Modules/mediastream/RTCRtpSenderBackend.h:
     51        * Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp: Added.
     52        (WebCore::toRTCDtlsTransportState):
     53        (WebCore::LibWebRTCDtlsTransportBackendObserver::LibWebRTCDtlsTransportBackendObserver):
     54        (WebCore::LibWebRTCDtlsTransportBackendObserver::updateState):
     55        (WebCore::LibWebRTCDtlsTransportBackendObserver::start):
     56        (WebCore::LibWebRTCDtlsTransportBackendObserver::stop):
     57        (WebCore::LibWebRTCDtlsTransportBackendObserver::OnStateChange):
     58        (WebCore::LibWebRTCDtlsTransportBackendObserver::OnError):
     59        (WebCore::LibWebRTCDtlsTransportBackend::LibWebRTCDtlsTransportBackend):
     60        (WebCore::LibWebRTCDtlsTransportBackend::~LibWebRTCDtlsTransportBackend):
     61        (WebCore::LibWebRTCDtlsTransportBackend::registerClient):
     62        (WebCore::LibWebRTCDtlsTransportBackend::unregisterClient):
     63        * Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h: Added.
     64        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
     65        (WebCore::LibWebRTCRtpReceiverBackend::rtpDtlsTransportBackend):
     66        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h:
     67        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
     68        (WebCore::LibWebRTCRtpSenderBackend::rtpDtlsTransportBackend):
     69        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
     70        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
     71        * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
     72        * Sources.txt:
     73        * WebCore.xcodeproj/project.pbxproj:
     74        * bindings/js/WebCoreBuiltinNames.h:
     75        * dom/EventTargetFactory.in:
     76
    1772021-08-18  David Kilzer  <ddkilzer@apple.com>
    278
  • trunk/Source/WebCore/DerivedSources-input.xcfilelist

    r280968 r281225  
    220220$(PROJECT_DIR)/Modules/mediastream/RTCDataChannelEvent.idl
    221221$(PROJECT_DIR)/Modules/mediastream/RTCDegradationPreference.idl
     222$(PROJECT_DIR)/Modules/mediastream/RTCDtlsTransport.idl
     223$(PROJECT_DIR)/Modules/mediastream/RTCDtlsTransportState.idl
    222224$(PROJECT_DIR)/Modules/mediastream/RTCDtxStatus.idl
    223225$(PROJECT_DIR)/Modules/mediastream/RTCEncodedAudioFrame.idl
     
    727729$(PROJECT_DIR)/css/quirks.css
    728730$(PROJECT_DIR)/css/svg.css
    729 $(PROJECT_DIR)/css/typedom/StylePropertyMap.idl
    730 $(PROJECT_DIR)/css/typedom/StylePropertyMapReadOnly.idl
     731$(PROJECT_DIR)/css/typedom/CSSNumericValue.idl
    731732$(PROJECT_DIR)/css/typedom/CSSStyleImageValue.idl
    732 $(PROJECT_DIR)/css/typedom/CSSNumericValue.idl
    733733$(PROJECT_DIR)/css/typedom/CSSStyleValue.idl
    734734$(PROJECT_DIR)/css/typedom/CSSUnitValue.idl
    735735$(PROJECT_DIR)/css/typedom/CSSUnparsedValue.idl
     736$(PROJECT_DIR)/css/typedom/StylePropertyMap.idl
     737$(PROJECT_DIR)/css/typedom/StylePropertyMapReadOnly.idl
    736738$(PROJECT_DIR)/dom/AbortAlgorithm.idl
    737739$(PROJECT_DIR)/dom/AbortController.idl
  • trunk/Source/WebCore/DerivedSources-output.xcfilelist

    r280968 r281225  
    313313$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNamespaceRule.cpp
    314314$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNamespaceRule.h
     315$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.cpp
     316$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.h
    315317$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSPageRule.cpp
    316318$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSPageRule.h
     
    327329$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleDeclaration.cpp
    328330$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleDeclaration.h
     331$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.cpp
     332$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.h
    329333$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleRule.cpp
    330334$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleRule.h
    331335$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleSheet.cpp
    332336$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleSheet.h
     337$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.cpp
     338$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.h
    333339$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSSupportsRule.cpp
    334340$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSSupportsRule.h
    335341$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSTransition.cpp
    336342$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSTransition.h
     343$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.cpp
     344$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.h
    337345$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnknownRule.cpp
    338346$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnknownRule.h
     347$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.cpp
     348$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.h
    339349$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCacheQueryOptions.cpp
    340350$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCacheQueryOptions.h
     
    16281638$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDegradationPreference.cpp
    16291639$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDegradationPreference.h
     1640$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransport.cpp
     1641$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransport.h
     1642$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransportState.cpp
     1643$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtlsTransportState.h
    16301644$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtxStatus.cpp
    16311645$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCDtxStatus.h
     
    22422256$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTypeConversions.cpp
    22432257$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSTypeConversions.h
    2244 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.cpp
    2245 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleImageValue.h
    2246 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.cpp
    2247 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSNumericValue.h
    2248 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.cpp
    2249 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSStyleValue.h
    2250 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.cpp
    2251 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnitValue.h
    2252 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.cpp
    2253 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSCSSUnparsedValue.h
    22542258$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSUIEvent.cpp
    22552259$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSUIEvent.h
  • trunk/Source/WebCore/DerivedSources.make

    r280968 r281225  
    246246    $(WebCore)/Modules/mediastream/RTCDataChannelEvent.idl \
    247247    $(WebCore)/Modules/mediastream/RTCDegradationPreference.idl \
     248    $(WebCore)/Modules/mediastream/RTCDtlsTransport.idl \
     249    $(WebCore)/Modules/mediastream/RTCDtlsTransportState.idl \
    248250    $(WebCore)/Modules/mediastream/RTCDtxStatus.idl \
    249251    $(WebCore)/Modules/mediastream/RTCEncodedAudioFrame.idl \
  • trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp

    r279335 r281225  
    4141#include "Logging.h"
    4242#include "Page.h"
     43#include "RTCDtlsTransport.h"
    4344#include "RTCIceCandidate.h"
    4445#include "RTCPeerConnection.h"
     
    201202        if (m_peerConnection.isClosed())
    202203            return;
    203 
     204        m_peerConnection.updateTransceiversAfterSuccessfulLocalDescription();
    204205        promise->resolve();
    205206    });
     
    277278            return;
    278279
     280        m_peerConnection.updateTransceiversAfterSuccessfulRemoteDescription();
    279281        promise->resolve();
    280282    });
  • trunk/Source/WebCore/Modules/mediastream/PeerConnectionBackend.h

    r279483 r281225  
    5151class RTCCertificate;
    5252class RTCDataChannelHandler;
     53class RTCDtlsTransport;
     54class RTCDtlsTransportBackend;
    5355class RTCIceCandidate;
    5456class RTCPeerConnection;
  • trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.idl

    r281224 r281225  
    11/*
    2  * Copyright (C) 2018 Apple Inc.
     2 * Copyright (C) 2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2323 */
    2424
    25 #pragma once
    26 
    27 #if ENABLE(WEB_RTC)
    28 
    29 #include "RTCRtpParameters.h"
    30 #include "RTCRtpSynchronizationSource.h"
    31 
    32 namespace WebCore {
    33 
    34 class RTCRtpTransformBackend;
    35 
    36 class RTCRtpReceiverBackend {
    37 public:
    38     virtual ~RTCRtpReceiverBackend() = default;
    39     virtual RTCRtpParameters getParameters() { return { }; }
    40     virtual Vector<RTCRtpContributingSource> getContributingSources() const { return { }; }
    41     virtual Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const { return { }; }
    42     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
     25[
     26    ActiveDOMObject,
     27    Conditional=WEB_RTC,
     28    EnabledBySetting=PeerConnection,
     29    Exposed=(Window),
     30] interface RTCDtlsTransport : EventTarget {
     31  // [SameObject] readonly attribute RTCIceTransport iceTransport;
     32  readonly attribute RTCDtlsTransportState state;
     33  sequence<ArrayBuffer> getRemoteCertificates();
     34  attribute EventHandler onstatechange;
     35  attribute EventHandler onerror;
    4336};
    44 
    45 } // namespace WebCore
    46 
    47 #endif // ENABLE(WEB_RTC)
  • trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportBackend.h

    r281224 r281225  
    11/*
    2  * Copyright (C) 2018 Apple Inc.
     2 * Copyright (C) 2021 Apple Inc.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#if ENABLE(WEB_RTC)
    2828
    29 #include "RTCRtpParameters.h"
    30 #include "RTCRtpSynchronizationSource.h"
     29#include "RTCDtlsTransportState.h"
     30#include <wtf/WeakPtr.h>
     31
     32namespace JSC {
     33class ArrayBuffer;
     34}
    3135
    3236namespace WebCore {
    3337
    34 class RTCRtpTransformBackend;
     38class RTCDtlsTransportBackend {
     39public:
     40    virtual ~RTCDtlsTransportBackend() = default;
    3541
    36 class RTCRtpReceiverBackend {
    37 public:
    38     virtual ~RTCRtpReceiverBackend() = default;
    39     virtual RTCRtpParameters getParameters() { return { }; }
    40     virtual Vector<RTCRtpContributingSource> getContributingSources() const { return { }; }
    41     virtual Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const { return { }; }
    42     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
     42    virtual const void* backend() const = 0;
     43   
     44    class Client : public CanMakeWeakPtr<Client> {
     45    public:
     46        virtual ~Client() = default;
     47        virtual void onStateChanged(RTCDtlsTransportState, Vector<Ref<JSC::ArrayBuffer>>&&) = 0;
     48        virtual void onError() = 0;
     49    };
     50    virtual void registerClient(Client&) = 0;
     51    virtual void unregisterClient() = 0;
    4352};
     53
     54inline bool operator==(const RTCDtlsTransportBackend& a, const RTCDtlsTransportBackend& b)
     55{
     56    return a.backend() == b.backend();
     57}
    4458
    4559} // namespace WebCore
  • trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.h

    r281224 r281225  
    11/*
    2  * Copyright (C) 2018 Apple Inc.
     2 * Copyright (C) 2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#if ENABLE(WEB_RTC)
    2828
    29 #include "RTCRtpParameters.h"
    30 #include "RTCRtpSynchronizationSource.h"
    31 
    32 namespace WebCore {
    33 
    34 class RTCRtpTransformBackend;
    35 
    36 class RTCRtpReceiverBackend {
    37 public:
    38     virtual ~RTCRtpReceiverBackend() = default;
    39     virtual RTCRtpParameters getParameters() { return { }; }
    40     virtual Vector<RTCRtpContributingSource> getContributingSources() const { return { }; }
    41     virtual Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const { return { }; }
    42     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
     29enum class RTCDtlsTransportState {
     30    New,
     31    Connecting,
     32    Connected,
     33    Closed,
     34    Failed
    4335};
    4436
    45 } // namespace WebCore
    46 
    47 #endif // ENABLE(WEB_RTC)
     37#endif
  • trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransportState.idl

    r281224 r281225  
    11/*
    2  * Copyright (C) 2018 Apple Inc.
     2 * Copyright (C) 2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2323 */
    2424
    25 #pragma once
    26 
    27 #if ENABLE(WEB_RTC)
    28 
    29 #include "RTCRtpParameters.h"
    30 #include "RTCRtpSynchronizationSource.h"
    31 
    32 namespace WebCore {
    33 
    34 class RTCRtpTransformBackend;
    35 
    36 class RTCRtpReceiverBackend {
    37 public:
    38     virtual ~RTCRtpReceiverBackend() = default;
    39     virtual RTCRtpParameters getParameters() { return { }; }
    40     virtual Vector<RTCRtpContributingSource> getContributingSources() const { return { }; }
    41     virtual Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const { return { }; }
    42     virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
     25[
     26    Conditional=WEB_RTC,
     27    EnabledBySetting=PeerConnection
     28] enum RTCDtlsTransportState {
     29  "new",
     30  "connecting",
     31  "connected",
     32  "closed",
     33  "failed"
    4334};
    44 
    45 } // namespace WebCore
    46 
    47 #endif // ENABLE(WEB_RTC)
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp

    r278253 r281225  
    5252#include "RTCController.h"
    5353#include "RTCDataChannel.h"
     54#include "RTCDtlsTransport.h"
     55#include "RTCDtlsTransportBackend.h"
    5456#include "RTCIceCandidate.h"
    5557#include "RTCIceCandidateInit.h"
     
    834836}
    835837
     838RefPtr<RTCDtlsTransport> RTCPeerConnection::getOrCreateDtlsTransport(std::unique_ptr<RTCDtlsTransportBackend>&& backend)
     839{
     840    if (!backend)
     841        return nullptr;
     842
     843    auto* context = scriptExecutionContext();
     844    if (!context)
     845        return nullptr;
     846
     847    auto index = m_transports.findMatching([&backend](auto& transport) { return *backend == transport->backend(); });
     848    if (index == notFound) {
     849        index = m_transports.size();
     850        m_transports.append(RTCDtlsTransport::create(*context, makeUniqueRefFromNonNullUniquePtr(WTFMove(backend))));
     851    }
     852
     853    return m_transports[index].copyRef();
     854}
     855
     856void RTCPeerConnection::updateTransceiverTransports()
     857{
     858    for (auto& transceiver : m_transceiverSet->list()) {
     859        auto& sender = transceiver->sender();
     860        if (auto* senderBackend = sender.backend())
     861            sender.setTransport(getOrCreateDtlsTransport(senderBackend->dtlsTransportBackend()));
     862
     863        auto& receiver = transceiver->receiver();
     864        if (auto* receiverBackend = receiver.backend())
     865            receiver.setTransport(getOrCreateDtlsTransport(receiverBackend->dtlsTransportBackend()));
     866    }
     867}
     868
     869// https://w3c.github.io/webrtc-pc/#set-description step 4.9.1
     870void RTCPeerConnection::updateTransceiversAfterSuccessfulLocalDescription()
     871{
     872    updateTransceiverTransports();
     873}
     874
     875// https://w3c.github.io/webrtc-pc/#set-description step 4.9.2
     876void RTCPeerConnection::updateTransceiversAfterSuccessfulRemoteDescription()
     877{
     878    updateTransceiverTransports();
     879}
     880
    836881#if !RELEASE_LOG_DISABLED
    837882WTFLogChannel& RTCPeerConnection::logChannel() const
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h

    r278253 r281225  
    5959class MediaStreamTrack;
    6060class RTCController;
     61class RTCDtlsTransport;
     62class RTCDtlsTransportBackend;
    6163class RTCIceCandidate;
    6264class RTCPeerConnectionErrorCallback;
     
    183185    void doTask(Function<void()>&&);
    184186
     187    void updateTransceiversAfterSuccessfulLocalDescription();
     188    void updateTransceiversAfterSuccessfulRemoteDescription();
     189
    185190#if !RELEASE_LOG_DISABLED
    186191    const Logger& logger() const final { return m_logger.get(); }
     
    224229
    225230    ExceptionOr<Vector<MediaEndpointConfiguration::IceServerInfo>> iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet);
     231
     232    RefPtr<RTCDtlsTransport> getOrCreateDtlsTransport(std::unique_ptr<RTCDtlsTransportBackend>&&);
     233    void updateTransceiverTransports();
    226234
    227235    bool m_isStopped { false };
     
    248256    bool m_hasPendingOperation { false };
    249257    bool m_shouldFireNegotiationNeededOnceOperationChainIsEmpty { false };
     258    Vector<Ref<RTCDtlsTransport>> m_transports;
    250259};
    251260
  • trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.h

    r280179 r281225  
    3434
    3535#include "MediaStreamTrack.h"
     36#include "RTCDtlsTransport.h"
    3637#include "RTCRtpReceiverBackend.h"
    3738#include "RTCRtpSynchronizationSource.h"
     
    7071    MediaStreamTrack& track() { return m_track.get(); }
    7172
     73    RTCDtlsTransport* transport() { return m_transport.get(); }
     74    void setTransport(RefPtr<RTCDtlsTransport>&& transport) { m_transport = WTFMove(transport); }
     75
    7276    RTCRtpReceiverBackend* backend() { return m_backend.get(); }
    7377    void getStats(Ref<DeferredPromise>&&);
     
    8791
    8892    Ref<MediaStreamTrack> m_track;
     93    RefPtr<RTCDtlsTransport> m_transport;
    8994    std::unique_ptr<RTCRtpReceiverBackend> m_backend;
    9095    WeakPtr<PeerConnectionBackend> m_connection;
  • trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl

    r276204 r281225  
    3636] interface RTCRtpReceiver {
    3737    readonly attribute MediaStreamTrack track;
    38     // FIXME 169662: missing transport
    39     // FIXME 169662: missing rtcpTransport
     38    readonly attribute RTCDtlsTransport? transport;
     39
    4040    [CallWith=ScriptExecutionContext] static RTCRtpCapabilities? getCapabilities(DOMString kind);
    4141    RTCRtpParameters getParameters();
  • trunk/Source/WebCore/Modules/mediastream/RTCRtpReceiverBackend.h

    r275819 r281225  
    3232namespace WebCore {
    3333
     34class RTCDtlsTransportBackend;
    3435class RTCRtpTransformBackend;
    3536
     
    4142    virtual Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const { return { }; }
    4243    virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
     44    virtual std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() = 0;
    4345};
    4446
  • trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.h

    r280179 r281225  
    3535#include "JSDOMPromiseDeferred.h"
    3636#include "MediaStreamTrack.h"
     37#include "RTCDtlsTransport.h"
    3738#include "RTCRtpSenderBackend.h"
    3839#include "RTCRtpTransceiverDirection.h"
     
    6465
    6566    MediaStreamTrack* track() { return m_track.get(); }
     67
     68    RTCDtlsTransport* transport() { return m_transport.get(); }
     69    void setTransport(RefPtr<RTCDtlsTransport>&& transport) { m_transport = WTFMove(transport); }
    6670
    6771    const String& trackId() const { return m_trackId; }
     
    104108
    105109    RefPtr<MediaStreamTrack> m_track;
     110    RefPtr<RTCDtlsTransport> m_transport;
    106111    String m_trackId;
    107112    String m_trackKind;
  • trunk/Source/WebCore/Modules/mediastream/RTCRtpSender.idl

    r276204 r281225  
    3636] interface RTCRtpSender {
    3737    readonly attribute MediaStreamTrack? track;
    38     // FIXME 169662: readonly attribute RTCDtlsTransport? transport;
     38    readonly attribute RTCDtlsTransport? transport;
     39
    3940    [CallWith=ScriptExecutionContext] static RTCRtpCapabilities? getCapabilities(DOMString kind);
    4041    RTCRtpSendParameters getParameters();
  • trunk/Source/WebCore/Modules/mediastream/RTCRtpSenderBackend.h

    r275819 r281225  
    3434class MediaStreamTrack;
    3535class RTCDTMFSenderBackend;
     36class RTCDtlsTransportBackend;
    3637class RTCRtpSender;
    3738class RTCRtpTransformBackend;
     
    5253    virtual Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() = 0;
    5354    virtual void setMediaStreamIds(const Vector<String>&) = 0;
     55    virtual std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() = 0;
    5456};
    5557
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.h

    r281224 r281225  
    2525#pragma once
    2626
    27 #if ENABLE(WEB_RTC) && USE(LIBWEBRTC)
     27#if ENABLE(WEB_RTC)
    2828
    2929#include "LibWebRTCMacros.h"
    30 #include "RTCRtpReceiverBackend.h"
     30#include "RTCDtlsTransportBackend.h"
     31#include <wtf/WeakPtr.h>
     32
     33ALLOW_UNUSED_PARAMETERS_BEGIN
     34
    3135#include <webrtc/api/scoped_refptr.h>
    3236
     37ALLOW_UNUSED_PARAMETERS_END
     38
    3339namespace webrtc {
    34 class RtpReceiverInterface;
     40class DtlsTransportInterface;
    3541}
    3642
    3743namespace WebCore {
    38 
    39 class RealtimeMediaSource;
    40 
    41 class LibWebRTCRtpReceiverBackend final : public RTCRtpReceiverBackend {
     44class LibWebRTCDtlsTransportBackendObserver;
     45class LibWebRTCDtlsTransportBackend final : public RTCDtlsTransportBackend, public CanMakeWeakPtr<LibWebRTCDtlsTransportBackend> {
    4246    WTF_MAKE_FAST_ALLOCATED;
    4347public:
    44     explicit LibWebRTCRtpReceiverBackend(rtc::scoped_refptr<webrtc::RtpReceiverInterface>&&);
    45     ~LibWebRTCRtpReceiverBackend();
    46 
    47     webrtc::RtpReceiverInterface* rtcReceiver() { return m_rtcReceiver.get(); }
    48 
    49     Ref<RealtimeMediaSource> createSource();
     48    explicit LibWebRTCDtlsTransportBackend(rtc::scoped_refptr<webrtc::DtlsTransportInterface>&&);
     49    ~LibWebRTCDtlsTransportBackend();
    5050
    5151private:
    52     RTCRtpParameters getParameters() final;
    53     Vector<RTCRtpContributingSource> getContributingSources() const final;
    54     Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const final;
    55     Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() final;
     52    // RTCDtlsTransportBackend
     53    const void* backend() const final { return m_backend.get(); }
     54    void registerClient(Client&) final;
     55    void unregisterClient() final;
    5656
    57     rtc::scoped_refptr<webrtc::RtpReceiverInterface> m_rtcReceiver;
    58     RefPtr<RTCRtpTransformBackend> m_transformBackend;
     57    rtc::scoped_refptr<webrtc::DtlsTransportInterface> m_backend;
     58    RefPtr<LibWebRTCDtlsTransportBackendObserver> m_observer;
    5959};
    6060
    6161} // namespace WebCore
    6262
    63 #endif // ENABLE(WEB_RTC) && USE(LIBWEBRTC)
     63#endif // ENABLE(WEB_RTC)
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp

    r278701 r281225  
    2626#include "LibWebRTCRtpReceiverBackend.h"
    2727
     28#include "LibWebRTCDtlsTransportBackend.h"
    2829#include "LibWebRTCRtpReceiverTransformBackend.h"
    2930#include "LibWebRTCUtils.h"
     
    125126}
    126127
     128std::unique_ptr<RTCDtlsTransportBackend> LibWebRTCRtpReceiverBackend::dtlsTransportBackend()
     129{
     130    auto backend = m_rtcReceiver->dtls_transport();
     131    return backend ? makeUnique<LibWebRTCDtlsTransportBackend>(WTFMove(backend)) : nullptr;
     132}
     133
    127134} // namespace WebCore
    128135
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.h

    r275819 r281225  
    5454    Vector<RTCRtpSynchronizationSource> getSynchronizationSources() const final;
    5555    Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() final;
     56    std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() final;
    5657
    5758    rtc::scoped_refptr<webrtc::RtpReceiverInterface> m_rtcReceiver;
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp

    r278185 r281225  
    3030#include "JSDOMPromiseDeferred.h"
    3131#include "LibWebRTCDTMFSenderBackend.h"
     32#include "LibWebRTCDtlsTransportBackend.h"
    3233#include "LibWebRTCPeerConnectionBackend.h"
    3334#include "LibWebRTCRtpSenderTransformBackend.h"
     
    168169}
    169170
     171std::unique_ptr<RTCDtlsTransportBackend> LibWebRTCRtpSenderBackend::dtlsTransportBackend()
     172{
     173    auto backend = m_rtcSender->dtls_transport();
     174    return backend ? makeUnique<LibWebRTCDtlsTransportBackend>(WTFMove(backend)) : nullptr;
     175}
     176
    170177void LibWebRTCRtpSenderBackend::setMediaStreamIds(const Vector<String>& streamIds)
    171178{
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h

    r278253 r281225  
    6767    std::unique_ptr<RTCDTMFSenderBackend> createDTMFBackend() final;
    6868    Ref<RTCRtpTransformBackend> rtcRtpTransformBackend() final;
     69    std::unique_ptr<RTCDtlsTransportBackend> dtlsTransportBackend() final;
    6970    void setMediaStreamIds(const Vector<String>&) final;
    7071
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp

    r278253 r281225  
    2929
    3030#include "LibWebRTCMacros.h"
     31#include "RTCDtlsTransportState.h"
    3132#include "RTCIceCandidate.h"
    3233#include "RTCPeerConnection.h"
  • trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.h

    r276717 r281225  
    3737class RTCError;
    3838
     39enum class DtlsTransportState;
    3940enum class Priority;
    4041enum class RTCErrorType;
     
    6869webrtc::Priority fromRTCPriorityType(RTCPriorityType);
    6970
    70 
    7171inline String fromStdString(const std::string& value)
    7272{
  • trunk/Source/WebCore/Sources.txt

    r280968 r281225  
    162162Modules/mediastream/RTCDataChannelRemoteHandler.cpp
    163163Modules/mediastream/RTCDataChannelRemoteSource.cpp
     164Modules/mediastream/RTCDtlsTransport.cpp
    164165Modules/mediastream/RTCEncodedAudioFrame.cpp
    165166Modules/mediastream/RTCEncodedFrame.cpp
     
    187188Modules/mediastream/UserMediaRequest.cpp
    188189Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp
     190Modules/mediastream/libwebrtc/LibWebRTCDtlsTransportBackend.cpp
    189191Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverTransformBackend.cpp
    190192Modules/mediastream/libwebrtc/LibWebRTCRtpSenderTransformBackend.cpp
     
    32963298JSRTCDegradationPreference.cpp
    32973299JSRTCDtxStatus.cpp
     3300JSRTCDtlsTransport.cpp
     3301JSRTCDtlsTransportState.cpp
    32983302JSRTCEncodedAudioFrame.cpp
    32993303JSRTCEncodedVideoFrame.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r281061 r281225  
    11441144                4186BD4E2140B9E80001826F /* LibWebRTCRtpTransceiverBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4186BD4D2140B9E80001826F /* LibWebRTCRtpTransceiverBackend.cpp */; };
    11451145                41885B9311B6FDA6003383BB /* FormSubmission.h in Headers */ = {isa = PBXBuildFile; fileRef = 41885B9111B6FDA6003383BB /* FormSubmission.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1146                4188D55C26C54D6F004858C8 /* RTCDtlsTransportBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 4188D55A26C54D6F004858C8 /* RTCDtlsTransportBackend.h */; };
     1147                4188D56326C551B1004858C8 /* RTCDtlsTransportState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4188D56226C551B1004858C8 /* RTCDtlsTransportState.h */; };
    11461148                418938B22429F9B4007FDC41 /* RetrieveRecordsOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 418938AF2429F9AB007FDC41 /* RetrieveRecordsOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
    11471149                418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 418A06CE133C04D500CD379C /* EventDispatcher.h */; };
     
    79287930                41885B9111B6FDA6003383BB /* FormSubmission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormSubmission.h; sourceTree = "<group>"; };
    79297931                41885B9211B6FDA6003383BB /* FormSubmission.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormSubmission.cpp; sourceTree = "<group>"; };
     7932                4188D55A26C54D6F004858C8 /* RTCDtlsTransportBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDtlsTransportBackend.h; sourceTree = "<group>"; };
     7933                4188D55D26C5511A004858C8 /* RTCDtlsTransport.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = RTCDtlsTransport.idl; sourceTree = "<group>"; };
     7934                4188D55E26C5511A004858C8 /* RTCDtlsTransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RTCDtlsTransport.h; sourceTree = "<group>"; };
     7935                4188D55F26C5511A004858C8 /* RTCDtlsTransport.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RTCDtlsTransport.cpp; sourceTree = "<group>"; };
     7936                4188D56026C55166004858C8 /* RTCDtlsTransportState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCDtlsTransportState.idl; sourceTree = "<group>"; };
     7937                4188D56226C551B1004858C8 /* RTCDtlsTransportState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDtlsTransportState.h; sourceTree = "<group>"; };
     7938                4188D56426C5530B004858C8 /* LibWebRTCDtlsTransportBackend.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibWebRTCDtlsTransportBackend.cpp; path = libwebrtc/LibWebRTCDtlsTransportBackend.cpp; sourceTree = "<group>"; };
     7939                4188D56526C5530B004858C8 /* LibWebRTCDtlsTransportBackend.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibWebRTCDtlsTransportBackend.h; path = libwebrtc/LibWebRTCDtlsTransportBackend.h; sourceTree = "<group>"; };
    79307940                418938AF2429F9AB007FDC41 /* RetrieveRecordsOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RetrieveRecordsOptions.h; sourceTree = "<group>"; };
    79317941                418A06CE133C04D500CD379C /* EventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcher.h; sourceTree = "<group>"; };
     
    1714717157                                41FCB75D214866FE0038ADC6 /* RTCDegradationPreference.h */,
    1714817158                                41FCB755214865CF0038ADC6 /* RTCDegradationPreference.idl */,
     17159                                4188D55F26C5511A004858C8 /* RTCDtlsTransport.cpp */,
     17160                                4188D55E26C5511A004858C8 /* RTCDtlsTransport.h */,
     17161                                4188D55D26C5511A004858C8 /* RTCDtlsTransport.idl */,
     17162                                4188D55A26C54D6F004858C8 /* RTCDtlsTransportBackend.h */,
     17163                                4188D56226C551B1004858C8 /* RTCDtlsTransportState.h */,
     17164                                4188D56026C55166004858C8 /* RTCDtlsTransportState.idl */,
    1714917165                                07221B6917CEC32700848E51 /* RTCDTMFSender.cpp */,
    1715017166                                07221B6A17CEC32700848E51 /* RTCDTMFSender.h */,
     
    1928919305                                5CDD833F1E43253D00621E92 /* LibWebRTCDataChannelHandler.cpp */,
    1929019306                                5CDD83401E43253D00621E92 /* LibWebRTCDataChannelHandler.h */,
     19307                                4188D56426C5530B004858C8 /* LibWebRTCDtlsTransportBackend.cpp */,
     19308                                4188D56526C5530B004858C8 /* LibWebRTCDtlsTransportBackend.h */,
    1929119309                                417612AB1E3A993B00C3D81D /* LibWebRTCMediaEndpoint.cpp */,
    1929219310                                417612AC1E3A993B00C3D81D /* LibWebRTCMediaEndpoint.h */,
     
    3431934337                                416EDC042600E81000092675 /* RTCDataChannelRemoteSourceConnection.h in Headers */,
    3432034338                                316DE7021E83AE1D0084C261 /* RTCDataChannelState.h in Headers */,
     34339                                4188D55C26C54D6F004858C8 /* RTCDtlsTransportBackend.h in Headers */,
     34340                                4188D56326C551B1004858C8 /* RTCDtlsTransportState.h in Headers */,
    3432134341                                078E092017D14D1C00420AA1 /* RTCDTMFSender.h in Headers */,
    3432234342                                078E092117D14D1C00420AA1 /* RTCDTMFToneChangeEvent.h in Headers */,
  • trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h

    r280958 r281225  
    192192    macro(RTCDataChannel) \
    193193    macro(RTCDataChannelEvent) \
     194    macro(RTCDtlsTransport) \
    194195    macro(RTCEncodedAudioFrame) \
    195196    macro(RTCEncodedVideoFrame) \
  • trunk/Source/WebCore/dom/EventTargetFactory.in

    r280958 r281225  
    3939RemotePlayback conditional=WIRELESS_PLAYBACK_TARGET
    4040RTCDataChannel conditional=WEB_RTC
     41RTCDtlsTransport conditional=WEB_RTC
    4142RTCDTMFSender conditional=WEB_RTC
    4243RTCPeerConnection conditional=WEB_RTC
Note: See TracChangeset for help on using the changeset viewer.