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

Issue 2066303003: Adjust BackgroundWith1PxBorder corner radius to scale properly. (Closed)

Created:
4 years, 6 months ago by Peter Kasting
Modified:
4 years, 6 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adjust BackgroundWith1PxBorder corner radius to scale properly. The ".5" in the existing radius was intended to get to the middle of the stroke, but that portion of the radius value was in px and not DIP, so scaling the whole thing wasn't correct. Instead, set the corner radius to the value of the "inner radius", then add .5 after scaling. This fixes a problem where, at larger scale factors, the focus ring's curvature was slightly different than the edge's curvature. It also very slightly changes the appearance of the corner (no one would notice without zooming in). BUG=612758 TEST=none Committed: https://crrev.com/f38647f5f74e6b04d14cbd6473201b40ed855699 Cr-Commit-Position: refs/heads/master@{#400089}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move add inside cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -9 lines) Patch
M chrome/browser/ui/views/location_bar/background_with_1_px_border.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/location_bar/background_with_1_px_border.cc View 1 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Peter Kasting
4 years, 6 months ago (2016-06-15 22:31:24 UTC) #2
Evan Stade
lgtm https://codereview.chromium.org/2066303003/diff/1/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc File chrome/browser/ui/views/location_bar/background_with_1_px_border.cc (right): https://codereview.chromium.org/2066303003/diff/1/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc#newcode35 chrome/browser/ui/views/location_bar/background_with_1_px_border.cc:35: SkFloatToScalar(kCornerRadius * scale) + 0.5f; should the addition ...
4 years, 6 months ago (2016-06-15 23:51:48 UTC) #3
Peter Kasting
https://codereview.chromium.org/2066303003/diff/1/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc File chrome/browser/ui/views/location_bar/background_with_1_px_border.cc (right): https://codereview.chromium.org/2066303003/diff/1/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc#newcode35 chrome/browser/ui/views/location_bar/background_with_1_px_border.cc:35: SkFloatToScalar(kCornerRadius * scale) + 0.5f; On 2016/06/15 23:51:47, Evan ...
4 years, 6 months ago (2016-06-16 04:35:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066303003/20001
4 years, 6 months ago (2016-06-16 04:35:36 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-16 05:29:34 UTC) #8
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-16 05:29:38 UTC) #9
commit-bot: I haz the power
4 years, 6 months ago (2016-06-16 05:31:03 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/f38647f5f74e6b04d14cbd6473201b40ed855699
Cr-Commit-Position: refs/heads/master@{#400089}

Powered by Google App Engine
This is Rietveld 408576698