Title: [239389] trunk/Source
Revision
239389
Author
eric.carl...@apple.com
Date
2018-12-19 13:25:29 -0800 (Wed, 19 Dec 2018)

Log Message

[MediaStream] Force system camera/microphone TCC prompt if necessary
https://bugs.webkit.org/show_bug.cgi?id=192820
<rdar://problem/42680098>

Reviewed by Jer Noble.

Source/WebKit:

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Enable TCC check
and prompt on Mojave.

Source/WTF:

* wtf/Platform.h: Define HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (239388 => 239389)


--- trunk/Source/WTF/ChangeLog	2018-12-19 21:24:20 UTC (rev 239388)
+++ trunk/Source/WTF/ChangeLog	2018-12-19 21:25:29 UTC (rev 239389)
@@ -1,3 +1,13 @@
+2018-12-19  Eric Carlson  <eric.carl...@apple.com>
+
+        [MediaStream] Force system camera/microphone TCC prompt if necessary
+        https://bugs.webkit.org/show_bug.cgi?id=192820
+        <rdar://problem/42680098>
+
+        Reviewed by Jer Noble.
+
+        * wtf/Platform.h: Define HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE.
+
 2018-12-17  Chris Fleizach  <cfleiz...@apple.com>
 
         Some builds are broken after r239262

Modified: trunk/Source/WTF/wtf/Platform.h (239388 => 239389)


--- trunk/Source/WTF/wtf/Platform.h	2018-12-19 21:24:20 UTC (rev 239388)
+++ trunk/Source/WTF/wtf/Platform.h	2018-12-19 21:25:29 UTC (rev 239389)
@@ -1462,3 +1462,7 @@
 #if PLATFORM(MAC)
 #define ENABLE_FULL_KEYBOARD_ACCESS 1
 #endif
+
+#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400)
+#define HAVE_AUTHORIZATION_STATUS_FOR_MEDIA_TYPE 1
+#endif

Modified: trunk/Source/WebKit/ChangeLog (239388 => 239389)


--- trunk/Source/WebKit/ChangeLog	2018-12-19 21:24:20 UTC (rev 239388)
+++ trunk/Source/WebKit/ChangeLog	2018-12-19 21:25:29 UTC (rev 239389)
@@ -1,3 +1,15 @@
+2018-12-19  Eric Carlson  <eric.carl...@apple.com>
+
+        [MediaStream] Force system camera/microphone TCC prompt if necessary
+        https://bugs.webkit.org/show_bug.cgi?id=192820
+        <rdar://problem/42680098>
+
+        Reviewed by Jer Noble.
+
+        * UIProcess/Cocoa/UIDelegate.mm:
+        (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Enable TCC check 
+        and prompt on Mojave.
+
 2018-12-19  Megan Gardner  <megan_gard...@apple.com>
 
         Allow clients to set the navigator platform

Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm (239388 => 239389)


--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm	2018-12-19 21:24:20 UTC (rev 239388)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm	2018-12-19 21:25:29 UTC (rev 239389)
@@ -55,7 +55,7 @@
 #import <wtf/BlockPtr.h>
 #import <wtf/URL.h>
 
-#if PLATFORM(IOS_FAMILY)
+#if HAVE(AUTHORIZATION_STATUS_FOR_MEDIA_TYPE)
 #import <AVFoundation/AVCaptureDevice.h>
 #import <AVFoundation/AVMediaFormat.h>
 #import <wtf/SoftLinking.h>
@@ -912,7 +912,7 @@
         return true;
     }
 
-#if PLATFORM(IOS_FAMILY)
+#if HAVE(AUTHORIZATION_STATUS_FOR_MEDIA_TYPE)
     bool usingMockCaptureDevices = page.preferences().mockCaptureDevicesEnabled();
     auto requestCameraAuthorization = makeBlockPtr([this, &frame, protectedRequest = makeRef(request), webView = RetainPtr<WKWebView>(m_uiDelegate.m_webView), usingMockCaptureDevices]() {
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to