New issue
Advanced search Search tips

Issue 921964 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression : 'Wrench' and 'Avatar' menu icons hide on resizing the browser window to it's last limit.

Project Member Reported by sav...@virtusa.com, Jan 15

Issue description

Chrome Version : 73.0.3672.0 (Official Build) 85c08445cbd3b2c184402109493da9e9ad4b4dfa-refs/branch-heads/3672@{#1} 64 bit
OS : Mac(10.13.6, 10.13.1, 10.14.3)

What steps will reproduce the problem?
1. Launch chrome, take a fresh 'Person' and open NTP.
2. Now resize browser window from RHS towards it's last LHS limit.
3. Observe the 'Wrench' and 'Avatar' menu icon.

Actual Result : 'Wrench' and 'Avatar' menu icon hides on resizing the browser window to it's last limit.

Expected Result : User should be able to see and access 'Wrench' & 'Avatar' menus even when browser is resized. 

This is a regression issue broken in M-73 and below is the bisect information:
Good Build : 73.0.3643.0 (Revision : 617033)
Bad Build : 73.0.3644.0 (Revision : 617389)

Chromium bisect URL:

https://chromium.googlesource.com/chromium/src/+log/39448a3db140a19d21a1bbc7ce2739fefad914b5..75bb478ac3649caf7d93623b32974a0d05f9066c

Suspect: r617299 or r617287

@dfried: Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.

Note : 
1. Able to reproduce issue in Mac Dev build #73.0.3664.3
2. Unable to perform Per-revision bisect as it shows an traceback error; Tried on other machines but still getting the same error.
3. Hence provided suspect through 'Chromium bisect'.
4. This is Mac OS specific issue and the same is not reproducible in Windows (7,8,10) & Linux(14.04 LTS) OS

Thank you..!
 
Actual_Result.mov
9.3 MB View Download
Expected_Result.mov
9.8 MB View Download
Cc: pbos@chromium.org
+pbos@. Related to issue 916209 (comment 10).
Status: Started (was: Assigned)
It looks like the Mac logic is computing an invalid minimum width for the browser. I thought the Mac logic might be a little sketchy. I might need a Mac laptop to develop on though. Let me see what I can do.

Comment 3 Deleted

Comment 4 Deleted

Comment 5 by dfried@chromium.org, Jan 16 (6 days ago)

Cc: ellyjo...@chromium.org
I have found the culprit.

On Windows, when the browser is resizing, we ask the browser window for its minimum size and cap resize at that size. This is a native Windows resize feature (message WM_GETMINMAXINFO).

On Mac, we only ask the browser for its minimum size at startup.

The minimum width of the browser is largely controlled by the toolbar. The minimum width of the toolbar can change over time - if the user elects to show or hide the home button, if the identity chip expands to show a status, if the user navigates to a page that causes the Omnibox to show a security chip. Typically, at startup the toolbar is near its absolute smallest size as none of this additional detail is present.

Previously, when the browser ended up in a state where there was not enough room to display the omnibox, it would scale to below its minimum size, resulting in not being able to display even the entire hostname. This did not produce the kind of visual artifact we're seeing here, however.

Because the Mac only asks for the browser minimum size at startup, it does not include the security chip, cast button, profile chip expansion, etc. So if you navigate to a secure site or start casting and then resize the window to a very small size, previously the Omnibox would become unusably small, but now the toolbar is truncated (because the new FlexLayout logic respects the Omnibox's minimum size).

There are several solutions:
1. Have the browser ask for the window's minimum size on resize, like on Windows. This is the solution that is probably best but that I have least experience with from a platform point of view and would probably have to hand off to ellyjones@'s team.
2. Allow the Omnibox to scale below its minimum size. This would solve a handful of corner cases but could result in equally bad situations where security icons can't be displayed. Also it might require changes to FlexLayout or one of its helper classes to create a new behavior of "report my minimum size as X but allow me to scale down to Y < X".
3. Have Omnibox always report a larger minimum size to accommodate a security chip as well as status icons and enough space for the hostname.
4. Set a floor for minimum browser size irrespective of what BrowserView (and by extension ToolbarView) report.

I want to get feedback as to how we ought to proceed here.
(CC-ing ellyjones@ for a more knowledgeable perspective)

Comment 6 by dfried@chromium.org, Jan 16 (6 days ago)

Another option would be to use the ToolbarView's preferred size rather than minimum size in calculating the minimum browser size, but that doesn't feel right either.

Comment 7 Deleted

Comment 8 by dfried@chromium.org, Jan 16 (6 days ago)

Update: let's amend option 3 to actually be "make the minimum size smaller than the current preferred size, but always large enough to show a minimum amount of information.

Comment 9 by ellyjo...@chromium.org, Jan 17 (5 days ago)

I think the problem is isolated to BrowserNonClientFrameViewMac, which probably needs to pay attention to BrowserNonClientFrameView::UpdateMinimumSize() - unlike Windows (but apparently like Mus) Mac expects the minimum size to be "pushed" to the window server rather than it being "pulled" when a resize starts. Also, BrowserNonClientFrameViewMac::GetMinimumSize() totally ignores the BrowserView's size constraints, which isn't helping.

I made a CL that implements ::UpdateMinimumSize() in BrowserNonClientFrameViewMac and changes ::GetMinimumSize() to actually listen to the BrowserView: <https://chromium-review.googlesource.com/c/chromium/src/+/1417731>. I ran the repro steps from this bug against that CL and it appears to fix it.

Comment 10 by dfried@chromium.org, Jan 18 (4 days ago)

Thank you so much for doing this. I've been out sick but I'll take a look at the CL.

Comment 11 by dfried@chromium.org, Jan 19 (4 days ago)

Owner: ellyjo...@chromium.org
I'm handing off the bug; feel free to hand it back if you think there's other work that needs done on it.
Project Member

Comment 12 by bugdroid1@chromium.org, Today (15 hours ago)

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

commit a5e24036a831654fd74451a09a86e6ea33619dc1
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Tue Jan 22 15:25:05 2019

macviews: honor BrowserView minimum size

BrowserNonClientFrameViewMac ignores the size constraints of the BrowserView
and uses a hardcoded window size. This breaks when the BrowserView's layout
requires more space than the hardcoded window minimum size allows. This change
causes BrowserNonClientFrameViewMac to compute the its minimum size correctly
(including the Mac-specific width-to-height ratio for minimum sizes) and keeps
it synced to the WindowServer so that window resizes actually honor it.

Bug: 921964
Change-Id: I696471cbfbc6fdb0fa9f269a17a10f458536ca89
Reviewed-on: https://chromium-review.googlesource.com/c/1417731
Reviewed-by: Dana Fried <dfried@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624785}
[modify] https://crrev.com/a5e24036a831654fd74451a09a86e6ea33619dc1/chrome/browser/ui/views/frame/browser_non_client_frame_view.h
[modify] https://crrev.com/a5e24036a831654fd74451a09a86e6ea33619dc1/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.h
[modify] https://crrev.com/a5e24036a831654fd74451a09a86e6ea33619dc1/chrome/browser/ui/views/frame/browser_non_client_frame_view_mac.mm

Comment 13 by ellyjo...@chromium.org, Today (15 hours ago)

Status: Fixed (was: Started)

Comment 14 by meh...@chromium.org, Today (9 hours ago)

Status: Assigned (was: Fixed)
Hi ellyjones@: I tested Chromium Snapshot Version #624808 which includes your CL and unfortunately this isn't completely fixed :(

It still happens to first shrinked window when you Start Chromium. 

I attached a screencast. You also see, that when you resize the window, the top part moves beneath the Menubar.

Maybe you can take a look again, when your fix is in Canary.

Thanks in advance :)

screencast.mov
3.8 MB View Download

Sign in to add a comment