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

Issue 381953002: New avatar button: Consolidate text elision between Mac and Win/Linux (Closed)

Created:
6 years, 5 months ago by Marc Treib
Modified:
6 years, 5 months ago
CC:
chromium-reviews, tfarina
Project:
chromium
Visibility:
Public.

Description

New avatar button: Consolidate text elision between Mac and Win/Linux This is a cleanup, as discussed in the comments of https://codereview.chromium.org/287103004/ This turned out to require extending gfx::TruncateString with an extra BreakType parameter; it now supports breaking within words as well as at word boundaries. All call sites have been updated accordingly. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284933

Patch Set 1 #

Total comments: 4

Patch Set 2 : use TruncateString #

Total comments: 6

Patch Set 3 : nit #

Patch Set 4 : use gfx::BreakType #

Total comments: 38

Patch Set 5 : nits #

Total comments: 4

Patch Set 6 : nits2 #

Total comments: 2

Patch Set 7 : nits3 (and rebase) #

Patch Set 8 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -124 lines) Patch
M chrome/browser/extensions/menu_manager.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profiles_state.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profiles_state.cc View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm View 1 2 3 4 5 chunks +2 lines, -23 lines 0 comments Download
M chrome/browser/ui/location_bar/location_bar_util.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_button.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -29 lines 0 comments Download
M ui/gfx/text_elider.h View 1 2 3 4 2 chunks +8 lines, -7 lines 0 comments Download
M ui/gfx/text_elider.cc View 1 2 3 4 2 chunks +42 lines, -38 lines 0 comments Download
M ui/gfx/text_elider_unittest.cc View 1 2 3 1 chunk +31 lines, -8 lines 0 comments Download
M ui/message_center/views/notification_view.cc View 1 2 3 4 5 6 5 chunks +15 lines, -13 lines 0 comments Download
M ui/views/corewm/tooltip_aura.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/tooltip_manager.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 35 (0 generated)
Marc Treib
Somewhat delayed, but I didn't forget! ;) PTAL!
6 years, 5 months ago (2014-07-11 10:55:27 UTC) #1
noms (inactive)
Would you mind attaching some screenshots? I remember that when I looked into this, the ...
6 years, 5 months ago (2014-07-11 13:21:57 UTC) #2
Marc Treib
On 2014/07/11 13:21:57, Monica Dinculescu wrote: > Would you mind attaching some screenshots? I remember ...
6 years, 5 months ago (2014-07-11 13:45:44 UTC) #3
msw
https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc#newcode88 chrome/browser/profiles/profiles_state.cc:88: const int kMaxCharactersToDisplay = 15; On 2014/07/11 13:21:57, Monica ...
6 years, 5 months ago (2014-07-11 22:17:06 UTC) #4
Marc Treib
On 2014/07/11 22:17:06, msw wrote: > https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc > File chrome/browser/profiles/profiles_state.cc (right): > > https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc#newcode88 > ...
6 years, 5 months ago (2014-07-14 08:54:43 UTC) #5
msw
On 2014/07/14 08:54:43, treib wrote: > On 2014/07/11 22:17:06, msw wrote: > > > https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc ...
6 years, 5 months ago (2014-07-14 17:02:48 UTC) #6
Marc Treib
On 2014/07/14 17:02:48, msw wrote: > On 2014/07/14 08:54:43, treib wrote: > > On 2014/07/11 ...
6 years, 5 months ago (2014-07-16 09:57:39 UTC) #7
msw
https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc#newcode92 chrome/browser/profiles/profiles_state.cc:92: font_list.GetExpectedTextWidth(kMaxCharactersToDisplay), Could you use gfx::TruncateString instead, since you more ...
6 years, 5 months ago (2014-07-16 16:58:28 UTC) #8
Marc Treib
https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/381953002/diff/1/chrome/browser/profiles/profiles_state.cc#newcode92 chrome/browser/profiles/profiles_state.cc:92: font_list.GetExpectedTextWidth(kMaxCharactersToDisplay), On 2014/07/16 16:58:28, msw wrote: > Could you ...
6 years, 5 months ago (2014-07-17 08:43:00 UTC) #9
Marc Treib
I've extended gfx::TruncateString to optionally cut anywhere (instead of only at word boundaries), and now ...
6 years, 5 months ago (2014-07-17 15:15:24 UTC) #10
msw
Nice work, but I wonder if we ought to modify TruncateString at all, since it ...
6 years, 5 months ago (2014-07-17 17:18:35 UTC) #11
noms (inactive)
I don't think we were enforcing breaking after a word before, nor is it a ...
6 years, 5 months ago (2014-07-17 17:33:36 UTC) #12
Marc Treib
Right, the TruncateString changes will only make a difference if there is a word break ...
6 years, 5 months ago (2014-07-18 10:05:09 UTC) #13
msw
https://codereview.chromium.org/381953002/diff/20001/ui/gfx/text_elider.h File ui/gfx/text_elider.h (right): https://codereview.chromium.org/381953002/diff/20001/ui/gfx/text_elider.h#newcode162 ui/gfx/text_elider.h:162: bool only_at_word_breaks); On 2014/07/18 10:05:09, treib wrote: > On ...
6 years, 5 months ago (2014-07-18 19:21:48 UTC) #14
Marc Treib
https://codereview.chromium.org/381953002/diff/20001/ui/gfx/text_elider.h File ui/gfx/text_elider.h (right): https://codereview.chromium.org/381953002/diff/20001/ui/gfx/text_elider.h#newcode162 ui/gfx/text_elider.h:162: bool only_at_word_breaks); On 2014/07/18 19:21:48, msw wrote: > On ...
6 years, 5 months ago (2014-07-21 09:03:00 UTC) #15
msw
Thanks, just some unused headers/decls and nits remain. https://codereview.chromium.org/381953002/diff/60001/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm File chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm (right): https://codereview.chromium.org/381953002/diff/60001/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm#newcode16 chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm:16: #include ...
6 years, 5 months ago (2014-07-21 15:26:08 UTC) #16
Marc Treib
Thanks for the detailed comments! All done. https://codereview.chromium.org/381953002/diff/60001/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm File chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm (right): https://codereview.chromium.org/381953002/diff/60001/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm#newcode16 chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm:16: #include "grit/generated_resources.h" ...
6 years, 5 months ago (2014-07-21 16:43:52 UTC) #17
msw
lgtm with nits https://codereview.chromium.org/381953002/diff/80001/ui/message_center/views/notification_view.cc File ui/message_center/views/notification_view.cc (right): https://codereview.chromium.org/381953002/diff/80001/ui/message_center/views/notification_view.cc#newcode562 ui/message_center/views/notification_view.cc:562: base::string16 title = gfx::TruncateString(notification.message(), nit: rename ...
6 years, 5 months ago (2014-07-21 16:47:29 UTC) #18
Marc Treib
https://codereview.chromium.org/381953002/diff/80001/ui/message_center/views/notification_view.cc File ui/message_center/views/notification_view.cc (right): https://codereview.chromium.org/381953002/diff/80001/ui/message_center/views/notification_view.cc#newcode562 ui/message_center/views/notification_view.cc:562: base::string16 title = gfx::TruncateString(notification.message(), On 2014/07/21 16:47:29, msw wrote: ...
6 years, 5 months ago (2014-07-22 08:12:48 UTC) #19
Marc Treib
Adding reviewers for the remaining parts. It's all simple stuff that doesn't change behavior. lazyboy@chromium.org: ...
6 years, 5 months ago (2014-07-22 08:15:38 UTC) #20
noms (inactive)
c/b/profiles lgtm (with a small nit) https://codereview.chromium.org/381953002/diff/100001/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/381953002/diff/100001/chrome/browser/profiles/profiles_state.cc#newcode92 chrome/browser/profiles/profiles_state.cc:92: name = l10n_util::GetStringFUTF16(IDS_SUPERVISED_USER_NEW_AVATAR_LABEL, ...
6 years, 5 months ago (2014-07-22 13:40:59 UTC) #21
Marc Treib
https://codereview.chromium.org/381953002/diff/100001/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/381953002/diff/100001/chrome/browser/profiles/profiles_state.cc#newcode92 chrome/browser/profiles/profiles_state.cc:92: name = l10n_util::GetStringFUTF16(IDS_SUPERVISED_USER_NEW_AVATAR_LABEL, On 2014/07/22 13:40:59, Monica Dinculescu wrote: ...
6 years, 5 months ago (2014-07-22 14:12:44 UTC) #22
lazyboy
render_view_context_menu LGTM
6 years, 5 months ago (2014-07-22 16:14:27 UTC) #23
Devlin
extensions lgtm
6 years, 5 months ago (2014-07-22 16:31:13 UTC) #24
Jun Mukai
message_center lgtm
6 years, 5 months ago (2014-07-22 16:44:26 UTC) #25
sadrul
lgtm Please update the CL description to include some details about the CL (e.g. the ...
6 years, 5 months ago (2014-07-22 16:51:11 UTC) #26
Marc Treib
The CQ bit was checked by treib@chromium.org
6 years, 5 months ago (2014-07-23 08:27:57 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/381953002/120001
6 years, 5 months ago (2014-07-23 08:28:52 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_compile_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-23 09:39:38 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-23 09:45:50 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win8_chromium_rel/builds/5291)
6 years, 5 months ago (2014-07-23 09:45:51 UTC) #31
Marc Treib
The CQ bit was checked by treib@chromium.org
6 years, 5 months ago (2014-07-23 10:51:50 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/381953002/160001
6 years, 5 months ago (2014-07-23 10:53:21 UTC) #33
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-23 14:06:38 UTC) #34
commit-bot: I haz the power
6 years, 5 months ago (2014-07-23 15:53:06 UTC) #35
Message was sent while issue was closed.
Change committed as 284933

Powered by Google App Engine
This is Rietveld 408576698