Add MediaCapabilities as an Experimental Feature
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2018 17:26:54 +0000 (17:26 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2018 17:26:54 +0000 (17:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189209

Reviewed by Eric Carlson.

Source/WebCore:

Move mediaCapabilitiesEnabled out of RuntimeEnabledFeatures. It already (also) exists in Settings.

* Modules/mediacapabilities/MediaCapabilities.idl:
* Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
* Modules/mediacapabilities/NavigatorMediaCapabilities.idl:
* Modules/mediacapabilities/ScreenLuminance.idl:
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setMediaCapabilitiesEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::mediaCapabilitiesEnabled const): Deleted.

Source/WebKit:

* Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

RuntimeEnabledFeature -> Setting.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl
Source/WebCore/Modules/mediacapabilities/MediaCapabilitiesInfo.idl
Source/WebCore/Modules/mediacapabilities/NavigatorMediaCapabilities.idl
Source/WebCore/Modules/mediacapabilities/ScreenLuminance.idl
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebView.mm

index 7de4df6..31efd2a 100644 (file)
@@ -1,3 +1,20 @@
+2018-09-05  Jer Noble  <jer.noble@apple.com>
+
+        Add MediaCapabilities as an Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=189209
+
+        Reviewed by Eric Carlson.
+
+        Move mediaCapabilitiesEnabled out of RuntimeEnabledFeatures. It already (also) exists in Settings.
+
+        * Modules/mediacapabilities/MediaCapabilities.idl:
+        * Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
+        * Modules/mediacapabilities/NavigatorMediaCapabilities.idl:
+        * Modules/mediacapabilities/ScreenLuminance.idl:
+        * page/RuntimeEnabledFeatures.h:
+        (WebCore::RuntimeEnabledFeatures::setMediaCapabilitiesEnabled): Deleted.
+        (WebCore::RuntimeEnabledFeatures::mediaCapabilitiesEnabled const): Deleted.
+
 2018-09-05  Woodrow Wang  <woodrow_wang@apple.com>
 
         Add functionality to encode and decode a uint64_t in KeyedCoding
index 60281b5..cbc0d2d 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 [
-    EnabledAtRuntime=MediaCapabilities,
+    EnabledBySetting=MediaCapabilities,
     ImplementationLacksVTable
 ]
 interface MediaCapabilities {
index 0940d79..b2525e5 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 [
-    EnabledAtRuntime=MediaCapabilities,
+    EnabledBySetting=MediaCapabilities,
     ImplementationLacksVTable
 ]
 interface MediaCapabilitiesInfo {
index 3d605ba..a2bf3f7 100644 (file)
@@ -23,7 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-[ EnabledAtRuntime=MediaCapabilities ]
+[ EnabledBySetting=MediaCapabilities ]
 partial interface Navigator {
     [SameObject] readonly attribute MediaCapabilities mediaCapabilities;
 };
index 395bae0..9e3dcab 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 [
-    EnabledAtRuntime=MediaCapabilities,
+    EnabledBySetting=MediaCapabilities,
     ImplementationLacksVTable
 ]
 interface ScreenLuminance {
index bc83f8a..e8a4b1a 100644 (file)
@@ -250,9 +250,6 @@ public:
     void setAriaReflectionEnabled(bool isEnabled) { m_ariaReflectionEnabled = isEnabled; }
     bool ariaReflectionEnabled() const { return m_ariaReflectionEnabled; }
 
-    void setMediaCapabilitiesEnabled(bool isEnabled) { m_mediaCapabilitiesEnabled = isEnabled; }
-    bool mediaCapabilitiesEnabled() const { return m_mediaCapabilitiesEnabled; }
-
     void setResourceLoadStatisticsDebugMode(bool isEnabled) { m_resourceLoadStatisticsDebugMode = isEnabled; }
     bool resourceLoadStatisticsDebugMode() const { return m_resourceLoadStatisticsDebugMode; }
 
@@ -413,7 +410,6 @@ private:
     bool m_webVREnabled { false };
     bool m_accessibilityObjectModelEnabled { false };
     bool m_ariaReflectionEnabled { true };
-    bool m_mediaCapabilitiesEnabled { false };
     bool m_resourceLoadStatisticsDebugMode { false };
     bool m_isRestrictedHTTPResponseAccess { true };
     bool m_crossOriginResourcePolicyEnabled { true };
index 7eaee59..99c5205 100644 (file)
@@ -1,3 +1,12 @@
+2018-09-05  Jer Noble  <jer.noble@apple.com>
+
+        Add MediaCapabilities as an Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=189209
+
+        Reviewed by Eric Carlson.
+
+        * Shared/WebPreferences.yaml:
+
 2018-09-05  Jeremy Jones  <jeremyj@apple.com>
 
         Cancelled fullscreen exit gesture leaves bad state for next exit request.
index 8a476c4..a91e92c 100644 (file)
@@ -1047,8 +1047,10 @@ ShouldAllowUserInstalledFonts:
 
 MediaCapabilitiesEnabled:
   type: bool
-  defaultValue: false
-  webcoreBinding: RuntimeEnabledFeatures
+  defaultValue: DEFAULT_EXPERIMENTAL_FEATURES_ENABLED
+  humanReadableName: "Media Capabilities API"
+  humanReadableDescription: "Media Capabilities API"
+  category: experimental
 
 SystemPreviewEnabled:
   type: bool
index 98813e4..4a64555 100644 (file)
@@ -1,3 +1,15 @@
+2018-09-05  Jer Noble  <jer.noble@apple.com>
+
+        Add MediaCapabilities as an Experimental Feature
+        https://bugs.webkit.org/show_bug.cgi?id=189209
+
+        Reviewed by Eric Carlson.
+
+        RuntimeEnabledFeature -> Setting.
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2018-09-04  Frederic Wang  <fwang@igalia.com>
 
         Add basic support for ScrollIntoViewOptions
index 91410a8..09d9a69 100644 (file)
@@ -3125,7 +3125,6 @@ static bool needsSelfRetainWhileLoadingQuirk()
     RuntimeEnabledFeatures::sharedFeatures().setMenuItemElementEnabled([preferences menuItemElementEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setAccessibilityObjectModelEnabled([preferences accessibilityObjectModelEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setAriaReflectionEnabled([preferences ariaReflectionEnabled]);
-    RuntimeEnabledFeatures::sharedFeatures().setMediaCapabilitiesEnabled([preferences mediaCapabilitiesEnabled]);
     RuntimeEnabledFeatures::sharedFeatures().setFetchAPIKeepAliveEnabled([preferences fetchAPIKeepAliveEnabled]);
 
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
@@ -3170,6 +3169,7 @@ static bool needsSelfRetainWhileLoadingQuirk()
 
     settings.setLargeImageAsyncDecodingEnabled([preferences largeImageAsyncDecodingEnabled]);
     settings.setAnimatedImageAsyncDecodingEnabled([preferences animatedImageAsyncDecodingEnabled]);
+    settings.setMediaCapabilitiesEnabled([preferences mediaCapabilitiesEnabled]);
 
     RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled([preferences serverTimingEnabled]);
 }