Title: [217633] tags/Safari-604.1.23.0.3/Source/WebKit2

Diff

Modified: tags/Safari-604.1.23.0.3/Source/WebKit2/ChangeLog (217632 => 217633)


--- tags/Safari-604.1.23.0.3/Source/WebKit2/ChangeLog	2017-05-31 22:49:31 UTC (rev 217632)
+++ tags/Safari-604.1.23.0.3/Source/WebKit2/ChangeLog	2017-05-31 22:49:35 UTC (rev 217633)
@@ -1,5 +1,29 @@
 2017-05-31  Matthew Hanson  <[email protected]>
 
+        Cherry-pick r217615. rdar://problem/32489499
+
+    2017-05-31  Youenn Fablet  <[email protected]>
+
+            Make WebRTC legacy API switch an experimental feature
+            https://bugs.webkit.org/show_bug.cgi?id=172760
+
+            Reviewed by Eric Carlson.
+
+            This patch adds an experimental feature to disable WebRTC legacy API.
+            We keep the runtime flag as "enable WebRTC legacy API" to minimize the changes and as it is clearer in the code.
+
+            * Shared/WebPreferencesDefinitions.h:
+            * UIProcess/API/C/WKPreferences.cpp:
+            (WKPreferencesSetWebRTCLegacyAPIEnabled):
+            (WKPreferencesGetWebRTCLegacyAPIEnabled):
+            * UIProcess/API/Cocoa/WKPreferences.mm:
+            (-[WKPreferences _webRTCLegacyAPIEnabled]):
+            (-[WKPreferences _setWebRTCLegacyAPIEnabled:]):
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::updatePreferences):
+
+2017-05-31  Matthew Hanson  <[email protected]>
+
         Cherry-pick r217570. rdar://problem/30772609
 
     2017-05-30  Alex Christensen  <[email protected]>

Modified: tags/Safari-604.1.23.0.3/Source/WebKit2/Shared/WebPreferencesDefinitions.h (217632 => 217633)


--- tags/Safari-604.1.23.0.3/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2017-05-31 22:49:31 UTC (rev 217632)
+++ tags/Safari-604.1.23.0.3/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2017-05-31 22:49:35 UTC (rev 217633)
@@ -250,7 +250,6 @@
     macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, "", "") \
     macro(MediaCaptureRequiresSecureConnection, mediaCaptureRequiresSecureConnection, Bool, bool, true, "", "") \
     macro(EnumeratingAllNetworkInterfacesEnabled, enumeratingAllNetworkInterfacesEnabled, Bool, bool, false, "", "") \
-    macro(WebRTCLegacyAPIEnabled, webRTCLegacyAPIEnabled, Bool, bool, true, "", "") \
     macro(ICECandidateFilteringEnabled, iceCandidateFilteringEnabled, Bool, bool, true, "", "") \
     macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true, "Shadow DOM", "HTML Shadow DOM prototype") \
     macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, true, "", "") \
@@ -360,6 +359,7 @@
     macro(WebGL2Enabled, webGL2Enabled, Bool, bool, false, "WebGL 2.0", "WebGL 2 prototype") \
     macro(WebGPUEnabled, webGPUEnabled, Bool, bool, false, "WebGPU", "WebGPU prototype") \
     macro(DisplayContentsEnabled, displayContentsEnabled, Bool, bool, false, "display: contents", "Enable CSS display: contents support") \
+    macro(WebRTCLegacyAPIDisabled, webRTCLegacyAPIDisabled, Bool, bool, false, "No WebRTC Legacy API", "Disable WebRTC legacy API support") \
     \
 
 #if PLATFORM(COCOA)

Modified: tags/Safari-604.1.23.0.3/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (217632 => 217633)


--- tags/Safari-604.1.23.0.3/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2017-05-31 22:49:31 UTC (rev 217632)
+++ tags/Safari-604.1.23.0.3/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2017-05-31 22:49:35 UTC (rev 217633)
@@ -1373,12 +1373,12 @@
 
 void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
-    toImpl(preferencesRef)->setWebRTCLegacyAPIEnabled(enabled);
+    toImpl(preferencesRef)->setWebRTCLegacyAPIDisabled(!enabled);
 }
 
 bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef)
 {
-    return toImpl(preferencesRef)->webRTCLegacyAPIEnabled();
+    return !toImpl(preferencesRef)->webRTCLegacyAPIDisabled();
 }
 
 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)

Modified: tags/Safari-604.1.23.0.3/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (217632 => 217633)


--- tags/Safari-604.1.23.0.3/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm	2017-05-31 22:49:31 UTC (rev 217632)
+++ tags/Safari-604.1.23.0.3/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm	2017-05-31 22:49:35 UTC (rev 217633)
@@ -609,12 +609,12 @@
 
 - (BOOL)_webRTCLegacyAPIEnabled
 {
-    return _preferences->webRTCLegacyAPIEnabled();
+    return !_preferences->webRTCLegacyAPIDisabled();
 }
 
 - (void)_setWebRTCLegacyAPIEnabled:(BOOL)enabled
 {
-    _preferences->setWebRTCLegacyAPIEnabled(enabled);
+    _preferences->setWebRTCLegacyAPIDisabled(!enabled);
 }
 
 @end

Modified: tags/Safari-604.1.23.0.3/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (217632 => 217633)


--- tags/Safari-604.1.23.0.3/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2017-05-31 22:49:31 UTC (rev 217632)
+++ tags/Safari-604.1.23.0.3/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2017-05-31 22:49:35 UTC (rev 217633)
@@ -3182,7 +3182,7 @@
 
 #if ENABLE(WEB_RTC)
     RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
-    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIEnabledKey()));
+    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(!store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIDisabledKey()));
 #endif
 
 #if ENABLE(SERVICE_CONTROLS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to