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

Issue 1394763003: Update LocationBarView Background (Closed)

Created:
5 years, 2 months ago by jonross
Modified:
5 years, 1 month ago
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

Update LocationBarView Background Update the rendering of the background of LocationBarView in order to match the programmatically rendering border. This fixes the 1 pixel gap between the border and the background. It also gets the corners to match up. TEST=manual testing on 100 and 200% devices BUG=527863 Committed: https://crrev.com/e026ad2bbf8946970784b810a771a5d31a6903e3 Cr-Commit-Position: refs/heads/master@{#357571}

Patch Set 1 : #

Total comments: 5

Patch Set 2 : Don't round popup #

Total comments: 1

Patch Set 3 : Subtractive Path Painting #

Total comments: 6

Patch Set 4 : Refactor Painting into a Background class #

Total comments: 27

Patch Set 5 : Move new background class into cbuvl #

Patch Set 6 : #

Total comments: 5

Patch Set 7 : #

Total comments: 10

Patch Set 8 : Update nomenclature #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -36 lines) Patch
M chrome/browser/ui/views/layout_constants.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/layout_constants.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
A chrome/browser/ui/views/location_bar/background_with_1_px_border.h View 1 2 3 4 5 6 7 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/location_bar/background_with_1_px_border.cc View 1 2 3 4 5 6 7 1 chunk +66 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 7 chunks +20 lines, -34 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 40 (8 generated)
jonross
PTAL
5 years, 2 months ago (2015-10-08 17:52:11 UTC) #3
Peter Kasting
https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode106 chrome/browser/ui/views/location_bar/location_bar_view.cc:106: void DrawScaledRoundRect(gfx::Canvas* canvas, Nit: I'd add a comment about ...
5 years, 2 months ago (2015-10-08 21:33:06 UTC) #4
jonross
https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1322 chrome/browser/ui/views/location_bar/location_bar_view.cc:1322: SkColorSetARGB(0x40, 0x00, 0x00, 0x00), border_rect); On 2015/10/08 21:33:06, Peter ...
5 years, 2 months ago (2015-10-09 15:14:18 UTC) #5
jonross
https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode106 chrome/browser/ui/views/location_bar/location_bar_view.cc:106: void DrawScaledRoundRect(gfx::Canvas* canvas, On 2015/10/08 21:33:06, Peter Kasting wrote: ...
5 years, 2 months ago (2015-10-09 15:59:24 UTC) #6
Peter Kasting
https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1322 chrome/browser/ui/views/location_bar/location_bar_view.cc:1322: SkColorSetARGB(0x40, 0x00, 0x00, 0x00), border_rect); On 2015/10/09 15:14:17, jonross ...
5 years, 2 months ago (2015-10-09 16:03:32 UTC) #7
jonross
On 2015/10/09 16:03:32, Peter Kasting wrote: > https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc > File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): > > https://codereview.chromium.org/1394763003/diff/20001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1322 ...
5 years, 2 months ago (2015-10-09 18:38:41 UTC) #9
Evan Stade
https://codereview.chromium.org/1394763003/diff/70001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/70001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode120 chrome/browser/ui/views/location_bar/location_bar_view.cc:120: rect->Inset(insets); you can just do rect->Inset(kOffset, kOffset)
5 years, 2 months ago (2015-10-09 20:00:24 UTC) #11
Evan Stade
yea, this patch definitely seems to heavily overlap with programmatically rendering the chip, so it's ...
5 years, 2 months ago (2015-10-09 20:34:38 UTC) #12
Peter Kasting
So, I'm a little unclear -- after Evan's comments, should I still look at this? ...
5 years, 2 months ago (2015-10-10 00:20:43 UTC) #13
Evan Stade
On 2015/10/10 00:20:43, Peter Kasting wrote: > So, I'm a little unclear -- after Evan's ...
5 years, 2 months ago (2015-10-12 18:35:30 UTC) #14
Peter Kasting
https://codereview.chromium.org/1394763003/diff/70001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/70001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1375 chrome/browser/ui/views/location_bar/location_bar_view.cc:1375: !is_popup_mode_); In the MD world, I don't think we ...
5 years, 2 months ago (2015-10-12 23:45:44 UTC) #15
jonross
On 2015/10/12 23:45:44, Peter Kasting wrote: > https://codereview.chromium.org/1394763003/diff/70001/chrome/browser/ui/views/location_bar/location_bar_view.cc > File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): > > https://codereview.chromium.org/1394763003/diff/70001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1375 ...
5 years, 2 months ago (2015-10-13 14:55:58 UTC) #16
Peter Kasting
Also take note of https://codereview.chromium.org/1393013007/ where I'm slightly simplifying the code to unscale the canvas.
5 years, 2 months ago (2015-10-13 22:14:27 UTC) #17
jonross
Separated the painting into a new Background class. I've rebased to include the Canvas->SaveAndUnscale. The ...
5 years, 2 months ago (2015-10-19 20:29:02 UTC) #18
Peter Kasting
https://codereview.chromium.org/1394763003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode164 chrome/browser/ui/views/location_bar/location_bar_view.cc:164: if (ui::MaterialDesignController::IsModeMaterial()) { Nit: Blank line above. https://codereview.chromium.org/1394763003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode1258 chrome/browser/ui/views/location_bar/location_bar_view.cc:1258: ...
5 years, 2 months ago (2015-10-19 21:09:44 UTC) #19
Evan Stade
cool, lgtm aside from resolving pkasting's concerns https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.cc File ui/views/background.cc (right): https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.cc#newcode90 ui/views/background.cc:90: // If ...
5 years, 2 months ago (2015-10-19 23:21:30 UTC) #20
Peter Kasting
https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.h File ui/views/background.h (right): https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.h#newcode61 ui/views/background.h:61: static Background* CreateSolidScaledBackground(SkColor background, On 2015/10/19 23:21:30, Evan Stade ...
5 years, 2 months ago (2015-10-19 23:32:23 UTC) #21
jonross
https://codereview.chromium.org/1394763003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc File chrome/browser/ui/views/location_bar/location_bar_view.cc (right): https://codereview.chromium.org/1394763003/diff/90001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode164 chrome/browser/ui/views/location_bar/location_bar_view.cc:164: if (ui::MaterialDesignController::IsModeMaterial()) { On 2015/10/19 21:09:44, Peter Kasting wrote: ...
5 years, 2 months ago (2015-10-20 18:54:54 UTC) #22
Peter Kasting
https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.cc File ui/views/background.cc (right): https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.cc#newcode51 ui/views/background.cc:51: const float kOffset = scale > 1.0f ? 1.5f ...
5 years, 2 months ago (2015-10-20 23:04:05 UTC) #23
jonross
https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.cc File ui/views/background.cc (right): https://codereview.chromium.org/1394763003/diff/90001/ui/views/background.cc#newcode51 ui/views/background.cc:51: const float kOffset = scale > 1.0f ? 1.5f ...
5 years, 2 months ago (2015-10-21 14:52:55 UTC) #24
Peter Kasting
https://codereview.chromium.org/1394763003/diff/130001/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/1394763003/diff/130001/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc#newcode30 chrome/browser/ui/views/location_bar/background_with_1_px_border.cc:30: border_rect_f.Inset(kPostScaleOffset, kPostScaleOffset); If evan is going to use this ...
5 years, 2 months ago (2015-10-21 16:55:57 UTC) #25
Evan Stade
https://codereview.chromium.org/1394763003/diff/130001/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/1394763003/diff/130001/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc#newcode30 chrome/browser/ui/views/location_bar/background_with_1_px_border.cc:30: border_rect_f.Inset(kPostScaleOffset, kPostScaleOffset); On 2015/10/21 16:55:57, Peter Kasting wrote: > ...
5 years, 2 months ago (2015-10-21 17:03:20 UTC) #26
jonross
https://codereview.chromium.org/1394763003/diff/130001/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/1394763003/diff/130001/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: border_rect_f.Inset(0.0f, kPreScaleOffset); On 2015/10/21 16:55:57, Peter Kasting wrote: > ...
5 years, 2 months ago (2015-10-21 17:34:50 UTC) #27
Peter Kasting
https://codereview.chromium.org/1394763003/diff/130001/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/1394763003/diff/130001/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: border_rect_f.Inset(0.0f, kPreScaleOffset); On 2015/10/21 17:34:50, jonross wrote: > On ...
5 years, 2 months ago (2015-10-21 18:05:36 UTC) #28
jonross
On 2015/10/21 18:05:36, Peter Kasting wrote: > https://codereview.chromium.org/1394763003/diff/130001/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): > > ...
5 years, 1 month ago (2015-10-30 19:03:10 UTC) #29
Peter Kasting
LGTM https://codereview.chromium.org/1394763003/diff/150001/chrome/browser/ui/views/layout_constants.h File chrome/browser/ui/views/layout_constants.h (right): https://codereview.chromium.org/1394763003/diff/150001/chrome/browser/ui/views/layout_constants.h#newcode28 chrome/browser/ui/views/layout_constants.h:28: LOCATION_BAR_EDGE_THICKNESS, Nit: Use BORDER rather than EDGE since ...
5 years, 1 month ago (2015-10-30 21:07:14 UTC) #30
jonross
I updated the background/border class to refer to popup mode instead of rounded corners. So ...
5 years, 1 month ago (2015-11-02 16:36:23 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394763003/110002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394763003/110002
5 years, 1 month ago (2015-11-03 14:35:38 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/135228)
5 years, 1 month ago (2015-11-03 16:56:35 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394763003/110002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394763003/110002
5 years, 1 month ago (2015-11-03 16:58:36 UTC) #38
commit-bot: I haz the power
Committed patchset #8 (id:110002)
5 years, 1 month ago (2015-11-03 18:30:18 UTC) #39
commit-bot: I haz the power
5 years, 1 month ago (2015-11-03 18:31:52 UTC) #40
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/e026ad2bbf8946970784b810a771a5d31a6903e3
Cr-Commit-Position: refs/heads/master@{#357571}

Powered by Google App Engine
This is Rietveld 408576698