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

Issue 21868004: Supports FontList::DeriveFontListWithSizeDeltaAndStyle, etc. (Closed)

Created:
7 years, 4 months ago by Yuki
Modified:
7 years, 4 months ago
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org, Peter Kasting, Alexei Svitkine (slow)
Visibility:
Public.

Description

Supports FontList::DeriveFontListWithSizeDeltaAndStyle, etc. This CL improves FontList so the class has useful methods for replacing Font class. Also improves the performance of GetFontStyle() and GetFontSize(). This CL also adds GetAverageCharacterWidth(), GetStringWidth(), and GetExpectedTextWidth(). These methods are supported by Font class, and FontList should implement them for replacing Font. Just FYI, I'm now working on http://crrev.com/21736002 , and these new methods are used there. BUG=265485 TEST=Included in the unittests as ui_unittests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216563

Patch Set 1 #

Total comments: 23

Patch Set 2 : Fixes based on review comments. #

Total comments: 4

Patch Set 3 : Added a TODO comment, updated comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -86 lines) Patch
M build/android/pylib/gtest/filter/ui_unittests_disabled View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/font_list.h View 1 2 5 chunks +35 lines, -0 lines 0 comments Download
M ui/gfx/font_list.cc View 1 2 5 chunks +104 lines, -80 lines 0 comments Download
M ui/gfx/font_list_unittest.cc View 1 3 chunks +62 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Yuki
Could you review this CL?
7 years, 4 months ago (2013-08-02 16:35:55 UTC) #1
Yuki
ping? (Just as a friendly reminder.)
7 years, 4 months ago (2013-08-06 03:31:29 UTC) #2
msw
Sorry for the review delay. Alexei should probably take a look too. These new functions ...
7 years, 4 months ago (2013-08-06 05:10:14 UTC) #3
Yuki
On 2013/08/06 05:10:14, msw wrote: > Sorry for the review delay. Alexei should probably take ...
7 years, 4 months ago (2013-08-06 06:02:38 UTC) #4
msw
On 2013/08/06 06:02:38, Yuki wrote: > On 2013/08/06 05:10:14, msw wrote: > > Sorry for ...
7 years, 4 months ago (2013-08-06 06:22:55 UTC) #5
Alexei Svitkine (slow)
https://codereview.chromium.org/21868004/diff/1/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/21868004/diff/1/ui/gfx/font_list.cc#newcode96 ui/gfx/font_list.cc:96: font_style, font_size)), I think font_style can go on the ...
7 years, 4 months ago (2013-08-06 15:15:27 UTC) #6
Yuki
Thanks for the comments and advice. I'll remove DeriveFontList(style) and DeriveFontListWithSize(absolute_size) after I remove use ...
7 years, 4 months ago (2013-08-07 14:34:03 UTC) #7
msw
LGTM; thanks! https://codereview.chromium.org/21868004/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/21868004/diff/1/ui/gfx/font_list_unittest.cc#newcode266 ui/gfx/font_list_unittest.cc:266: EXPECT_EQ("Arial|13|italic", FontToString(derived_fonts[0])); On 2013/08/07 14:34:03, Yuki wrote: ...
7 years, 4 months ago (2013-08-07 17:13:41 UTC) #8
Alexei Svitkine (slow)
LGTM, but see my comment below about GetStringWidth() https://codereview.chromium.org/21868004/diff/11001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/21868004/diff/11001/ui/gfx/font_list.cc#newcode182 ui/gfx/font_list.cc:182: return ...
7 years, 4 months ago (2013-08-07 19:30:43 UTC) #9
Yuki
Thanks for the review. Committing. https://codereview.chromium.org/21868004/diff/11001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/21868004/diff/11001/ui/gfx/font_list.cc#newcode182 ui/gfx/font_list.cc:182: return GetPrimaryFont().GetStringWidth(text); On 2013/08/07 ...
7 years, 4 months ago (2013-08-08 06:37:36 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/21868004/21001
7 years, 4 months ago (2013-08-08 10:20:00 UTC) #11
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=157099
7 years, 4 months ago (2013-08-08 19:58:56 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/21868004/21001
7 years, 4 months ago (2013-08-09 03:22:50 UTC) #13
commit-bot: I haz the power
7 years, 4 months ago (2013-08-09 04:06:47 UTC) #14
Message was sent while issue was closed.
Change committed as 216563

Powered by Google App Engine
This is Rietveld 408576698