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

Issue 715869 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

"Did you mean to go to..." infobar can truncate too much

Project Member Reported by lgar...@chromium.org, Apr 27 2017

Issue description

Chrome 60.0.3080.5
OSX 10.12.4

What steps will reproduce the problem?
(1) Run a local server at badssl.test (and point /etc/hosts at it)
(2) In a small window, enter "badssl.test" into the omnibox.

What is the expected result?
An infobar shows up with "Did you mean to go to http://badssl.test/?"

What happens instead?
The infobar shows "Did you mean to go to http://", even if there is plenty of space for the domain. (See screenshot.)

Perhaps there's too much padding on the right of the bar (for a button that doesn't exist)?
 
Screen Shot 2017-04-26 at 18.30.07.png
129 KB View Download
Cc: mpear...@chromium.org
Components: -UI>Browser>Omnibox -UI>Browser>Navigation
Labels: OS-Mac
Can you please test this on a non-Mac?  Mac has a different implementation of this infobar that all other platforms.  Until I hear back, I'm tentatively marking this as a Mac-only bug.

Removing omnibox label.  I know this feature is triggered by the omnibox, but this UI is not within the omnibox or omnibox code at all.

Also removing navigation label.
Cc: shrike@chromium.org
explicitly to shrike@ to triage, as I don't know who owns this code

Comment 3 by shrike@chromium.org, Apr 28 2017

Owner: tapted@chromium.org
Status: Assigned (was: Untriaged)
tapted@ - can you take a look?
Cc: tapted@chromium.org
Owner: sdy@chromium.org
Can you give more detailed repro instructions? I can't get that infobar to pop up on demand, and ChromeOmniboxNavigationObserver has no tests that I can find.

This might be an autolayout thing. Is this a regression?

I suspect this - https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm

[AlternateNavInfoBarDelegate addAdditionalControls] calls [self removeButtons] which does

- (void)removeButtons {
  // Extend the label all the way across.
  NSRect labelFrame = [label_.get() frame];
  labelFrame.size.width = NSMaxX([cancelButton_ frame]) - NSMinX(labelFrame);

this relies on 

a layout of cancelButton_, but addAdditionalControls is called from awakeFromNib before autoresizing masks are set up.

Comment 5 by sdy@chromium.org, May 1 2017

Auto Layout is still turned off. I can look at it eventually, but have a bunch of other things on my plate right now.

Comment 6 by sdy@chromium.org, Mar 19 2018

Owner: ----
Status: Available (was: Assigned)
FYI, an update/correction to comment #4: ChromeOmniboxNavigationObserver now has tests.
Labels: Hotlist-DesktopUIChecked
*** UI Mass triage ***

adding labels for expert review.

Sign in to add a comment