Make mDNS ICE Candidate an experimental flag again
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 01:57:39 +0000 (01:57 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 01:57:39 +0000 (01:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191262

Reviewed by Dean Jackson.

Source/WebCore:

Rename mdnsICECandidatesEnabled to webRTCICECandidatesEnabled.
This allows grouping the WebRTC runtime flags.
No change of behavior.

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::newICECandidate):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webRTCMDNSICECandidatesEnabled const):
(WebCore::RuntimeEnabledFeatures::setWebRTCMDNSICECandidatesEnabled):
(WebCore::RuntimeEnabledFeatures::mdnsICECandidatesEnabled const): Deleted.
(WebCore::RuntimeEnabledFeatures::setMDNSICECandidatesEnabled): Deleted.

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebRTCMDNSICECandidatesEnabled):
(WKPreferencesGetWebRTCMDNSICECandidatesEnabled):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled):
(WTR::TestRunner::setMDNSICECandidatesEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

* webrtc/datachannel/mdns-ice-candidates.html:

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

13 files changed:
LayoutTests/ChangeLog
LayoutTests/webrtc/datachannel/mdns-ice-candidates.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

index 883bbc6..6db52eb 100644 (file)
@@ -1,3 +1,12 @@
+2018-11-06  Youenn Fablet  <youenn@apple.com>
+
+        Make mDNS ICE Candidate an experimental flag again
+        https://bugs.webkit.org/show_bug.cgi?id=191262
+
+        Reviewed by Dean Jackson.
+
+        * webrtc/datachannel/mdns-ice-candidates.html:
+
 2018-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Implement text-underline-offset and text-decoration-thickness
index c6576d9..64ecb80 100644 (file)
@@ -10,7 +10,7 @@
     <script src ="../routines.js"></script>
     <script>
 if (window.testRunner)
-    testRunner.setMDNSICECandidatesEnabled(true);
+    testRunner.setWebRTCMDNSICECandidatesEnabled(true);
 if (window.internals)
     internals.setICECandidateFiltering(true);
 
index f82f1ae..600402e 100644 (file)
@@ -1,3 +1,22 @@
+2018-11-06  Youenn Fablet  <youenn@apple.com>
+
+        Make mDNS ICE Candidate an experimental flag again
+        https://bugs.webkit.org/show_bug.cgi?id=191262
+
+        Reviewed by Dean Jackson.
+
+        Rename mdnsICECandidatesEnabled to webRTCICECandidatesEnabled.
+        This allows grouping the WebRTC runtime flags.
+        No change of behavior.
+
+        * Modules/mediastream/PeerConnectionBackend.cpp:
+        (WebCore::PeerConnectionBackend::newICECandidate):
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::webRTCMDNSICECandidatesEnabled const):
+        (WebCore::RuntimeEnabledFeatures::setWebRTCMDNSICECandidatesEnabled):
+        (WebCore::RuntimeEnabledFeatures::mdnsICECandidatesEnabled const): Deleted.
+        (WebCore::RuntimeEnabledFeatures::setMDNSICECandidatesEnabled): Deleted.
+
 2018-11-06  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Implement text-underline-offset and text-decoration-thickness
