MacViews: Permission bubble displays at wrong location on window resizing. |
||||||
Issue descriptionVersion: 53.0.2753.0 OS: Mac Pre-condition:Enable ‘Toolkit-Views WebUI-style Browser Dialogs’ flag. Test url:https://permission.site What steps will reproduce the problem? 1. Launch chrome and navigate to above url. 2. Click on ‘Auto Download’ such that the permission bubble is seen. 3. Resize the window by mouse dragging. What is the expected output? Permission bubble should move as well anchored to the left of the address bar What do you see instead? Permission bubble stays at the same location (See screenshot)
,
May 31 2016
Ah, yep, this is something we maybe forgot to plumb through. Moving is fine, and resizing from the bottom right is fine, but in other cases we need to watch for a window resize.
Cocoa does this in -[BrowserWindowController layoutSubviews]:
// Will update the location of the permission bubble when showing/hiding the
// top level toolbar in fullscreen.
PermissionBubbleManager* manager = [self permissionBubbleManager];
if (manager)
manager->UpdateAnchorPosition();
PermissionBubbleManager is cross-platform code and that should call into the PermissionBubbleViewViews::GetAnchorPoint() in permission_bubble_view_cocoa_views.mm. But.... for some reason it isn't :/.
Elly - do you want to take a look?
,
Jul 7 2016
Moving this nonessential bug to the next milestone. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 8 2016
Taking this bug Elly, let me know if you had started it.
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0b3631682321c7dee86957078c9c070a01bb3821 commit 0b3631682321c7dee86957078c9c070a01bb3821 Author: karandeepb <karandeepb@chromium.org> Date: Wed Aug 10 04:42:12 2016 MacViews: Reposition permission bubble on browser resize. On MacViews currently, permission bubble does not reposition itself on resizing the browser. The Cocoa implementation for PermissionPrompt (PermissionBubbleCocoa) has a PermissionBubbleController instance which listens for window resize notifications. On a Views browser, the repositioning is facilitated by the call to BubbleDialogDelegateView::OnWidgetBoundsChanged. But these approaches don't work for MacViews since PermissionPromptImpl does not have a PermissionBubbleController instance. Also, on the Cocoa browser BubbleDialogDelegateView::OnWidgetBoundsChanged won't be fired on a browser window resize. This CL updates windowDidResize: method on BrowserWindowController to inform the PermissionRequestManager to update the permission bubble position. It does this by introducing a new method updatePermissionBubbleAnchor on BrowserWindowController (Private). This also removes the need to override parentWindowDidResize: on PermissionBubbleController. BUG= 616006 TEST=Go to https://permission.site/. Ensure permission setting for Notifications is "Ask By Default". Click on Notifications. Permission bubble should appear. Resize the browser window by dragging the mouse. Ensure the permission bubble repositions itself correctly. Try with and without chrome://flags/#mac-views-webui-dialogs enabled. Review-Url: https://codereview.chromium.org/2227513002 Cr-Commit-Position: refs/heads/master@{#410956} [modify] https://crrev.com/0b3631682321c7dee86957078c9c070a01bb3821/chrome/browser/ui/cocoa/browser_window_controller.mm [modify] https://crrev.com/0b3631682321c7dee86957078c9c070a01bb3821/chrome/browser/ui/cocoa/browser_window_controller_private.h [modify] https://crrev.com/0b3631682321c7dee86957078c9c070a01bb3821/chrome/browser/ui/cocoa/browser_window_controller_private.mm [modify] https://crrev.com/0b3631682321c7dee86957078c9c070a01bb3821/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
,
Aug 10 2016
,
Aug 16 2016
Tested the issue on Mac 10.11.6 using 54.0.2830.0.Observed that Permission bubble is moving as well anchored to the left of the address bar. Please find attached screencast. Marking it as TE-Verified. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by karandeepb@chromium.org
, May 31 2016