Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2016 16:59:55 +0000 (16:59 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Dec 2016 16:59:55 +0000 (16:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165251

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, fixes an API test.

* page/Settings.in: Delete mediaStreamEnabled and peerConnectionEnabled, we don't need a
setting and a runtime feature.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Update the media stream and peer connection runtime
feature instead of the setting.

Tools:

* TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp:
(TestWebKitAPI::TEST): Enable MediaStream, create web view from the page group upon which
the preferences have been set.

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

Source/WebCore/ChangeLog
Source/WebCore/page/Settings.in
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp

index a55f3e0..1aae9e2 100644 (file)
@@ -1,3 +1,15 @@
+2016-12-13  Eric Carlson  <eric.carlson@apple.com>
+
+        Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
+        https://bugs.webkit.org/show_bug.cgi?id=165251
+
+        Reviewed by Youenn Fablet.
+
+        No new tests, fixes an API test.
+
+        * page/Settings.in: Delete mediaStreamEnabled and peerConnectionEnabled, we don't need a
+        setting and a runtime feature.
+
 2016-12-13  Antti Koivisto  <antti@apple.com>
 
         REGRESSION (r198990): Cannot edit content inside <details> in wysiwyg editor
index 8751587..6749dcd 100644 (file)
@@ -115,8 +115,6 @@ webAudioEnabled initial=false
 paginateDuringLayoutEnabled initial=false
 fullScreenEnabled initial=false, conditional=FULLSCREEN_API
 asynchronousSpellCheckingEnabled initial=false
-mediaStreamEnabled initial=false
-peerConnectionEnabled initial=false
 
 # This feature requires an implementation of ValidationMessageClient.
 interactiveFormValidationEnabled initial=false
index b2ea7f9..666a337 100644 (file)
@@ -1,3 +1,14 @@
+2016-12-13  Eric Carlson  <eric.carlson@apple.com>
+
+        Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
+        https://bugs.webkit.org/show_bug.cgi?id=165251
+
+        Reviewed by Youenn Fablet.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences): Update the media stream and peer connection runtime
+        feature instead of the setting.
+
 2016-12-13  Sergio Villar Senin  <svillar@igalia.com>
 
         Fix GTK build after r209733
index 02774d0..0e204a1 100644 (file)
@@ -3033,11 +3033,11 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
 #endif
 
 #if ENABLE(MEDIA_STREAM)
-    settings.setMediaStreamEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaStreamEnabledKey()));
+    RuntimeEnabledFeatures::sharedFeatures().setMediaStreamEnabled(store.getBoolValueForKey(WebPreferencesKey::mediaStreamEnabledKey()));
 #endif
 
 #if ENABLE(WEB_RTC)
-    settings.setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
+    RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
 #endif
 
 #if ENABLE(SERVICE_CONTROLS)
index 2a260b4..38e205e 100644 (file)
@@ -1,3 +1,14 @@
+2016-12-13  Eric Carlson  <eric.carlson@apple.com>
+
+        Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
+        https://bugs.webkit.org/show_bug.cgi?id=165251
+
+        Reviewed by Youenn Fablet.
+
+        * TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp:
+        (TestWebKitAPI::TEST): Enable MediaStream, create web view from the page group upon which
+        the preferences have been set.
+
 2016-12-08  Antti Koivisto  <antti@apple.com>
 
         Enable network cache speculative revalidation in MiniBrowser
index 67b04b2..0ac7d0f 100644 (file)
@@ -53,6 +53,7 @@ TEST(WebKit2, EnumerateDevices)
 
     WKRetainPtr<WKPageGroupRef> pageGroup(AdoptWK, WKPageGroupCreateWithIdentifier(Util::toWK("EnumerateDevices").get()));
     WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroup.get());
+    WKPreferencesSetMediaStreamEnabled(preferences, true);
     WKPreferencesSetFileAccessFromFileURLsAllowed(preferences, true);
     WKPreferencesSetMediaCaptureRequiresSecureConnection(preferences, false);
 
@@ -61,7 +62,7 @@ TEST(WebKit2, EnumerateDevices)
     uiClient.base.version = 6;
     uiClient.checkUserMediaPermissionForOrigin = checkUserMediaPermissionCallback;
 
-    PlatformWebView webView(context.get());
+    PlatformWebView webView(context.get(), pageGroup.get());
     WKPageSetPageUIClient(webView.page(), &uiClient.base);
 
     auto url = adoptWK(Util::createURLForResource("enumerateMediaDevices", "html"));