Make the WebKit default for media source based on the WebCore default.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 21:48:53 +0000 (21:48 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 21:48:53 +0000 (21:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194172

Reviewed by Eric Carlson.

Source/WebCore:

* page/SettingsBase.h:

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setMediaSourceEnabled:]):
(-[WKPreferences _mediaSourceEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

Source/WebCore/ChangeLog
Source/WebCore/page/SettingsBase.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h

index fc1c9a8..4a23ea3 100644 (file)
@@ -1,3 +1,12 @@
+2019-02-01  Jer Noble  <jer.noble@apple.com>
+
+        Make the WebKit default for media source based on the WebCore default.
+        https://bugs.webkit.org/show_bug.cgi?id=194172
+
+        Reviewed by Eric Carlson.
+
+        * page/SettingsBase.h:
+
 2019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Memory timeline starts from zero when both CPU and Memory timeline are enabled
index d370d80..57531a1 100644 (file)
@@ -117,7 +117,7 @@ public:
     WEBCORE_EXPORT static bool defaultDownloadableBinaryFontsEnabled();
 
 #if ENABLE(MEDIA_SOURCE)
-    static bool platformDefaultMediaSourceEnabled();
+    WEBCORE_EXPORT static bool platformDefaultMediaSourceEnabled();
 #endif
 
     static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
index 294b90f..56c1ec3 100644 (file)
@@ -1,3 +1,16 @@
+2019-02-01  Jer Noble  <jer.noble@apple.com>
+
+        Make the WebKit default for media source based on the WebCore default.
+        https://bugs.webkit.org/show_bug.cgi?id=194172
+
+        Reviewed by Eric Carlson.
+
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _setMediaSourceEnabled:]):
+        (-[WKPreferences _mediaSourceEnabled]):
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
 2019-02-01  Simon Fraser  <simon.fraser@apple.com>
 
         Force settings.acceleratedCompositingEnabled() to true for WebKit
index ac33c36..cce4ace 100644 (file)
@@ -574,7 +574,7 @@ SpatialNavigationEnabled:
 
 MediaSourceEnabled:
   type: bool
-  defaultValue: true
+  defaultValue: WebCore::Settings::platformDefaultMediaSourceEnabled()
   condition: ENABLE(MEDIA_SOURCE)
 
 ViewGestureDebuggingEnabled:
index 9475df4..461c875 100644 (file)
@@ -849,6 +849,16 @@ static WebCore::EditableLinkBehavior toEditableLinkBehavior(_WKEditableLinkBehav
     return _preferences->itpDebugModeEnabled();
 }
 
+- (void)_setMediaSourceEnabled:(BOOL)enabled
+{
+    _preferences->setMediaSourceEnabled(enabled);
+}
+
+- (BOOL)_mediaSourceEnabled
+{
+    return _preferences->mediaSourceEnabled();
+}
+
 #if PLATFORM(MAC)
 - (void)_setJavaEnabledForLocalFiles:(BOOL)enabled
 {
@@ -1053,16 +1063,6 @@ static WebCore::EditableLinkBehavior toEditableLinkBehavior(_WKEditableLinkBehav
     return _preferences->subpixelCSSOMElementMetricsEnabled();
 }
 
-- (void)_setMediaSourceEnabled:(BOOL)enabled
-{
-    _preferences->setMediaSourceEnabled(enabled);
-}
-
-- (BOOL)_mediaSourceEnabled
-{
-    return _preferences->mediaSourceEnabled();
-}
-
 - (void)_setViewGestureDebuggingEnabled:(BOOL)enabled
 {
     _preferences->setViewGestureDebuggingEnabled(enabled);
index d725f32..cb39fa8 100644 (file)
@@ -153,6 +153,7 @@ typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) {
 @property (nonatomic, setter=_setDeviceOrientationEventEnabled:) BOOL _deviceOrientationEventEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setNeedsSiteSpecificQuirks:) BOOL _needsSiteSpecificQuirks WK_API_AVAILABLE(macosx(10.13.4), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setItpDebugModeEnabled:) BOOL _itpDebugModeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setMediaSourceEnabled:) BOOL _mediaSourceEnabled WK_API_AVAILABLE(macosx(10.13.4), ios(WK_IOS_TBA));
 
 #if !TARGET_OS_IPHONE
 @property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macosx(10.13.4));
@@ -176,7 +177,6 @@ typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) {
 @property (nonatomic, setter=_setCookieEnabled:) BOOL _cookieEnabled WK_API_AVAILABLE(macosx(10.13.4));
 @property (nonatomic, setter=_setPlugInSnapshottingEnabled:) BOOL _plugInSnapshottingEnabled WK_API_AVAILABLE(macosx(10.13.4));
 @property (nonatomic, setter=_setSubpixelCSSOMElementMetricsEnabled:) BOOL _subpixelCSSOMElementMetricsEnabled WK_API_AVAILABLE(macosx(10.13.4));
-@property (nonatomic, setter=_setMediaSourceEnabled:) BOOL _mediaSourceEnabled WK_API_AVAILABLE(macosx(10.13.4));
 @property (nonatomic, setter=_setViewGestureDebuggingEnabled:) BOOL _viewGestureDebuggingEnabled WK_API_AVAILABLE(macosx(10.13.4));
 @property (nonatomic, setter=_setStandardFontFamily:) NSString *_standardFontFamily WK_API_AVAILABLE(macosx(10.13.4));
 @property (nonatomic, setter=_setNotificationsEnabled:) BOOL _notificationsEnabled WK_API_AVAILABLE(macosx(10.13.4));