New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653497 link

Starred by 3 users

Issue metadata

Status: Fixed
Merged: issue 653498
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug
Team-Security-UX



Sign in to add a comment

ESC with camera dialog open doesn't trigger dismissed callback

Reported by joe.pal...@iproov.com, Oct 6 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
1. https://webrtc.github.io/samples/src/content/getusermedia/gum/
2. Press ESC
3. Look at console

What is the expected behavior?
NavigatorUserMediaError {name: "PermissionDismissedError", message: "", constraintName: ""}

What went wrong?
PermissionDismissedError was not fired

Did this work before? N/A 

Chrome version: 53.0.2785.143  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 23.0 r0
 
Components: -UI Blink>PermissionsAPI Blink>GetUserMedia UI>Browser>Permissions Blink>WebRTC Internals>Permissions
[mac triage]
Mergedinto: 653498
Status: Duplicate (was: Unconfirmed)
This issue seems to be similar to 653498 issue. Hence merging this issue to 653498.

Please undup if this is not similar issue.
Cc: kcaratt...@chromium.org f...@chromium.org raymes@chromium.org groby@chromium.org
Owner: dominickn@chromium.org
Status: Assigned (was: Duplicate)
This is similar to  crbug.com/653498 , but not caused by the same thing. Un-duplicating; I have a fix for both bugs out in review.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab

commit 3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab
Author: dominickn <dominickn@chromium.org>
Date: Thu Nov 10 00:28:23 2016

[Mac] Address buggy permission bubble behaviour on dismissal via ESC.

On Mac, triggering a permission prompt, dismissing it by pressing ESC
*twice*, then refreshing the page and triggering the prompt again
results in no prompt being displayed until the tab is switched away and
back. Pressing ESC *once* works as expected.

This happens because pressing the ESC key with the browser window
focused results in the PermissionRequestManager hiding all permission
bubbles, which has the side-effect of destroying the prompt UI surface.
The next prompt triggered then has no surface to be displayed on,
delaying its display until DisplayPendingRequests is called and the
surface is recreated (e.g. when switching tabs).

This CL fixes the problem by making the PermissionRequestManager
dismiss any open permission bubble, rather than hide them. This does not
destroy the prompt UI surface.

Additionally, pressing ESC on Mac does not properly dismiss a permission
prompt, i.e. the PermissionDecided callback is *not* run when a bubble
is dismissed with the keyboard, and the site is not informed of the
denied permission. This CL also addresses that issue by overriding
PermissionBubbleController::cancel to call
PermissionRequestManager::Closing(), and adding a new method called by the
Mac BrowserWindowController that also calls Closing(). This ensures that
old requests are always cleared when the bubble is hidden (otherwise they
will remain in the queue).

BUG=385088,  653497 ,  653498 
TEST=Visit a page which displays a permission bubble. Dismiss the bubble
by pressing ESC. Ensure that the permission denied callback is run.
Press ESC a second time. Refresh the page and ensure the permission
prompt can be seen.

TEST=Visit a page which displays a permission bubble. Click on the page
(not on the bubble) to change focus. Press ESC and ensure the bubble is
dismissed. Ensure that the permission denied callback is run. Refresh
the page and ensure the permission prompt can be seen.

Review-Url: https://codereview.chromium.org/2403763003
Cr-Commit-Position: refs/heads/master@{#431096}

[modify] https://crrev.com/3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab/chrome/browser/permissions/permission_request_manager.h
[modify] https://crrev.com/3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab/chrome/browser/ui/cocoa/browser_window_controller.mm
[modify] https://crrev.com/3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
[modify] https://crrev.com/3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
[modify] https://crrev.com/3fe468bfc1f6180bacebb8fcc0cbf9effc9394ab/chrome/browser/ui/views/website_settings/permission_prompt_impl.cc

Components: -Blink>GetUserMedia -Blink>WebRTC
Status: Fixed (was: Assigned)
Now fixed on Canary.

Sign in to add a comment