New issue
Advanced search Search tips

Issue 681081 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression
Team-Security-UX



Sign in to add a comment

PageInfo title string not left-aligned on Windows

Project Member Reported by elawrence@chromium.org, Jan 13 2017

Issue description

Chrome Version: 57.0.2980.0
OS: Windows 10.10586

What steps will reproduce the problem?
(1) Visit any HTTPS site
(2) Click the Security chip to open PageInfo

What is the expected result? Text is aligned

What happens instead? Title isn't aligned with the description text

Looks okay on OS X and in Chrome 55 for Windows.
 
Notaligned.png
20.9 KB View Download
Cc: tapted@chromium.org
Labels: -Pri-3 Pri-2
You are probably looking for a change made after 442777 (known good), but no later than 442788 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/e45198cfa72d361281a496ea16e794fe4aac64c7..04a7d729155baecab68fde4bedac49d5a1d1e9aa


Likely regressor:
https://chromium.googlesource.com/chromium/src/+/37240b4fdef1ec7017f59d4cb7ced8c655e5c595

Comment 2 by tapted@chromium.org, Jan 13 2017

Cc: -tapted@chromium.org
Labels: ReleaseBlock-Stable M-57
Owner: tapted@chromium.org
Status: Assigned (was: Untriaged)
gah - yeah I'll need to update the constants in website_settings_popup_view.cc so that it works with/without --secondary-ui-md

Comment 3 by tapted@chromium.org, Jan 17 2017

Cc: msw@chromium.org kylixrd@chromium.org
Status: Started (was: Assigned)
So actually I think this is a regression from two CLs that landed really close together.

r442683 (kylixrd) landed while r442779 (tapted) was in flight and changed some of the assumptions.

There's a change on r442683 that doesn't look right: https://codereview.chromium.org/2571613002/diff/160001/ui/views/bubble/bubble_dialog_delegate.cc#newcode109 changes the title margins for non-material from

gfx::Insets(kPanelVertMargin, kPanelHorizMargin, 0, kPanelHorizMargin)

(== 13/13/0/13)

to

views_delegate->GetDialogFrameViewInsets()

which (on non-harmony) is

gfx::Insets ViewsDelegate::GetDialogFrameViewInsets() {
  return gfx::Insets(kPanelVertMargin, kButtonHEdgeMarginNew, 0,
                     kButtonHEdgeMarginNew);
}

(== 13/20/0/20).


In any case, it looks like, since r442683, website_settings_popup_view now needs to deal with dynamic title margins. I think the neat way to do that is by exposing a title_margins_ member on BubbleDialogDelegate (which we tried not to do in https://codereview.chromium.org/2581493002, but things are different now :).

possible CL to fix: https://codereview.chromium.org/2640593002

Comment 4 by tapted@chromium.org, Jan 17 2017

How the dialog looks with/without --secondary-ui-md after the CL in https://codereview.chromium.org/2640593002
oib_views.png
180 KB View Download
oib_harmony.png
164 KB View Download
Project Member

Comment 5 by bugdroid1@chromium.org, Jan 18 2017

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

commit 57b697aa2605b6bbcb97352a32ccdb28204739e9
Author: tapted <tapted@chromium.org>
Date: Wed Jan 18 20:50:56 2017

Fix alignment of title/content on the OIB / Site Settings bubble.

r442683 adopted a dynamic inset for the title in bubble dialogs in order
to align with the content under Harmony. Shortly after, r442779 landed
and adopted the default bubble title view for the site settings bubble,
rather than providing a custom one. Title and content should always be
aligned on the site settings bubble (regardless of Harmony), so it now
needs to be aware of whether the title in the dialog is inset or not.

Harmony will align title and content by default. Otherwise, to fix
alignment for the site settings bubble, explicitly set the title margins
to match the content margins.

BUG= 681081 

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

[modify] https://crrev.com/57b697aa2605b6bbcb97352a32ccdb28204739e9/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
[modify] https://crrev.com/57b697aa2605b6bbcb97352a32ccdb28204739e9/ui/views/bubble/bubble_dialog_delegate.cc
[modify] https://crrev.com/57b697aa2605b6bbcb97352a32ccdb28204739e9/ui/views/bubble/bubble_dialog_delegate.h

Comment 6 by tapted@chromium.org, Jan 18 2017

Status: Fixed (was: Started)

Sign in to add a comment