index 2e69d8e..8ba1a40 100644 (file)
@@ -406,7 +406,7 @@ void PeerConnectionBackend::newICECandidate(String&& sdp, String&& mid, unsigned
     if (sdp.find(" host ", 0) != notFound) {
         // FIXME: We might need to clear all pending candidates when setting again local description.
         m_pendingICECandidates.append(PendingICECandidate { String { sdp }, WTFMove(mid), sdpMLineIndex, WTFMove(serverURL) });
-        if (RuntimeEnabledFeatures::sharedFeatures().mdnsICECandidatesEnabled()) {
+        if (RuntimeEnabledFeatures::sharedFeatures().webRTCMDNSICECandidatesEnabled()) {
             auto ipAddress = extractIPAddres(sdp);
             // We restrict to IPv4 candidates for now.
             if (ipAddress.contains('.'))
index 203ac16..7e2acde 100644 (file)
@@ -214,8 +214,8 @@ public:
     void setWebRTCUnifiedPlanEnabled(bool isEnabled) { m_isWebRTCUnifiedPlanEnabled = isEnabled; }
     bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
     void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
-    bool mdnsICECandidatesEnabled() const { return m_mdnsICECandidatesEnabled; }
-    void setMDNSICECandidatesEnabled(bool isEnabled) { m_mdnsICECandidatesEnabled = isEnabled; }
+    bool webRTCMDNSICECandidatesEnabled() const { return m_isWebRTCMDNSICECandidatesEnabled; }
+    void setWebRTCMDNSICECandidatesEnabled(bool isEnabled) { m_isWebRTCMDNSICECandidatesEnabled = isEnabled; }
     bool webRTCH264SimulcastEnabled() const { return m_isWebRTCH264SimulcastEnabled; }
     void setWebRTCH264SimulcastEnabled(bool isEnabled) { m_isWebRTCH264SimulcastEnabled = isEnabled; }
 #endif
@@ -399,7 +399,7 @@ private:
     bool m_isWebRTCVP8CodecEnabled { true };
     bool m_isWebRTCUnifiedPlanEnabled { true };
     bool m_isPeerConnectionEnabled { true };
-    bool m_mdnsICECandidatesEnabled { false };
+    bool m_isWebRTCMDNSICECandidatesEnabled { false };
     bool m_isWebRTCH264SimulcastEnabled { true };
 #endif
 
index 228be5d..3bb0839 100644 (file)
@@ -1,3 +1,17 @@
+2018-11-06  Youenn Fablet  <youenn@apple.com>
+
+        Make mDNS ICE Candidate an experimental flag again
+        https://bugs.webkit.org/show_bug.cgi?id=191262
+
+        Reviewed by Dean Jackson.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetWebRTCMDNSICECandidatesEnabled):
+        (WKPreferencesGetWebRTCMDNSICECandidatesEnabled):
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2018-11-06  Suresh Koppisetty  <skoppisetty@apple.com>
 
         Don’t use the main queue to create an XPC connection.
index 0b738d5..3edc95c 100644 (file)
@@ -532,6 +532,15 @@ WebRTCH264SimulcastEnabled:
   humanReadableDescription: "Enable WebRTC H264 Simulcast"
   category: experimental
 
+WebRTCMDNSICECandidatesEnabled:
+  type: bool
+  defaultValue: false
+  humanReadableName: "WebRTC mDNS ICE candidates"
+  humanReadableDescription: "Enable WebRTC mDNS ICE candidates"
+  webcoreBinding: RuntimeEnabledFeatures
+  category: experimental
+  condition: ENABLE(WEB_RTC)
+
 UseLegacyTextAlignPositionedElementBehavior:
   type: bool
   defaultValue: false
@@ -1378,15 +1387,6 @@ AsyncFrameScrollingEnabled:
   humanReadableDescription: "Perform frame scrolling in a dedicated thread or process"
   category: internal
 
-MDNSICECandidatesEnabled:
-  type: bool
-  defaultValue: false
-  humanReadableName: "MDNS ICE candidates"
-  humanReadableDescription: "Enable MDNS ICE candidates"
-  webcoreBinding: RuntimeEnabledFeatures
-  category: internal
-  condition: ENABLE(WEB_RTC)
-
 FetchAPIKeepAliveEnabled:
   type: bool
   defaultValue: false
index c3a0d5b..0f20cc9 100644 (file)
@@ -1432,12 +1432,12 @@ bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef)
 
 void WKPreferencesSetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
-    toImpl(preferencesRef)->setMDNSICECandidatesEnabled(enabled);
+    toImpl(preferencesRef)->setWebRTCMDNSICECandidatesEnabled(enabled);
 }
 
 bool WKPreferencesGetWebRTCMDNSICECandidatesEnabled(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->mDNSICECandidatesEnabled();
+    return toImpl(preferencesRef)->webRTCMDNSICECandidatesEnabled();
 }
 
 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
index e2717a8..a0a2fc8 100644 (file)
@@ -239,8 +239,8 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
 #endif
 
 #if ENABLE(WEB_RTC)
-    if (preference == "WebKitMDNSICECandidatesEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setMDNSICECandidatesEnabled(enabled);
+    if (preference == "WebKitWebRTCMDNSICECandidatesEnabled")
+        RuntimeEnabledFeatures::sharedFeatures().setWebRTCMDNSICECandidatesEnabled(enabled);
     if (preference == "WebKitWebRTCUnifiedPlanEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setWebRTCUnifiedPlanEnabled(enabled);
 #endif
index 7c8f87e..cc02be6 100644 (file)
@@ -1,3 +1,16 @@
+2018-11-06  Youenn Fablet  <youenn@apple.com>
+
+        Make mDNS ICE Candidate an experimental flag again
+        https://bugs.webkit.org/show_bug.cgi?id=191262
+
+        Reviewed by Dean Jackson.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setWebRTCMDNSICECandidatesEnabled):
+        (WTR::TestRunner::setMDNSICECandidatesEnabled): Deleted.
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
 2018-11-06  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-app] Add views for OpenSource EWS Django app
index 592afe9..8db5690 100644 (file)
@@ -325,7 +325,7 @@ interface TestRunner {
     // Open panel
     void setOpenPanelFiles(object filesArray);
 
-    void setMDNSICECandidatesEnabled(boolean value);
+    void setWebRTCMDNSICECandidatesEnabled(boolean value);
     void setWebRTCUnifiedPlanEnabled(boolean value);
     void setCustomUserAgent(DOMString userAgent);
 
index a64d856..df1adaf 100644 (file)
@@ -438,9 +438,9 @@ void TestRunner::setMediaDevicesEnabled(bool enabled)
     WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
 }
 
-void TestRunner::setMDNSICECandidatesEnabled(bool enabled)
+void TestRunner::setWebRTCMDNSICECandidatesEnabled(bool enabled)
 {
-    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitMDNSICECandidatesEnabled"));
+    WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitWebRTCMDNSICECandidatesEnabled"));
     auto& injectedBundle = InjectedBundle::singleton();
     WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
 }
index 2d992c1..f5b2c20 100644 (file)
@@ -131,7 +131,7 @@ public:
     void setAllowsAnySSLCertificate(bool);
     void setEncryptedMediaAPIEnabled(bool);
     void setMediaDevicesEnabled(bool);
-    void setMDNSICECandidatesEnabled(bool);
+    void setWebRTCMDNSICECandidatesEnabled(bool);
     void setWebRTCUnifiedPlanEnabled(bool);
     void setCustomUserAgent(JSStringRef);
     void setWebAPIStatisticsEnabled(bool);