[webkit-changes] [WebKit/WebKit] 314245: enumerateDevices may return filtered devices even ...
youennf
noreply at github.com
Mon Sep 5 07:55:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3142453d3762d579cda8a4f04041598e31e584ab
https://github.com/WebKit/WebKit/commit/3142453d3762d579cda8a4f04041598e31e584ab
Author: Youenn Fablet <youennf at gmail.com>
Date: 2022-09-05 (Mon, 05 Sep 2022)
Changed paths:
M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
M Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm
M Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html
Log Message:
-----------
enumerateDevices may return filtered devices even if page is capturing
https://bugs.webkit.org/show_bug.cgi?id=244713
rdar://problem/99484964
Reviewed by Eric Carlson.
Stop using m_grantedRequests for enumerateDevices since it might be reset to ask for prompting again.
Instead, manage a HashSet<FrameID> to store whether a particular document can get access to the whole information.
We still reset this hash set in case we are ordered to stop capture.
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::grantRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::searchForGrantedRequest const):
(WebKit::UserMediaPermissionRequestManagerProxy::updateStoredRequests):
(WebKit::UserMediaPermissionRequestManagerProxy::processUserMediaPermissionInvalidRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::shouldChangeDeniedToPromptForCamera const):
(WebKit::UserMediaPermissionRequestManagerProxy::shouldChangeDeniedToPromptForMicrophone const):
(WebKit::UserMediaPermissionRequestManagerProxy::wasGrantedVideoOrAudioAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::captureStateChanged):
(WebKit::UserMediaPermissionRequestManagerProxy::watchdogTimerFired):
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h:
* Tools/TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
* Tools/TestWebKitAPI/Tests/WebKit/getUserMedia.html:
Canonical link: https://commits.webkit.org/254165@main
More information about the webkit-changes
mailing list