Log Message
Make WebRTC legacy API switch an experimental feature https://bugs.webkit.org/show_bug.cgi?id=172760
Patch by Youenn Fablet <[email protected]> on 2017-05-31 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):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (217614 => 217615)
--- trunk/Source/WebKit2/ChangeLog 2017-05-31 18:57:12 UTC (rev 217614)
+++ trunk/Source/WebKit2/ChangeLog 2017-05-31 19:04:44 UTC (rev 217615)
@@ -1,3 +1,23 @@
+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 Matt Lewis <[email protected]>
Unreviewed, rolling out r217603.
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (217614 => 217615)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2017-05-31 18:57:12 UTC (rev 217614)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2017-05-31 19:04:44 UTC (rev 217615)
@@ -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: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (217614 => 217615)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2017-05-31 18:57:12 UTC (rev 217614)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2017-05-31 19:04:44 UTC (rev 217615)
@@ -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: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm (217614 => 217615)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm 2017-05-31 18:57:12 UTC (rev 217614)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm 2017-05-31 19:04:44 UTC (rev 217615)
@@ -609,12 +609,12 @@
- (BOOL)_webRTCLegacyAPIEnabled
{
- return _preferences->webRTCLegacyAPIEnabled();
+ return !_preferences->webRTCLegacyAPIDisabled();
}
- (void)_setWebRTCLegacyAPIEnabled:(BOOL)enabled
{
- _preferences->setWebRTCLegacyAPIEnabled(enabled);
+ _preferences->setWebRTCLegacyAPIDisabled(!enabled);
}
@end
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (217614 => 217615)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-05-31 18:57:12 UTC (rev 217614)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-05-31 19:04:44 UTC (rev 217615)
@@ -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
