Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legac...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 19:48:36 +0000 (19:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 19:48:36 +0000 (19:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181480

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-11
Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior.

* page/RuntimeEnabledFeatures.h: Set default value to false.

Source/WebKit:

Renaming preference to WebRTCLegacyAPIEnabled for simplification and removing it from experimental feature.
Set it to off by default.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebRTCLegacyAPIEnabled):
(WKPreferencesGetWebRTCLegacyAPIEnabled):
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _webRTCLegacyAPIEnabled]):
(-[WKPreferences _setWebRTCLegacyAPIEnabled:]):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

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

Source/WebCore/ChangeLog
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferences.mm

index 16daba2..13028e5 100644 (file)
@@ -1,3 +1,14 @@
+2018-01-11  Youenn Fablet  <youenn@apple.com>
+
+        Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
+        https://bugs.webkit.org/show_bug.cgi?id=181480
+
+        Reviewed by Eric Carlson.
+
+        No change of behavior.
+
+        * page/RuntimeEnabledFeatures.h: Set default value to false.
+
 2018-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [Attachment Support] Support moving attachment elements in editable areas using drag and drop
index ad8f3c6..6b9fed3 100644 (file)
@@ -277,7 +277,7 @@ private:
 
 #if ENABLE(WEB_RTC)
     bool m_isPeerConnectionEnabled { true };
-    bool m_webRTCLegacyAPIEnabled { true };
+    bool m_webRTCLegacyAPIEnabled { false };
 #endif
 
 #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
index 943bc2d..baae967 100644 (file)
@@ -1,3 +1,25 @@
+2018-01-11  Youenn Fablet  <youenn@apple.com>
+
+        Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
+        https://bugs.webkit.org/show_bug.cgi?id=181480
+
+        Reviewed by Eric Carlson.
+
+        Renaming preference to WebRTCLegacyAPIEnabled for simplification and removing it from experimental feature.
+        Set it to off by default.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetWebRTCLegacyAPIEnabled):
+        (WKPreferencesGetWebRTCLegacyAPIEnabled):
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _webRTCLegacyAPIEnabled]):
+        (-[WKPreferences _setWebRTCLegacyAPIEnabled:]):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::ensureNetworkProcess):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2018-01-11  Alex Christensen  <achristensen@webkit.org>
 
         Merge sync and async code paths for getting context menus
index 232c378..2a0533a 100644 (file)
@@ -1103,13 +1103,12 @@ LinkPreloadEnabled:
   category: experimental
   webcoreBinding: RuntimeEnabledFeatures
 
-WebRTCLegacyAPIDisabled:
+WebRTCLegacyAPIEnabled:
   type: bool
-  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
-  humanReadableName: "Remove Legacy WebRTC API"
-  humanReadableDescription: "Remove Legacy WebRTC API"
-  category: experimental
-  webcoreBinding: custom
+  defaultValue: false
+  humanReadableName: "Enable Legacy WebRTC API"
+  humanReadableDescription: "Enable Legacy WebRTC API"
+  webcoreBinding: RuntimeEnabledFeatures
   condition: ENABLE(WEB_RTC)
 
 IsSecureContextAttributeEnabled:
index 5ecbcbb..b2f4f79 100644 (file)
@@ -1416,12 +1416,12 @@ bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef)
 
 void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
 {
-    toImpl(preferencesRef)->setWebRTCLegacyAPIDisabled(!enabled);
+    toImpl(preferencesRef)->setWebRTCLegacyAPIEnabled(enabled);
 }
 
 bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef)
 {
-    return !toImpl(preferencesRef)->webRTCLegacyAPIDisabled();
+    return toImpl(preferencesRef)->webRTCLegacyAPIEnabled();
 }
 
 void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
index 2259672..6573c14 100644 (file)
@@ -660,12 +660,12 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
 
 - (BOOL)_webRTCLegacyAPIEnabled
 {
-    return !_preferences->webRTCLegacyAPIDisabled();
+    return _preferences->webRTCLegacyAPIEnabled();
 }
 
 - (void)_setWebRTCLegacyAPIEnabled:(BOOL)enabled
 {
-    _preferences->setWebRTCLegacyAPIDisabled(!enabled);
+    _preferences->setWebRTCLegacyAPIEnabled(enabled);
 }
 
 - (void)_setJavaScriptCanAccessClipboard:(BOOL)javaScriptCanAccessClipboard
index 88fa6b6..48147aa 100644 (file)
@@ -3080,10 +3080,6 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
     settings.setDataDetectorTypes(static_cast<DataDetectorTypes>(store.getUInt32ValueForKey(WebPreferencesKey::dataDetectorTypesKey())));
 #endif
 
-#if ENABLE(WEB_RTC)
-    RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(!store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIDisabledKey()));
-#endif
-
     RuntimeEnabledFeatures::sharedFeatures().setWebAuthenticationEnabled(store.getBoolValueForKey(WebPreferencesKey::webAuthenticationEnabledKey()));
 
     DatabaseManager::singleton().setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
index 831e634..97772de 100644 (file)
@@ -1,3 +1,13 @@
+2018-01-11  Youenn Fablet  <youenn@apple.com>
+
+        Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
+        https://bugs.webkit.org/show_bug.cgi?id=181480
+
+        Reviewed by Eric Carlson.
+
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+
 2018-01-08  David Kilzer  <ddkilzer@apple.com>
 
         Fix check-webkit-style issues with WebNSDataExtras.mm
index f7da4d2..2b5e09b 100644 (file)
@@ -658,7 +658,7 @@ public:
 #endif
 #if ENABLE(WEB_RTC)
         [NSNumber numberWithBool:YES], WebKitPeerConnectionEnabledPreferenceKey,
-        [NSNumber numberWithBool:YES], WebKitWebRTCLegacyAPIEnabledPreferenceKey,
+        [NSNumber numberWithBool:NO], WebKitWebRTCLegacyAPIEnabledPreferenceKey,
 #endif
 #if ENABLE(INTERSECTION_OBSERVER)
         @NO, WebKitIntersectionObserverEnabledPreferenceKey,