MediaDevices is not enabled for MobileSafari
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 May 2017 21:04:49 +0000 (21:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 May 2017 21:04:49 +0000 (21:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171433
<rdar://problem/31923178>

Patch by Andrew Gold <agold@apple.com> on 2017-05-02
Reviewed by Youenn Fablet.

Added the Cocoa API for toggling this feature and removed API for toggling
MediaStreamEnabled since it will always be on.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _mediaDevicesEnabled]):
(-[WKPreferences _setMediaDevicesEnabled:]):
(-[WKPreferences _mediaStreamEnabled]): Deleted.
(-[WKPreferences _setMediaStreamEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h

index b64a333..64eff13 100644 (file)
@@ -1,3 +1,21 @@
+2017-05-02  Andrew Gold  <agold@apple.com>
+
+        MediaDevices is not enabled for MobileSafari
+        https://bugs.webkit.org/show_bug.cgi?id=171433
+        <rdar://problem/31923178>
+
+        Reviewed by Youenn Fablet.
+
+        Added the Cocoa API for toggling this feature and removed API for toggling
+        MediaStreamEnabled since it will always be on.
+
+        * UIProcess/API/Cocoa/WKPreferences.mm:
+        (-[WKPreferences _mediaDevicesEnabled]):
+        (-[WKPreferences _setMediaDevicesEnabled:]):
+        (-[WKPreferences _mediaStreamEnabled]): Deleted.
+        (-[WKPreferences _setMediaStreamEnabled:]): Deleted.
+        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+
 2017-05-02  Andy Estes  <aestes@apple.com>
 
         REGRESSION (r213036): Crash in -[WKContentView _webTouchEventsRecognized:] when a touch event arrives after a WebPageProxy has been invalidated
index b3a87a4..015980c 100644 (file)
@@ -547,14 +547,14 @@ static _WKStorageBlockingPolicy toAPI(WebCore::SecurityOrigin::StorageBlockingPo
     _preferences->setLoadsImagesAutomatically(loadsImagesAutomatically);
 }
 
-- (BOOL)_mediaStreamEnabled
+- (BOOL)_mediaDevicesEnabled
 {
-    return _preferences->mediaStreamEnabled();
+    return _preferences->mediaDevicesEnabled();
 }
 
-- (void)_setMediaStreamEnabled:(BOOL)enabled
+- (void)_setMediaDevicesEnabled:(BOOL)enabled
 {
-    _preferences->setMediaStreamEnabled(enabled);
+    _preferences->setMediaDevicesEnabled(enabled);
 }
 
 - (BOOL)_mockCaptureDevicesEnabled
index 733e999..b1d0799 100644 (file)
@@ -98,7 +98,7 @@ typedef NS_OPTIONS(NSUInteger, _WKJavaScriptRuntimeFlags) {
 
 @property (nonatomic, setter=_setLoadsImagesAutomatically:) BOOL _loadsImagesAutomatically WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 
-@property (nonatomic, setter=_setMediaStreamEnabled:) BOOL _mediaStreamEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setMediaDevicesEnabled:) BOOL _mediaDevicesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setMockCaptureDevicesEnabled:) BOOL _mockCaptureDevicesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setMediaCaptureRequiresSecureConnection:) BOOL _mediaCaptureRequiresSecureConnection WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 @property (nonatomic, setter=_setEnumeratingAllNetworkInterfacesEnabled:) BOOL _enumeratingAllNetworkInterfacesEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));