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

Issue 745291 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Device Chooser opens offscreen when in HTML fullscreen

Project Member Reported by tapted@chromium.org, Jul 18 2017

Issue description

Chrome Version       : 61.0.3159.5
OS Version: OS X 10.12.5

What steps will reproduce the problem?
1. https://permission.site
2. Click Fullscreen
3. Click USB

What is the expected result?

Usable dialog

What happens instead of that?

Dialog offscreen

-> https://chromium-review.googlesource.com/c/575791/ should fix this for Mac
 
chooser_cocoa.png
212 KB View Download
chooser_views_harmony.png
213 KB View Download

Comment 1 by ortuno@chromium.org, Jul 18 2017

Cc: juncai@chromium.org
Components: Blink>Bluetooth Blink>USB
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 20 2017

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

commit 2410527ecf5e1baa7727ff9b08210b509912ae01
Author: Trent Apted <tapted@chromium.org>
Date: Thu Jul 20 23:53:49 2017

Consolidate PageInfo bubble anchoring logic.

Lots of things want to anchor off the page info icon. E.g.,
permission prompts, the device chooser UI, the first run bubble
and the page info bubble itself.

Unfortunately, the page info bubble is not always present (in
fullscreen for example), and we want to anchor toolkit-views bubbles
off a BrowserView as well as off a BrowserWindowCocoa. So anchoring
is not simple. Currently the logic that deals with this is scattered
around the codebase, and some of it is broken (e.g. crbug/745291).

This CL consolidates the anchoring for permission prompts and the
device chooser UI, for both of their Cocoa and Views versions. The
first run bubble will also use this in a follow-up.

The PageInfo bubble anchoring is a bit simpler since it can't be
shown in fullscreen. It's consolidated partially, but it has some
unnecessary plumbing as well, so more cleanups there are left for
another follow-up).

Bug:  728160 ,  745291 
Change-Id: Id8b3bb9284f8dcc83299aa92123d4ee6e58dddc4
Reviewed-on: https://chromium-review.googlesource.com/575791
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488494}
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/BUILD.gn
[add] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/bubble_anchor_util.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/browser_dialogs_views_mac.cc
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/browser_dialogs_views_mac.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/bubble_anchor_helper.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/bubble_anchor_helper.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/bubble_anchor_helper_views.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/bubble_anchor_helper_views.mm
[add] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/bubble_anchor_util_views_mac.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_cocoa.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_views_mac.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/permission_bubble/permission_bubble_controller_unittest.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/permission_bubble/permission_prompt_impl_views_mac.mm
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/cocoa/tab_dialogs_views_mac.mm
[add] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/bubble_anchor_util_views.cc
[add] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/bubble_anchor_util_views.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui.cc
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/permission_bubble/chooser_bubble_ui_views.cc
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.h
[modify] https://crrev.com/2410527ecf5e1baa7727ff9b08210b509912ae01/chrome/browser/ui/views/permission_bubble/permission_prompt_impl_views.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 1 2017

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

commit debb20bc74b633b996516e2b5859da40e2e82440
Author: Trent Apted <tapted@chromium.org>
Date: Tue Aug 01 02:53:33 2017

Fix positioning of the Cocoa device chooser.

This regressed in r469822, which corrected the way a class of bubbles
detect whether the browser is fullscreen. Unfortunately, this particular
bubble does not anchor properly on Mac when fullscreen was detected.

The bubble should always anchor top-left (leading) so that it doesn't
obscure the fullscreen bubble.

Bug:  749410 ,  745291 
Test: At https://permission.site, click Fullscreen, then USB. The dialog
      should appear on-screen.

Change-Id: Ieeca54305f0884cd9fe6ec3e7b1611332df08499
Reviewed-on: https://chromium-review.googlesource.com/593368
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490841}
[modify] https://crrev.com/debb20bc74b633b996516e2b5859da40e2e82440/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_cocoa.mm

Status: Fixed (was: Started)
Let's call this one Fixed. But  Issue 749410  will need a merge.
Cc: hdodda@chromium.org
Labels: Needs-Feedback
Tested the issue on Mac Os 10.12.5 using chrome M62 #62.0.3174.0 and in reported version M61 #61.0.3159.5 and followed below steps :

1. Navigated to https://permission.site
2. Clicked on fullscreen and clicked usb and observed similar behavior in bothe versions.

Attached screenshot for reference.

@tapted-- Could you please check attached screenshot and confirm us if this is the exepected result.

Thanks!
latest behavior.png
121 KB View Download
I double checked. Current behaviour is correct. For the M61 repro, you may need a dual-screen setup, with the browser on the right screen, and macOS blanking the left screen ("Screens Have Separate Spaces" OS feature disabled).
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 4 2017

Labels: merge-merged-3163
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73ecf0129d044a4e1137afbbb9c3fab6294edbd2

commit 73ecf0129d044a4e1137afbbb9c3fab6294edbd2
Author: Trent Apted <tapted@chromium.org>
Date: Fri Aug 04 02:50:03 2017

[merge-m60] Fix positioning of the Cocoa device chooser.

This regressed in r469822, which corrected the way a class of bubbles
detect whether the browser is fullscreen. Unfortunately, this particular
bubble does not anchor properly on Mac when fullscreen was detected.

The bubble should always anchor top-left (leading) so that it doesn't
obscure the fullscreen bubble.

Bug:  749410 ,  745291 
Test: At https://permission.site, click Fullscreen, then USB. The dialog
      should appear on-screen.

TBR=tapted@chromium.org

(cherry picked from commit debb20bc74b633b996516e2b5859da40e2e82440)

Change-Id: Ieeca54305f0884cd9fe6ec3e7b1611332df08499
Reviewed-on: https://chromium-review.googlesource.com/593368
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#490841}
Reviewed-on: https://chromium-review.googlesource.com/601629
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/branch-heads/3163@{#305}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/73ecf0129d044a4e1137afbbb9c3fab6294edbd2/chrome/browser/ui/cocoa/permission_bubble/chooser_bubble_ui_cocoa.mm

Cc: ranjitkan@chromium.org
Labels: TE-Verified-M61 TE-Verified-61.0.3163.39
Rechecked this issue on chrome version 61.0.3163.39 on MAC 10.12.6 both using a single screen and a dual screen. Fix is working as intended. Dialog is displayed fine. Adding TE-verified labels.

Thanks.!

Sign in to add a comment