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

Issue 25039002: Always aligns text at vertically center (Textfield, Label). (Closed)

Created:
7 years, 2 months ago by Yuki
Modified:
6 years, 3 months ago
CC:
chromium-reviews, craigdh+watch_chromium.org, yusukes+watch_chromium.org, derat+watch_chromium.org, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, James Su, frankf+watch_chromium.org
Visibility:
Public.

Description

Always aligns text at vertically center (Textfield, Label). This CL makes Textfield and Label put their content text at vertically center respecting the cap height. Also this CL removes vertical alignment support, which we no longer need. I think this CL fixes all issues related to vertical alignment and font height. BUG=146236, 264436 TEST=Test manually + ui_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=231107

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Synced. #

Patch Set 3 : Fixes for pkasting's comments #

Patch Set 4 : Fixed several bugs and unittests. #

Total comments: 2

Patch Set 5 : Worked on pkasting's minor comment. #

Total comments: 43

Patch Set 6 : Synced. #

Patch Set 7 : Addressed comments from Alexei and Mike. #

Patch Set 8 : Fixed unittests. #

Total comments: 4

Patch Set 9 : Addressed comments from Alexei. #

Patch Set 10 : Addressed pkasting's comments. #

Patch Set 11 : Synced. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -241 lines) Patch
M chrome/browser/ui/views/location_bar/content_setting_image_view.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.cc View 1 2 4 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/ui/views/location_bar/ev_bubble_view.h View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/ev_bubble_view.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/views/location_bar/icon_label_bubble_view.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc View 1 2 3 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/ui/views/location_bar/keyword_hint_view.h View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/location_bar/keyword_hint_view.cc View 2 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 3 4 5 6 7 chunks +58 lines, -62 lines 0 comments Download
M chrome/browser/ui/views/location_bar/selected_keyword_view.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/selected_keyword_view.cc View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_result_view.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -13 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_views.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_views.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M ui/gfx/font.h View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M ui/gfx/font_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/platform_font_pango.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 5 chunks +34 lines, -12 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 8 chunks +34 lines, -14 lines 0 comments Download
M ui/gfx/render_text_linux.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text_linux.cc View 1 2 3 4 5 6 3 chunks +6 lines, -10 lines 0 comments Download
M ui/gfx/render_text_mac.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text_mac.cc View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 7 5 chunks +20 lines, -18 lines 0 comments Download
M ui/gfx/render_text_win.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text_win.cc View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M ui/gfx/text_constants.h View 1 chunk +0 lines, -10 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_views.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/controls/textfield/native_textfield_views.cc View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_views_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -10 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_win.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/controls/textfield/native_textfield_win.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_wrapper.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/views/controls/textfield/textfield.h View 1 2 3 4 5 2 chunks +0 lines, -9 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 4 chunks +0 lines, -9 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Yuki
Could you guys review this CL? pkasting@: Could you mainly review files under c/b/ui/views/ ? ...
7 years, 2 months ago (2013-10-18 16:48:24 UTC) #1
Peter Kasting
https://codereview.chromium.org/25039002/diff/129001/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/25039002/diff/129001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode116 chrome/browser/ui/views/location_bar/location_bar_view.cc:116: // Given a containing |height| and a |base_font_list|, shrinks ...
7 years, 2 months ago (2013-10-18 21:11:09 UTC) #2
Yuki
Worked on pkasting's comments. Also fixed several bugs. - PlatformFontPango::GetCapHeight() should return ascent rather than ...
7 years, 2 months ago (2013-10-21 09:44:40 UTC) #3
Peter Kasting
LGTM https://codereview.chromium.org/25039002/diff/319001/chrome/browser/ui/views/location_bar/ev_bubble_view.cc File chrome/browser/ui/views/location_bar/ev_bubble_view.cc (left): https://codereview.chromium.org/25039002/diff/319001/chrome/browser/ui/views/location_bar/ev_bubble_view.cc#oldcode9 chrome/browser/ui/views/location_bar/ev_bubble_view.cc:9: Nit: Leave this and the other blank line ...
7 years, 2 months ago (2013-10-21 23:29:22 UTC) #4
Yuki
Alexei and Mike, could you take a look at this CL? Thanks, Yuki Shiino https://codereview.chromium.org/25039002/diff/319001/chrome/browser/ui/views/location_bar/ev_bubble_view.cc ...
7 years, 2 months ago (2013-10-22 06:13:35 UTC) #5
Alexei Svitkine (slow)
Could you explain a little bit about the need for both GetBaseline() and GetBaselineOfTextLayout() functions ...
7 years, 2 months ago (2013-10-22 15:01:00 UTC) #6
Yuki
On 2013/10/22 15:01:00, Alexei Svitkine wrote: > Could you explain a little bit about the ...
7 years, 2 months ago (2013-10-22 16:23:26 UTC) #7
Alexei Svitkine (slow)
Thanks for the explanation. The approach sounds good, just a few comments below. https://codereview.chromium.org/25039002/diff/589001/ui/gfx/render_text.cc File ...
7 years, 2 months ago (2013-10-22 17:25:29 UTC) #8
msw
I just have mostly minor comments. https://codereview.chromium.org/25039002/diff/589001/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/25039002/diff/589001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode123 chrome/browser/ui/views/location_bar/location_bar_view.cc:123: while (true) { ...
7 years, 2 months ago (2013-10-23 01:18:00 UTC) #9
Yuki
https://codereview.chromium.org/25039002/diff/589001/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/25039002/diff/589001/chrome/browser/ui/views/location_bar/location_bar_view.cc#newcode123 chrome/browser/ui/views/location_bar/location_bar_view.cc:123: while (true) { On 2013/10/23 01:18:00, msw wrote: > ...
7 years, 2 months ago (2013-10-24 14:32:53 UTC) #10
Alexei Svitkine (slow)
lgtm with a nit https://codereview.chromium.org/25039002/diff/839001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/25039002/diff/839001/ui/gfx/render_text.cc#newcode75 ui/gfx/render_text.cc:75: return baseline + baseline_shift; Nit: ...
7 years, 2 months ago (2013-10-24 15:03:54 UTC) #11
Yuki
https://codereview.chromium.org/25039002/diff/839001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/25039002/diff/839001/ui/gfx/render_text.cc#newcode75 ui/gfx/render_text.cc:75: return baseline + baseline_shift; On 2013/10/24 15:03:55, Alexei Svitkine ...
7 years, 2 months ago (2013-10-24 15:17:35 UTC) #12
Peter Kasting
https://codereview.chromium.org/25039002/diff/589001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (right): https://codereview.chromium.org/25039002/diff/589001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#newcode576 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:576: int text_width; On 2013/10/24 14:32:54, Yuki wrote: > On ...
7 years, 1 month ago (2013-10-24 20:12:05 UTC) #13
Yuki
https://codereview.chromium.org/25039002/diff/589001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc File chrome/browser/ui/views/omnibox/omnibox_result_view.cc (right): https://codereview.chromium.org/25039002/diff/589001/chrome/browser/ui/views/omnibox/omnibox_result_view.cc#newcode576 chrome/browser/ui/views/omnibox/omnibox_result_view.cc:576: int text_width; On 2013/10/24 20:12:05, Peter Kasting wrote: > ...
7 years, 1 month ago (2013-10-25 15:21:08 UTC) #14
msw
LGTM, thanks!
7 years, 1 month ago (2013-10-25 17:18:26 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/25039002/1099001
7 years, 1 month ago (2013-10-25 18:03:57 UTC) #16
commit-bot: I haz the power
Change committed as 231107
7 years, 1 month ago (2013-10-25 20:41:11 UTC) #17
Daniel Erat
On 2013/10/25 20:41:11, I haz the power (commit-bot) wrote: > Change committed as 231107 This ...
7 years, 1 month ago (2013-11-04 17:14:20 UTC) #18
knuckles
6 years, 3 months ago (2014-09-18 11:34:16 UTC) #19
Message was sent while issue was closed.
On 2013/11/04 17:14:20, Daniel Erat wrote:
> On 2013/10/25 20:41:11, I haz the power (commit-bot) wrote:
> > Change committed as 231107
> 
> This breaks the omnibox font on Chrome OS (http://crbug.com/314688).

Can someone please take a look at this report?
https://code.google.com/p/chromium/issues/detail?id=411908
Text positioning still seems broken. We have a patch!

Powered by Google App Engine
This is Rietveld 408576698