Remove unified plan runtime flag
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 15:15:01 +0000 (15:15 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2019 15:15:01 +0000 (15:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202721

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by existing tests.

* Modules/mediastream/RTCRtpSender.cpp:
(WebCore::RTCRtpSender::RTCRtpSender):
* Modules/mediastream/RTCRtpTransceiver.idl:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
(WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
(WebCore::LibWebRTCMediaEndpoint::OnTrack):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::LibWebRTCPeerConnectionBackend::addTrack):
(WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):
(WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
(WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebRTCVP8CodecEnabled):
* testing/Internals.cpp:
(WebCore::Internals::useMockRTCPeerConnectionFactory):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsConstructed): Remove ability to disable unified plan.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250969 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCRtpSender.cpp
Source/WebCore/Modules/mediastream/RTCRtpTransceiver.idl
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/testing/Internals.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp

index da8e8b3..3468950 100644 (file)
@@ -1,3 +1,35 @@
+2019-10-10  youenn fablet  <youenn@apple.com>
+
+        Remove unified plan runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=202721
+
+        Reviewed by Geoffrey Garen.
+
+        Covered by existing tests.
+
+        * Modules/mediastream/RTCRtpSender.cpp:
+        (WebCore::RTCRtpSender::RTCRtpSender):
+        * Modules/mediastream/RTCRtpTransceiver.idl:
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
+        (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
+        (WebCore::LibWebRTCMediaEndpoint::addTrack):
+        (WebCore::LibWebRTCMediaEndpoint::doCreateOffer):
+        (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
+        (WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
+        (WebCore::LibWebRTCMediaEndpoint::OnTrack):
+        * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
+        (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
+        (WebCore::LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind):
+        (WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
+        * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
+        (WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setWebRTCVP8CodecEnabled):
+        * testing/Internals.cpp:
+        (WebCore::Internals::useMockRTCPeerConnectionFactory):
+
 2019-10-10  Chris Dumez  <cdumez@apple.com>
 
         DOMCacheStorage should not prevent pages from entering the back/forward cache
index 2a66ff4..aa89e7b 100644 (file)
@@ -63,7 +63,7 @@ RTCRtpSender::RTCRtpSender(PeerConnectionBackend& connection, String&& trackKind
     , m_backend(WTFMove(backend))
     , m_connection(makeWeakPtr(&connection))
 {
-    ASSERT(!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled() || m_backend);
+    ASSERT(m_backend);
 }
 
 RTCRtpSender::~RTCRtpSender() = default;
index ef59b02..cb3ca12 100644 (file)
@@ -40,7 +40,7 @@ typedef RTCRtpTransceiverDirection RtpTransceiverDirection;
     [SameObject] readonly attribute RTCRtpReceiver receiver;
     readonly attribute boolean stopped;
     attribute RtpTransceiverDirection direction;
-    [EnabledAtRuntime=WebRTCUnifiedPlan] readonly attribute RTCRtpTransceiverDirection? currentDirection;
+    readonly attribute RTCRtpTransceiverDirection? currentDirection;
     void stop();
     // FIXME 169662: missing setCodecPreferences
 };
index d052b8f..2cf5efe 100644 (file)
@@ -83,8 +83,7 @@ LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint(LibWebRTCPeerConnectionBackend& p
 
 bool LibWebRTCMediaEndpoint::setConfiguration(LibWebRTCProvider& client, webrtc::PeerConnectionInterface::RTCConfiguration&& configuration)
 {
-    if (RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        configuration.sdp_semantics = webrtc::SdpSemantics::kUnifiedPlan;
+    configuration.sdp_semantics = webrtc::SdpSemantics::kUnifiedPlan;
 
     if (!m_backend) {
         if (!m_rtcSocketFactory) {
@@ -221,15 +220,6 @@ bool LibWebRTCMediaEndpoint::addTrack(LibWebRTCRtpSenderBackend& sender, MediaSt
 {
     ASSERT(m_backend);
 
-    if (!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled()) {
-        String mediaStreamId = mediaStreamIds.isEmpty() ? createCanonicalUUIDString() : mediaStreamIds[0];
-        m_localStreams.ensure(mediaStreamId, [&] {
-            auto mediaStream = m_peerConnectionFactory.CreateLocalMediaStream(mediaStreamId.utf8().data());
-            m_backend->AddStream(mediaStream);
-            return mediaStream;
-        });
-    }
-
     LibWebRTCRtpSenderBackend::Source source;
     rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> rtcTrack;
     switch (track.privateTrack().type()) {
@@ -283,12 +273,6 @@ void LibWebRTCMediaEndpoint::doCreateOffer(const RTCOfferOptions& options)
     rtcOptions.ice_restart = options.iceRestart;
     rtcOptions.voice_activity_detection = options.voiceActivityDetection;
 
-    if (!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled()) {
-        if (m_peerConnectionBackend.shouldOfferAllowToReceive("audio"_s))
-            rtcOptions.offer_to_receive_audio = webrtc::PeerConnectionInterface::RTCOfferAnswerOptions::kOfferToReceiveMediaTrue;
-        if (m_peerConnectionBackend.shouldOfferAllowToReceive("video"_s))
-            rtcOptions.offer_to_receive_video = webrtc::PeerConnectionInterface::RTCOfferAnswerOptions::kOfferToReceiveMediaTrue;
-    }
     m_backend->CreateOffer(&m_createSessionDescriptionObserver, rtcOptions);
 }
 
@@ -476,9 +460,6 @@ void LibWebRTCMediaEndpoint::collectTransceivers()
     if (!m_backend)
         return;
 
-    if (!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        return;
-
     for (auto& rtcTransceiver : m_backend->GetTransceivers()) {
         auto* existingTransceiver = m_peerConnectionBackend.existingTransceiver([&](auto& transceiverBackend) {
             return rtcTransceiver.get() == transceiverBackend.rtcTransceiver();
@@ -519,10 +500,6 @@ void LibWebRTCMediaEndpoint::newTransceiver(rtc::scoped_refptr<webrtc::RtpTransc
 
 void LibWebRTCMediaEndpoint::removeRemoteTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>&& receiver)
 {
-    // FIXME: Support plan B code path.
-    if (!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        return;
-
     auto* transceiver = m_peerConnectionBackend.existingTransceiver([&receiver](auto& transceiverBackend) {
         auto* rtcTransceiver = transceiverBackend.rtcTransceiver();
         return rtcTransceiver && receiver.get() == rtcTransceiver->receiver().get();
@@ -630,23 +607,8 @@ void LibWebRTCMediaEndpoint::OnRemoveStream(rtc::scoped_refptr<webrtc::MediaStre
     });
 }
 
-void LibWebRTCMediaEndpoint::OnAddTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface> receiver, const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>& streams)
-{
-    if (RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        return;
-
-    callOnMainThread([protectedThis = makeRef(*this), receiver = WTFMove(receiver), streams]() mutable {
-        if (protectedThis->isStopped())
-            return;
-        protectedThis->addRemoteTrack(WTFMove(receiver), streams);
-    });
-}
-
 void LibWebRTCMediaEndpoint::OnTrack(rtc::scoped_refptr<webrtc::RtpTransceiverInterface> transceiver)
 {
-    if (!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        return;
-
     callOnMainThread([protectedThis = makeRef(*this), transceiver = WTFMove(transceiver)]() mutable {
         if (protectedThis->isStopped())
             return;
index 828e8ea..bfa7fd6 100644 (file)
@@ -124,7 +124,6 @@ private:
     void OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface>) final;
     void OnRemoveStream(rtc::scoped_refptr<webrtc::MediaStreamInterface>) final;
     void OnDataChannel(rtc::scoped_refptr<webrtc::DataChannelInterface>) final;
-    void OnAddTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>, const std::vector<rtc::scoped_refptr<webrtc::MediaStreamInterface>>&) final;
     void OnTrack(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>) final;
     void OnRemoveTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface>) final;
 
index fe70a13..dca71ed 100644 (file)
@@ -409,62 +409,28 @@ static inline RefPtr<RTCRtpSender> findExistingSender(const Vector<RefPtr<RTCRtp
 
 ExceptionOr<Ref<RTCRtpSender>> LibWebRTCPeerConnectionBackend::addTrack(MediaStreamTrack& track, Vector<String>&& mediaStreamIds)
 {
-    if (RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled()) {
-        auto senderBackend = makeUnique<LibWebRTCRtpSenderBackend>(*this, nullptr);
-        if (!m_endpoint->addTrack(*senderBackend, track, mediaStreamIds))
-            return Exception { TypeError, "Unable to add track"_s };
-
-        if (auto sender = findExistingSender(m_peerConnection.currentTransceivers(), *senderBackend)) {
-            backendFromRTPSender(*sender).takeSource(*senderBackend);
-            sender->setTrack(makeRef(track));
-            sender->setMediaStreamIds(WTFMove(mediaStreamIds));
-            return sender.releaseNonNull();
-        }
-
-        auto transceiverBackend = m_endpoint->transceiverBackendFromSender(*senderBackend);
-
-        auto sender = RTCRtpSender::create(*this, makeRef(track), WTFMove(mediaStreamIds), WTFMove(senderBackend));
-        auto receiver = createReceiverForSource(createEmptySource(track.kind(), createCanonicalUUIDString()), transceiverBackend->createReceiverBackend());
-        auto transceiver = RTCRtpTransceiver::create(sender.copyRef(), WTFMove(receiver), WTFMove(transceiverBackend));
-        m_peerConnection.addInternalTransceiver(WTFMove(transceiver));
-        return sender;
-    }
-
-    RTCRtpSender* sender = nullptr;
-    // Reuse an existing sender with the same track kind if it has never been used to send before.
-    for (auto& transceiver : m_peerConnection.currentTransceivers()) {
-        auto& existingSender = transceiver->sender();
-        if (!existingSender.isStopped() && existingSender.trackKind() == track.kind() && existingSender.trackId().isNull() && !transceiver->hasSendingDirection()) {
-            existingSender.setTrack(makeRef(track));
-            existingSender.setMediaStreamIds(WTFMove(mediaStreamIds));
-            transceiver->enableSendingDirection();
-            sender = &existingSender;
-
-            break;
-        }
-    }
-
-    if (!sender) {
-        const String& trackKind = track.kind();
-        String trackId = createCanonicalUUIDString();
-
-        auto senderBackend = makeUnique<LibWebRTCRtpSenderBackend>(*this, nullptr);
-        auto newSender = RTCRtpSender::create(*this, makeRef(track), Vector<String> { mediaStreamIds }, WTFMove(senderBackend));
-        auto receiver = createReceiver(trackKind, trackId);
-        auto transceiver = RTCRtpTransceiver::create(WTFMove(newSender), WTFMove(receiver), nullptr);
+    auto senderBackend = makeUnique<LibWebRTCRtpSenderBackend>(*this, nullptr);
+    if (!m_endpoint->addTrack(*senderBackend, track, mediaStreamIds))
+        return Exception { TypeError, "Unable to add track"_s };
 
-        sender = &transceiver->sender();
-        m_peerConnection.addInternalTransceiver(WTFMove(transceiver));
+    if (auto sender = findExistingSender(m_peerConnection.currentTransceivers(), *senderBackend)) {
+        backendFromRTPSender(*sender).takeSource(*senderBackend);
+        sender->setTrack(makeRef(track));
+        sender->setMediaStreamIds(WTFMove(mediaStreamIds));
+        return sender.releaseNonNull();
     }
 
-    if (!m_endpoint->addTrack(backendFromRTPSender(*sender), track, mediaStreamIds))
-        return Exception { TypeError, "Unable to add track"_s };
+    auto transceiverBackend = m_endpoint->transceiverBackendFromSender(*senderBackend);
 
-    return makeRef(*sender);
+    auto sender = RTCRtpSender::create(*this, makeRef(track), WTFMove(mediaStreamIds), WTFMove(senderBackend));
+    auto receiver = createReceiverForSource(createEmptySource(track.kind(), createCanonicalUUIDString()), transceiverBackend->createReceiverBackend());
+    auto transceiver = RTCRtpTransceiver::create(sender.copyRef(), WTFMove(receiver), WTFMove(transceiverBackend));
+    m_peerConnection.addInternalTransceiver(WTFMove(transceiver));
+    return sender;
 }
 
 template<typename T>
-ExceptionOr<Ref<RTCRtpTransceiver>> LibWebRTCPeerConnectionBackend::addUnifiedPlanTransceiver(T&& trackOrKind, const RTCRtpTransceiverInit& init)
+ExceptionOr<Ref<RTCRtpTransceiver>> LibWebRTCPeerConnectionBackend::addTransceiverFromTrackOrKind(T&& trackOrKind, const RTCRtpTransceiverInit& init)
 {
     auto backends = m_endpoint->addTransceiver(trackOrKind, init);
     if (!backends)
@@ -479,26 +445,12 @@ ExceptionOr<Ref<RTCRtpTransceiver>> LibWebRTCPeerConnectionBackend::addUnifiedPl
 
 ExceptionOr<Ref<RTCRtpTransceiver>> LibWebRTCPeerConnectionBackend::addTransceiver(const String& trackKind, const RTCRtpTransceiverInit& init)
 {
-    if (RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        return addUnifiedPlanTransceiver(String { trackKind }, init);
-
-    auto senderBackend = makeUnique<LibWebRTCRtpSenderBackend>(*this, nullptr);
-    auto newSender = RTCRtpSender::create(*this, String(trackKind), Vector<String>(), WTFMove(senderBackend));
-    return completeAddTransceiver(WTFMove(newSender), init, createCanonicalUUIDString(), trackKind);
+    return addTransceiverFromTrackOrKind(String { trackKind }, init);
 }
 
 ExceptionOr<Ref<RTCRtpTransceiver>> LibWebRTCPeerConnectionBackend::addTransceiver(Ref<MediaStreamTrack>&& track, const RTCRtpTransceiverInit& init)
 {
-    if (RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled())
-        return addUnifiedPlanTransceiver(WTFMove(track), init);
-
-    auto senderBackend = makeUnique<LibWebRTCRtpSenderBackend>(*this, nullptr);
-    auto& backend = *senderBackend;
-    auto sender = RTCRtpSender::create(*this, track.copyRef(), Vector<String>(), WTFMove(senderBackend));
-    if (!m_endpoint->addTrack(backend, track, Vector<String> { }))
-        return Exception { InvalidAccessError, "Unable to add track"_s };
-
-    return completeAddTransceiver(WTFMove(sender), init, track->id(), track->kind());
+    return addTransceiverFromTrackOrKind(WTFMove(track), init);
 }
 
 void LibWebRTCPeerConnectionBackend::setSenderSourceFromTrack(LibWebRTCRtpSenderBackend& sender, MediaStreamTrack& track)
@@ -559,26 +511,6 @@ void LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources()
     }
 }
 
-bool LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive(const char* kind) const
-{
-    ASSERT(!RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled());
-    for (const auto& transceiver : m_peerConnection.currentTransceivers()) {
-        if (transceiver->sender().trackKind() != kind)
-            continue;
-
-        if (transceiver->direction() == RTCRtpTransceiverDirection::Recvonly)
-            return true;
-
-        if (transceiver->direction() != RTCRtpTransceiverDirection::Sendrecv)
-            continue;
-
-        auto* backend = static_cast<LibWebRTCRtpSenderBackend*>(transceiver->sender().backend());
-        if (backend && !backend->rtcSender())
-            return true;
-    }
-    return false;
-}
-
 } // namespace WebCore
 
 #endif // USE(LIBWEBRTC)
index 5933c8a..8b32469 100644 (file)
@@ -57,8 +57,6 @@ public:
 
     void replaceTrack(RTCRtpSender&, RefPtr<MediaStreamTrack>&&, DOMPromiseDeferred<void>&&);
 
-    bool shouldOfferAllowToReceive(const char*) const;
-
 private:
     void doCreateOffer(RTCOfferOptions&&) final;
     void doCreateAnswer(RTCAnswerOptions&&) final;
@@ -120,7 +118,7 @@ private:
     Ref<RTCRtpReceiver> createReceiver(const String& trackKind, const String& trackId);
 
     template<typename T>
-    ExceptionOr<Ref<RTCRtpTransceiver>> addUnifiedPlanTransceiver(T&& trackOrKind, const RTCRtpTransceiverInit&);
+    ExceptionOr<Ref<RTCRtpTransceiver>> addTransceiverFromTrackOrKind(T&& trackOrKind, const RTCRtpTransceiverInit&);
 
     Ref<RTCRtpReceiver> createReceiverForSource(Ref<RealtimeMediaSource>&&, std::unique_ptr<RTCRtpReceiverBackend>&&);
 
index 894258b..2f21f7d 100644 (file)
@@ -98,18 +98,8 @@ void LibWebRTCRtpSenderBackend::replaceTrack(ScriptExecutionContext& context, RT
             return;
         }
 
-        if (RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled()) {
-            m_source = nullptr;
-            m_peerConnectionBackend->setSenderSourceFromTrack(*this, *protectedSender->track());
-            promise.resolve();
-            return;
-        }
-
-        auto result = m_peerConnectionBackend->addTrack(*protectedSender->track(), { });
-        if (result.hasException()) {
-            promise.reject(result.releaseException());
-            return;
-        }
+        m_source = nullptr;
+        m_peerConnectionBackend->setSenderSourceFromTrack(*this, *protectedSender->track());
         promise.resolve();
     });
 }
index 994c43f..3bbbb14 100644 (file)
@@ -233,8 +233,6 @@ public:
     void setWebRTCDTMFEnabled(bool isEnabled) { m_isWebRTCDTMFEnabled = isEnabled; }
     bool webRTCVP8CodecEnabled() const { return m_isWebRTCVP8CodecEnabled; }
     void setWebRTCVP8CodecEnabled(bool isEnabled) { m_isWebRTCVP8CodecEnabled = isEnabled; }
-    bool webRTCUnifiedPlanEnabled() const { return m_isWebRTCUnifiedPlanEnabled; }
-    void setWebRTCUnifiedPlanEnabled(bool isEnabled) { m_isWebRTCUnifiedPlanEnabled = isEnabled; }
     bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
     void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
     bool webRTCMDNSICECandidatesEnabled() const { return m_isWebRTCMDNSICECandidatesEnabled; }
@@ -469,7 +467,6 @@ private:
 #if ENABLE(WEB_RTC)
     bool m_isWebRTCDTMFEnabled { true };
     bool m_isWebRTCVP8CodecEnabled { true };
-    bool m_isWebRTCUnifiedPlanEnabled { true };
     bool m_isPeerConnectionEnabled { true };
     bool m_isWebRTCMDNSICECandidatesEnabled { false };
     bool m_isWebRTCH264SimulcastEnabled { true };
index 6da1cf3..f12249e 100644 (file)
@@ -1468,7 +1468,6 @@ void Internals::emulateRTCPeerConnectionPlatformEvent(RTCPeerConnection& connect
 
 void Internals::useMockRTCPeerConnectionFactory(const String& testCase)
 {
-    ASSERT(RuntimeEnabledFeatures::sharedFeatures().webRTCUnifiedPlanEnabled());
     if (!LibWebRTCProvider::webRTCAvailable())
         return;
 
index e75f215..95f0cc9 100644 (file)
@@ -1,3 +1,14 @@
+2019-10-10  youenn fablet  <youenn@apple.com>
+
+        Remove unified plan runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=202721
+
+        Reviewed by Geoffrey Garen.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/glib/WebKitSettings.cpp:
+        (webKitSettingsConstructed): Remove ability to disable unified plan.
+
 2019-10-10  Adrian Perez de Castro  <aperez@igalia.com>
 
         Remove a "The " in "The The HTTP headers of the response"
index edba9d2..7418948 100644 (file)
@@ -556,15 +556,6 @@ InterruptAudioOnPageVisibilityChangeEnabled:
   webcoreBinding: RuntimeEnabledFeatures
   condition: ENABLE(MEDIA_STREAM)
 
-WebRTCUnifiedPlanEnabled:
-  type: bool
-  defaultValue: true
-  webcoreBinding: RuntimeEnabledFeatures
-  condition: ENABLE(WEB_RTC)
-  humanReadableName: "WebRTC Unified Plan"
-  humanReadableDescription: "Use WebRTC Unified Plan"
-  category: internal
-
 WebRTCVP8CodecEnabled:
   type: bool
   defaultValue: true
index 0a4b44a..f25bc8e 100644 (file)
@@ -185,9 +185,6 @@ static void webKitSettingsConstructed(GObject* object)
     WebPreferences* prefs = settings->priv->preferences.get();
     prefs->setShouldRespectImageOrientation(true);
 
-    if (g_getenv("WEBKIT_WEBRTC_DISABLE_UNIFIED_PLAN"))
-        prefs->setWebRTCUnifiedPlanEnabled(FALSE);
-
     bool mediaStreamEnabled = prefs->mediaStreamEnabled();
     prefs->setMediaDevicesEnabled(mediaStreamEnabled);
     prefs->setPeerConnectionEnabled(mediaStreamEnabled);