[webkit-reviews] review granted: [Bug 203362] Enforce user gesture for getUserMedia in case a previous getUserMedia call was denied : [Attachment 381936] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 25 18:31:08 PDT 2019
Eric Carlson <eric.carlson at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 203362: Enforce user gesture for getUserMedia in case a previous
getUserMedia call was denied
https://bugs.webkit.org/show_bug.cgi?id=203362
Attachment 381936: Patch
https://bugs.webkit.org/attachment.cgi?id=381936&action=review
--- Comment #6 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 381936
--> https://bugs.webkit.org/attachment.cgi?id=381936
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=381936&action=review
> Source/WebCore/Modules/mediastream/MediaDevices.cpp:118
> + auto* currentGestureToken =
UserGestureIndicator::currentUserGesture().get();
> + if (m_currentGestureToken != currentGestureToken) {
> + m_currentGestureToken = currentGestureToken;
> + m_requestTypesForCurrentGesture = { };
> + }
> +
> + bool isUserGesturePriviledged = m_currentGestureToken &&
!m_requestTypesForCurrentGesture.contains(requestType);
> + m_requestTypesForCurrentGesture.add(requestType);
> + return isUserGesturePriviledged;
I'm not completely comfortable with allowing script to reprompt the user on
every user gesture, forever, but we can start with this and talk about rate (or
other) limits to the reprompts later.
More information about the webkit-reviews
mailing list