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

Issue 23228004: Prepare to use gfx::RenderText in views::Label. (Closed)

Created:
7 years, 4 months ago by msw
Modified:
6 years, 5 months ago
CC:
chromium-reviews, Raman Kakilate, sadrul, nkostylev+watch_chromium.org, derat+watch_chromium.org, ben+watch_chromium.org, benquan, Ilya Sherman, dyu1, penghuang+watch_chromium.org, nona+watch_chromium.org, Dane Wallinga, oshima, estade+watch_chromium.org, rouslan+autofillwatch_chromium.org, Albert Bodenhamer, James Su, stevenjb+watch_chromium.org, tfarina, davemoore+watch_chromium.org, yusukes+watch_chromium.org, xiyuan, ckocagil, noms (inactive), Alexei Svitkine (slow)
Visibility:
Public.

Description

Prepare to use gfx::RenderText in views::Label. Alter Label's API to support a RenderText implementation. This has minimal functional changes to Label for now. The Label rewrite to use RenderText will land separately. Remove the generally unused Label::SetDirectionalityMode. We should always use the text's directionality anyway. (it seems like this was the case even for *FROM_UI...) Also remove views::LabelButton::SetDirectionalityMode. Fix LabelButton mutli-line preferred sizing and layout. Add RenderText flag to swap newline chars for symbols. (We don't want that for multi-line views::Label layout) Add GetCurrentHorizontalAlignment ALIGN_HEAD helper. Expose ElideBehavior and ShadowValues accessors. Set the styles of the argument FontList in SetFontList. (this is how Label transmits style information for now) Fix partial-pixel treatment for centered alignment. Update Message Center's InnerBoundedLabel Label subclass. (minimal changes to keep it working with older paint path) BUG=240037 TEST=Negligible appearance changes (better multi-line label centering). R=sky@chromium.org,asvitkine@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284401

Patch Set 1 #

Patch Set 2 : Revive CL with some progress. #

Patch Set 3 : Multiline mostly working; other improvements. #

Patch Set 4 : Fix TODOs, multiline SizeToFit, and gfx::Font styling. #

Patch Set 5 : Remove obsolete unit tests; fix tooltip test. #

Patch Set 6 : Fix elided preferred sizing; add basic multi-line eliding; etc. #

Patch Set 7 : Remove AppList's CachedLabel; polish AppListItemView. #

Patch Set 8 : Finishing touches; App List fixes; 'git cl format'. #

Patch Set 9 : Fix multiline LabelButton layout and sizing. #

Total comments: 9

Patch Set 10 : Address comments; simplify app list changes. #

Total comments: 2

Patch Set 11 : Fix OnBoundsChanged handling. #

Total comments: 4

Patch Set 12 : Address comments. #

Patch Set 13 : Sync and rebase. #

Patch Set 14 : Revert Label implementation changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -229 lines) Patch
M ash/accelerators/exit_warning_handler.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ash/sticky_keys/sticky_keys_overlay.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_utils.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M ash/touch/touch_hud_debug.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M ash/wm/overview/window_selector_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/validation_message_bubble_delegate.cc View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +11 lines, -0 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 8 chunks +29 lines, -7 lines 0 comments Download
M ui/message_center/views/bounded_label.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -15 lines 0 comments Download
M ui/views/controls/button/blue_button.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/button/label_button.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -3 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +26 lines, -20 lines 0 comments Download
M ui/views/controls/label.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +18 lines, -51 lines 0 comments Download
M ui/views/controls/label.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 19 chunks +53 lines, -58 lines 0 comments Download
M ui/views/controls/label_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +38 lines, -46 lines 0 comments Download
M ui/views/controls/message_box_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/label_example.cc View 1 2 3 4 5 3 chunks +2 lines, -3 lines 0 comments Download
M ui/views/examples/multiline_example.h View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M ui/views/examples/multiline_example.cc View 1 2 3 4 5 6 7 3 chunks +16 lines, -6 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
msw
Hey Scott, please take a look; thanks!
6 years, 5 months ago (2014-07-14 18:31:31 UTC) #1
sky
I wasn't entirely sure about some of the changes to app_list. Can you also add ...
6 years, 5 months ago (2014-07-14 21:49:57 UTC) #2
msw
Comments addressed, please take another look. +Trent for ui/app_list/views/app_list_item_view.* Label color changes now schedules paint ...
6 years, 5 months ago (2014-07-14 23:41:36 UTC) #3
tapted
Probably orhogonal to this CL, but do you think we should ditch app_list::CachedLabel? it exists ...
6 years, 5 months ago (2014-07-15 00:52:39 UTC) #4
msw
On 2014/07/15 00:52:39, tapted wrote: > Probably orhogonal to this CL, but do you think ...
6 years, 5 months ago (2014-07-15 01:29:32 UTC) #5
msw
https://codereview.chromium.org/23228004/diff/466001/ui/views/controls/label.cc File ui/views/controls/label.cc (right): https://codereview.chromium.org/23228004/diff/466001/ui/views/controls/label.cc#newcode293 ui/views/controls/label.cc:293: Layout(); On 2014/07/14 23:41:35, msw wrote: > On 2014/07/14 ...
6 years, 5 months ago (2014-07-15 02:11:17 UTC) #6
tapted
On 2014/07/15 01:29:32, msw wrote: > On 2014/07/15 00:52:39, tapted wrote: > > Probably orhogonal ...
6 years, 5 months ago (2014-07-15 03:49:41 UTC) #7
sky
LGTM
6 years, 5 months ago (2014-07-15 04:36:45 UTC) #8
msw
On 2014/07/15 03:49:41, tapted wrote: > Unfortunately there is a regression in the CL currently ...
6 years, 5 months ago (2014-07-15 05:00:52 UTC) #9
msw
Ah, and to address your more specific concerns: On 2014/07/15 03:49:41, tapted wrote: > What ...
6 years, 5 months ago (2014-07-15 05:08:16 UTC) #10
tapted
app_list lgtm - I agree separate treatment of the label stuff in the app list ...
6 years, 5 months ago (2014-07-15 05:37:58 UTC) #11
msw
The CQ bit was checked by msw@chromium.org
6 years, 5 months ago (2014-07-15 05:45:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/23228004/546001
6 years, 5 months ago (2014-07-15 05:46:19 UTC) #13
msw
The CQ bit was unchecked by msw@chromium.org
6 years, 5 months ago (2014-07-15 08:23:45 UTC) #14
msw
The CQ bit was checked by msw@chromium.org
6 years, 5 months ago (2014-07-15 08:26:15 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/23228004/566001
6 years, 5 months ago (2014-07-15 08:26:55 UTC) #16
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 5 months ago (2014-07-15 14:29:37 UTC) #17
Alexei Svitkine (slow)
LGTM % comments Have you measured memory use after this? I'm worried that by keeping ...
6 years, 5 months ago (2014-07-15 14:42:50 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-15 15:07:33 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/34336)
6 years, 5 months ago (2014-07-15 15:07:34 UTC) #20
msw
Comments addressed. On 2014/07/15 14:42:50, Alexei Svitkine wrote: > Have you measured memory use after ...
6 years, 5 months ago (2014-07-15 16:53:05 UTC) #21
msw
The CQ bit was checked by msw@chromium.org
6 years, 5 months ago (2014-07-15 16:53:14 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/23228004/586001
6 years, 5 months ago (2014-07-15 16:55:33 UTC) #23
msw
On 2014/07/15 16:53:05, msw wrote: > Comments addressed. > > On 2014/07/15 14:42:50, Alexei Svitkine ...
6 years, 5 months ago (2014-07-15 18:46:35 UTC) #24
Alexei Svitkine (slow)
Can you also check with i18n text? Also, I think using Chrome is more meaningful ...
6 years, 5 months ago (2014-07-15 18:58:37 UTC) #25
msw
On 2014/07/15 18:58:37, Alexei Svitkine wrote: > Can you also check with i18n text? Also, ...
6 years, 5 months ago (2014-07-15 22:35:23 UTC) #26
Alexei Svitkine (slow)
I don't think this work should be abandoned. I think it's in the right direction ...
6 years, 5 months ago (2014-07-15 23:08:08 UTC) #27
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-16 05:29:46 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-16 06:09:46 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/34647)
6 years, 5 months ago (2014-07-16 06:09:48 UTC) #30
msw
The CQ bit was checked by msw@chromium.org
6 years, 5 months ago (2014-07-17 17:36:03 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/23228004/586001
6 years, 5 months ago (2014-07-17 17:37:14 UTC) #32
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-17 20:26:41 UTC) #33
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-17 21:06:58 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/35361)
6 years, 5 months ago (2014-07-17 21:07:01 UTC) #35
msw
I reverted the Label implementation changes and the app list changes, this is now a ...
6 years, 5 months ago (2014-07-21 05:44:38 UTC) #36
msw
The CQ bit was checked by msw@chromium.org
6 years, 5 months ago (2014-07-21 05:44:51 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/23228004/666001
6 years, 5 months ago (2014-07-21 05:45:13 UTC) #38
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_rel_swarming on tryserver.chromium ...
6 years, 5 months ago (2014-07-21 07:01:01 UTC) #39
commit-bot: I haz the power
6 years, 5 months ago (2014-07-21 07:55:56 UTC) #40
Message was sent while issue was closed.
Change committed as 284401

Powered by Google App Engine
This is Rietveld 408576698