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

Issue 22835002: Supports gfx::FontList in gfx::Canvas and ui::ElideText family. (Closed)

Created:
7 years, 4 months ago by Yuki
Modified:
7 years, 4 months ago
CC:
chromium-reviews, tfarina, ben+watch_chromium.org, rohitrao (ping after 24h)
Visibility:
Public.

Description

Supports gfx::FontList in gfx::Canvas and ui::ElideText family. This is a part of the plan to support gfx::FontList in views::Label. https://docs.google.com/a/chromium.org/document/d/1D_25fp9B8b9aZJORfAjDIFq61NWvUquZ5xmKH-VcC4k/edit BUG=265485 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218926

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Updates based on review comments. #

Total comments: 18

Patch Set 3 : Updates based on review comments. #

Total comments: 3

Patch Set 4 : Synced. #

Patch Set 5 : Adds canvas_ios.mm and removes canvas_android.cc. #

Total comments: 4

Patch Set 6 : Synced. #

Patch Set 7 : Updated based on review comments. Fixed iOS build. #

Patch Set 8 : s/NOTREACHED/NOTIMPLEMENTED/ #

Total comments: 15

Patch Set 9 : Introduces layout_text.h to provide GetStringWidth(). #

Total comments: 5

Patch Set 10 : layout_text.h => text_utils.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+651 lines, -323 lines) Patch
M chrome/browser/ui/cocoa/download/download_item_cell.mm View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/status_bubble_mac.mm View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/gtk/content_setting_bubble_gtk.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/gtk/status_bubble_gtk.cc View 1 chunk +1 line, -0 lines 0 comments Download
M printing/print_settings_initializer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/cocoa/menu_controller.mm View 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/text/text_elider.h View 7 chunks +37 lines, -8 lines 0 comments Download
M ui/base/text/text_elider.cc View 1 2 3 4 5 6 7 8 9 30 chunks +116 lines, -68 lines 0 comments Download
M ui/gfx/canvas.h View 1 2 3 4 5 6 7 8 13 chunks +151 lines, -76 lines 0 comments Download
M ui/gfx/canvas.cc View 1 2 3 4 5 6 7 8 23 chunks +168 lines, -90 lines 0 comments Download
M ui/gfx/canvas_android.cc View 1 2 3 4 5 6 7 8 2 chunks +17 lines, -9 lines 0 comments Download
M ui/gfx/canvas_mac.mm View 1 2 3 4 5 6 7 8 4 chunks +20 lines, -19 lines 0 comments Download
M ui/gfx/canvas_skia.cc View 1 2 3 4 5 6 7 8 15 chunks +69 lines, -51 lines 0 comments Download
M ui/gfx/text_utils.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
A ui/gfx/text_utils_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +16 lines, -0 lines 0 comments Download
A ui/gfx/text_utils_ios.mm View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -0 lines 0 comments Download
A ui/gfx/text_utils_skia.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -2 lines 0 comments Download
M ui/views/widget/tooltip_manager.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 44 (0 generated)
Yuki
Could you review this CL?
7 years, 4 months ago (2013-08-12 14:16:32 UTC) #1
Alexei Svitkine (slow)
mostly looks good, here's some comments your way Thanks! https://codereview.chromium.org/22835002/diff/22001/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://codereview.chromium.org/22835002/diff/22001/ui/base/text/text_elider.cc#newcode209 ui/base/text/text_elider.cc:209: ...
7 years, 4 months ago (2013-08-12 18:16:20 UTC) #2
Yuki
https://codereview.chromium.org/22835002/diff/22001/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://codereview.chromium.org/22835002/diff/22001/ui/base/text/text_elider.cc#newcode209 ui/base/text/text_elider.cc:209: available_pixel_width - GetStringWidth(domain, font_list), ELIDE_AT_END); On 2013/08/12 18:16:21, Alexei ...
7 years, 4 months ago (2013-08-13 09:32:12 UTC) #3
Alexei Svitkine (slow)
LGTM, thanks!
7 years, 4 months ago (2013-08-13 13:41:52 UTC) #4
Alexei Svitkine (slow)
On 2013/08/13 13:41:52, Alexei Svitkine wrote: > LGTM, thanks! However, it looks like the iOS ...
7 years, 4 months ago (2013-08-13 13:43:49 UTC) #5
Alexei Svitkine (slow)
+cc stuartmorgan for thoughts / FYI about the iOS stuff I think currently iOS might ...
7 years, 4 months ago (2013-08-13 14:58:39 UTC) #6
msw
Perhaps it's okay to overlook the discouraged overloading if you're committed to resolving all overloads ...
7 years, 4 months ago (2013-08-13 17:39:21 UTC) #7
stuartmorgan
iOS does use Skia for some things, just not for fonts. Making the text code ...
7 years, 4 months ago (2013-08-13 17:52:15 UTC) #8
Alexei Svitkine (slow)
On Tue, Aug 13, 2013 at 1:52 PM, <stuartmorgan@chromium.org> wrote: > iOS does use Skia ...
7 years, 4 months ago (2013-08-13 18:09:33 UTC) #9
stuartmorgan
On 2013/08/13 18:09:33, Alexei Svitkine wrote: > See above for the reason. If you re-read ...
7 years, 4 months ago (2013-08-13 18:26:13 UTC) #10
Alexei Svitkine (slow)
On Tue, Aug 13, 2013 at 2:26 PM, <stuartmorgan@chromium.org> wrote: > On 2013/08/13 18:09:33, Alexei ...
7 years, 4 months ago (2013-08-13 19:02:48 UTC) #11
Yuki
To: msw Thanks for comments. I've addressed your comments except for canvas_android.cc. I'm now working ...
7 years, 4 months ago (2013-08-14 15:42:16 UTC) #12
msw
LGTM, thanks. https://codereview.chromium.org/22835002/diff/33001/ui/base/text/text_elider.h File ui/base/text/text_elider.h (right): https://codereview.chromium.org/22835002/diff/33001/ui/base/text/text_elider.h#newcode49 ui/base/text/text_elider.h:49: UI_EXPORT string16 ElideEmail(const string16& email, On 2013/08/14 ...
7 years, 4 months ago (2013-08-14 17:26:40 UTC) #13
Yuki
https://codereview.chromium.org/22835002/diff/33001/ui/base/text/text_elider.h File ui/base/text/text_elider.h (right): https://codereview.chromium.org/22835002/diff/33001/ui/base/text/text_elider.h#newcode49 ui/base/text/text_elider.h:49: UI_EXPORT string16 ElideEmail(const string16& email, On 2013/08/14 17:26:40, msw ...
7 years, 4 months ago (2013-08-14 17:48:26 UTC) #14
msw
https://codereview.chromium.org/22835002/diff/56001/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://codereview.chromium.org/22835002/diff/56001/ui/base/text/text_elider.cc#newcode36 ui/base/text/text_elider.cc:36: int GetStringWidth(const base::string16& text, const gfx::FontList& font_list) { On ...
7 years, 4 months ago (2013-08-14 17:50:50 UTC) #15
Yuki
Hi reviewers, I've removed canvas_android.cc (which was not needed) and added new canvas_ios.mm (which comes ...
7 years, 4 months ago (2013-08-16 16:46:57 UTC) #16
msw
Note that it looks like you didn't actually "rm canvas_android.cc" but instead just cleared out ...
7 years, 4 months ago (2013-08-16 16:59:24 UTC) #17
Yuki
Thanks for the comments. I thought I had done "git rm ui/gfx/canvas_android.cc". Let me check ...
7 years, 4 months ago (2013-08-16 17:24:31 UTC) #18
msw
https://codereview.chromium.org/22835002/diff/94002/ui/gfx/canvas.cc File ui/gfx/canvas.cc (right): https://codereview.chromium.org/22835002/diff/94002/ui/gfx/canvas.cc#newcode96 ui/gfx/canvas.cc:96: #if defined(OS_ANDROID) On 2013/08/16 17:24:31, Yuki wrote: > On ...
7 years, 4 months ago (2013-08-16 17:31:39 UTC) #19
Yuki
https://codereview.chromium.org/22835002/diff/94002/ui/gfx/canvas.cc File ui/gfx/canvas.cc (right): https://codereview.chromium.org/22835002/diff/94002/ui/gfx/canvas.cc#newcode96 ui/gfx/canvas.cc:96: #if defined(OS_ANDROID) On 2013/08/16 17:31:39, msw wrote: > On ...
7 years, 4 months ago (2013-08-16 18:29:27 UTC) #20
Yuki
Could you take another look? I've addressed your review comments, and removed canvas.cc from iOS ...
7 years, 4 months ago (2013-08-19 11:47:55 UTC) #21
Alexei Svitkine (slow)
Looks great, but please address my nits below. LGTM. https://codereview.chromium.org/22835002/diff/88004/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://codereview.chromium.org/22835002/diff/88004/ui/base/text/text_elider.cc#newcode328 ui/base/text/text_elider.cc:328: ...
7 years, 4 months ago (2013-08-19 14:17:28 UTC) #22
stuartmorgan
On 2013/08/13 19:02:48, Alexei Svitkine wrote: > The reason I was suggesting the canvas_ios.mm approach ...
7 years, 4 months ago (2013-08-19 14:21:11 UTC) #23
msw
I don't have much of an opinion on the iOS/Mac API quandry. Stuart, do you ...
7 years, 4 months ago (2013-08-19 19:05:42 UTC) #24
stuartmorgan
Comment 10 and the end of comment 11 discusses what I would suggest for this ...
7 years, 4 months ago (2013-08-19 22:08:10 UTC) #25
Yuki
I've introduced layout_text.h and gfx::LayoutText::GetStringWidth(), and also addressed review comments. Could you take a look? ...
7 years, 4 months ago (2013-08-20 15:05:46 UTC) #26
Yuki
erg@: Could you review the following files as an owner? chrome/browser/ui/gtk/content_setting_bubble_gtk.cc chrome/browser/ui/gtk/status_bubble_gtk.cc vandebo@: Could you ...
7 years, 4 months ago (2013-08-20 15:16:50 UTC) #27
Alexei Svitkine (slow)
https://codereview.chromium.org/22835002/diff/26004/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://codereview.chromium.org/22835002/diff/26004/ui/base/text/text_elider.cc#newcode37 ui/base/text/text_elider.cc:37: return gfx::LayoutText::GetStringWidth(text, font_list); I think if we remove LayoutText ...
7 years, 4 months ago (2013-08-20 15:17:20 UTC) #28
Yuki
On 2013/08/20 15:16:50, Yuki wrote: > erg@: Could you review the following files as an ...
7 years, 4 months ago (2013-08-20 15:22:24 UTC) #29
sadrul
> sadrul@: Could you review the following file as an owner? > ui/views/widget/tooltip_manager.cc LGTM
7 years, 4 months ago (2013-08-20 16:05:26 UTC) #30
vandebo (ex-Chrome)
On 2013/08/20 15:16:50, Yuki wrote: > vandebo@: Could you review the following file as an ...
7 years, 4 months ago (2013-08-20 16:28:16 UTC) #31
msw
LGTM with LayoutText class removal for gfx::GetStringWidth, etc.
7 years, 4 months ago (2013-08-20 16:37:37 UTC) #32
Yuki
To stuartmorgan@ Are you okay to define gfx::GetStringWidth(text, font_list) in layout_text.h? Please let me know ...
7 years, 4 months ago (2013-08-20 16:45:41 UTC) #33
Alexei Svitkine (slow)
Maybe just put the declaration in ui/gfx/text_utils.h and then you can make text_utils_skia.cc and text_utils_ios.mm ...
7 years, 4 months ago (2013-08-20 16:52:19 UTC) #34
stuartmorgan
On 2013/08/20 16:45:41, Yuki wrote: > Are you okay to define gfx::GetStringWidth(text, font_list) in layout_text.h? ...
7 years, 4 months ago (2013-08-20 20:47:57 UTC) #35
Elliot Glaysher
gtk lgtm
7 years, 4 months ago (2013-08-20 21:05:06 UTC) #36
Yuki
I've moved the GetStringWidth function to text_utils.h as gfx::GetStringWidth(). On 2013/08/20 20:47:57, stuartmorgan wrote: > ...
7 years, 4 months ago (2013-08-21 03:42:21 UTC) #37
Yuki
https://codereview.chromium.org/22835002/diff/26004/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://codereview.chromium.org/22835002/diff/26004/ui/base/text/text_elider.cc#newcode37 ui/base/text/text_elider.cc:37: return gfx::LayoutText::GetStringWidth(text, font_list); On 2013/08/20 15:17:21, Alexei Svitkine wrote: ...
7 years, 4 months ago (2013-08-21 03:42:44 UTC) #38
Yuki
+rsesek@ Could you review the following file as an owner? ui/base/cocoa/menu_controller.mm I've made a change ...
7 years, 4 months ago (2013-08-21 03:48:13 UTC) #39
Alexei Svitkine (slow)
lgtm
7 years, 4 months ago (2013-08-21 12:59:54 UTC) #40
Robert Sesek
lgtm
7 years, 4 months ago (2013-08-21 14:02:01 UTC) #41
Yuki
Will commit this CL. Feel free to put comments, I'll work on them in a ...
7 years, 4 months ago (2013-08-22 01:00:45 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/22835002/169001
7 years, 4 months ago (2013-08-22 01:05:13 UTC) #43
commit-bot: I haz the power
7 years, 4 months ago (2013-08-22 07:20:11 UTC) #44
Message was sent while issue was closed.
Change committed as 218926

Powered by Google App Engine
This is Rietveld 408576698