WebKit Bugzilla
Attachment 340109 Details for
Bug 185516
: [MediaStream, iOS] Don't check authorizationStatusForMediaType when using mock capture devices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing.
bug-185516-20180510110939.patch (text/plain), 3.20 KB, created by
Eric Carlson
on 2018-05-10 11:09:40 PDT
(
hide
)
Description:
Patch for landing.
Filename:
MIME Type:
Creator:
Eric Carlson
Created:
2018-05-10 11:09:40 PDT
Size:
3.20 KB
patch
obsolete
>Subversion Revision: 231643 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 90ca7af004f6cde3f5acc81490d1e2893f71aac9..a49a17750587ffb3689c7f7a6b12ceee872e2626 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2018-05-10 Eric Carlson <eric.carlson@apple.com> >+ >+ [MediaStream, iOS] Don't check authorizationStatusForMediaType when using mock capture devices >+ https://bugs.webkit.org/show_bug.cgi?id=185516 >+ <rdar://problem/36328191> >+ >+ Reviewed by Youenn Fablet. >+ >+ * UIProcess/Cocoa/UIDelegate.mm: >+ (WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Don't check >+ +[AVCaptureDevice authorizationStatusForMediaType:] when using mock capture devices. >+ > 2018-05-09 Carlos Garcia Campos <cgarcia@igalia.com> > > WebDriver: implement advance user interactions >diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >index 0c0477c22ac35da2e6e211185f050c4080b0386d..c19e7b8cd7fb0c9db34f3a5a6a1526076455dff3 100644 >--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >@@ -886,13 +886,14 @@ bool UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest(WebPageProx > } > > #if PLATFORM(IOS) >- auto requestCameraAuthorization = BlockPtr<void()>::fromCallable([this, &frame, protectedRequest = makeRef(request), webView = RetainPtr<WKWebView>(m_uiDelegate.m_webView)]() { >+ bool usingMockCaptureDevices = page.preferences().mockCaptureDevicesEnabled(); >+ auto requestCameraAuthorization = BlockPtr<void()>::fromCallable([this, &frame, protectedRequest = makeRef(request), webView = RetainPtr<WKWebView>(m_uiDelegate.m_webView), usingMockCaptureDevices]() { > > if (!protectedRequest->requiresVideoCapture()) { > requestUserMediaAuthorizationForDevices(frame, protectedRequest, (id <WKUIDelegatePrivate>)m_uiDelegate.m_delegate.get(), *webView.get()); > return; > } >- AVAuthorizationStatus cameraAuthorizationStatus = [getAVCaptureDeviceClass() authorizationStatusForMediaType:getAVMediaTypeVideo()]; >+ AVAuthorizationStatus cameraAuthorizationStatus = usingMockCaptureDevices ? AVAuthorizationStatusAuthorized : [getAVCaptureDeviceClass() authorizationStatusForMediaType:getAVMediaTypeVideo()]; > switch (cameraAuthorizationStatus) { > case AVAuthorizationStatusAuthorized: > requestUserMediaAuthorizationForDevices(frame, protectedRequest, (id <WKUIDelegatePrivate>)m_uiDelegate.m_delegate.get(), *webView.get()); >@@ -916,7 +917,7 @@ bool UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest(WebPageProx > }); > > if (requiresAudioCapture) { >- AVAuthorizationStatus microphoneAuthorizationStatus = [getAVCaptureDeviceClass() authorizationStatusForMediaType:getAVMediaTypeAudio()]; >+ AVAuthorizationStatus microphoneAuthorizationStatus = usingMockCaptureDevices ? AVAuthorizationStatusAuthorized : [getAVCaptureDeviceClass() authorizationStatusForMediaType:getAVMediaTypeAudio()]; > switch (microphoneAuthorizationStatus) { > case AVAuthorizationStatusAuthorized: > requestCameraAuthorization();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185516
:
340107
| 340109