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

Issue 323993002: Use labels to display views tab titles. (Closed)

Created:
6 years, 6 months ago by msw
Modified:
6 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Use labels to display views tab titles. Add a Label view to Tab for displaying the title. Remove Tab::PaintTitle, bounds and font members. Remove unnecessary Tab::Get[Title|Icon]Bounds helpers. Update the text on Tab::SetData, not during paint. Use gfx::DirectionalityMode, remove the Label enum. Add gfx::ALIGN_TO_HEAD to gfx::HorizontalAlignment. Add Label::GetHorizontalAlignment for ALIGN_TO_HEAD. Always flip left/right in Label::SetHorizontalAlignment. Have Tab and MessageBoxView use ALIGN_TO_HEAD. Update comments and tests, related minor cleanup. TODO: Make Label cache RenderText objects. TODO: Make RenderText support ALIGN_TO_HEAD. BUG=240037 TEST=No visible Views tab title changes. R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276450

Patch Set 1 #

Patch Set 2 : Render Views tab titles with labels. #

Patch Set 3 : Restore title bounds mirroring for RTL. #

Total comments: 4

Patch Set 4 : Address comments; update tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -227 lines) Patch
M chrome/browser/ui/views/tabs/tab.h View 6 chunks +3 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 2 3 17 chunks +39 lines, -62 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_unittest.cc View 1 2 3 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/validation_message_bubble_delegate.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ui/gfx/text_constants.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/message_center/views/bounded_label.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/label.h View 4 chunks +12 lines, -47 lines 0 comments Download
M ui/views/controls/label.cc View 7 chunks +32 lines, -24 lines 0 comments Download
M ui/views/controls/label_unittest.cc View 1 16 chunks +62 lines, -60 lines 0 comments Download
M ui/views/controls/message_box_view.cc View 1 chunk +3 lines, -11 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
msw
Hey Scott, please take a look; thanks. Note that I plan to do a Label ...
6 years, 6 months ago (2014-06-10 18:46:01 UTC) #1
sky
https://codereview.chromium.org/323993002/diff/40001/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/323993002/diff/40001/chrome/browser/ui/views/tabs/tab.cc#newcode407 chrome/browser/ui/views/tabs/tab.cc:407: title_ = new views::Label(); move to member initializer. https://codereview.chromium.org/323993002/diff/40001/chrome/browser/ui/views/tabs/tab.cc#newcode803 ...
6 years, 6 months ago (2014-06-10 19:37:10 UTC) #2
msw
Please take another look; thanks! https://codereview.chromium.org/323993002/diff/40001/chrome/browser/ui/views/tabs/tab.cc File chrome/browser/ui/views/tabs/tab.cc (right): https://codereview.chromium.org/323993002/diff/40001/chrome/browser/ui/views/tabs/tab.cc#newcode407 chrome/browser/ui/views/tabs/tab.cc:407: title_ = new views::Label(); ...
6 years, 6 months ago (2014-06-11 03:57:12 UTC) #3
sky
LGTM
6 years, 6 months ago (2014-06-11 15:58:02 UTC) #4
msw
The CQ bit was checked by msw@chromium.org
6 years, 6 months ago (2014-06-11 16:39:11 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/323993002/60001
6 years, 6 months ago (2014-06-11 16:40:02 UTC) #6
commit-bot: I haz the power
Change committed as 276450
6 years, 6 months ago (2014-06-11 18:04:28 UTC) #7
please use gerrit instead
6 years, 6 months ago (2014-06-11 19:27:46 UTC) #8
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/327273005/ by rouslan@chromium.org.

The reason for reverting is: Appears to have a memory leak. See:

http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Te....

Powered by Google App Engine
This is Rietveld 408576698