Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Issue 2694183005: Ensure autofill popup border is visible (Closed)

Created:
3 years, 10 months ago by ericrk
Modified:
3 years, 10 months ago
Reviewers:
robliao, Peter Kasting
CC:
chromium-reviews, vabr+watchlistpasswordmanager_chromium.org, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, mathp+autofillwatch_chromium.org, tfarina, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure autofill popup border is visible Autofill popup views request a certain size in DIPs. When we set the bounds of the view, these DIPs are converted to pixels, rounding up to a whole number of pixels in the process. The size in pixels is then converted back to DIPs, again rounding up. This gets us the true size of the view in DIPs. Because of these two round-ups, we may end up with 1 extra DIP in either dimension over what was requested. However, the content we draw is sized to the original request, leaving a row of pixels unused. To add to the confusion, the autofill views have a 1 pixel border. This border is computed from the actual size of the view, not the requested size. Because of this, there may be a 1 pixel gap between the border and the view's drawn content. While we could expand the view's drawn content to meet the border, we have the additional issue that, due to the rounding when converting from pixels to dips, this extra DIP may be clipped during actual rendering. Becuase of this, it's safer to push the border in to meet the content. This ensures that even if the border is partially clipped, you will still see a part of it. BUG=685867

Patch Set 1 : fixes #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -7 lines) Patch
M chrome/browser/ui/views/autofill/autofill_popup_base_view.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/autofill/autofill_popup_base_view.cc View 2 chunks +22 lines, -6 lines 1 comment Download
M chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (5 generated)
ericrk
3 years, 10 months ago (2017-02-15 10:10:01 UTC) #4
Peter Kasting
I'm about to go to bed, but when I go to review this, I'm going ...
3 years, 10 months ago (2017-02-15 11:58:59 UTC) #5
Peter Kasting
https://codereview.chromium.org/2694183005/diff/40001/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc File chrome/browser/ui/views/autofill/autofill_popup_base_view.cc (right): https://codereview.chromium.org/2694183005/diff/40001/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc#newcode108 chrome/browser/ui/views/autofill/autofill_popup_base_view.cc:108: // and right of the view. We fill this ...
3 years, 10 months ago (2017-02-16 00:30:26 UTC) #7
ericrk
On 2017/02/16 00:30:26, Peter Kasting wrote: > https://codereview.chromium.org/2694183005/diff/40001/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc > File chrome/browser/ui/views/autofill/autofill_popup_base_view.cc (right): > > https://codereview.chromium.org/2694183005/diff/40001/chrome/browser/ui/views/autofill/autofill_popup_base_view.cc#newcode108 ...
3 years, 10 months ago (2017-02-16 02:13:49 UTC) #9
ericrk
On 2017/02/16 02:13:49, ericrk wrote: > On 2017/02/16 00:30:26, Peter Kasting wrote: > > > ...
3 years, 10 months ago (2017-02-16 02:18:41 UTC) #10
robliao
On 2017/02/16 02:13:49, ericrk wrote: > On 2017/02/16 00:30:26, Peter Kasting wrote: > > > ...
3 years, 10 months ago (2017-02-16 02:29:23 UTC) #11
Peter Kasting
Any fix we do here will be imperfect, since without the DIP-to-px conversion work (or ...
3 years, 10 months ago (2017-02-16 07:17:23 UTC) #12
ericrk
On 2017/02/16 07:17:23, Peter Kasting wrote: > Any fix we do here will be imperfect, ...
3 years, 10 months ago (2017-02-16 20:58:21 UTC) #13
Peter Kasting
On 2017/02/16 20:58:21, ericrk wrote: > How would you like to go about making these ...
3 years, 10 months ago (2017-02-16 21:23:43 UTC) #14
Peter Kasting
3 years, 10 months ago (2017-02-17 02:38:49 UTC) #15
Note also https://codereview.chromium.org/2694933002/ , which might help w.r.t.
the border unscaled drawing part.

Powered by Google App Engine
This is Rietveld 408576698