DescriptionReland: Use labels to display views tab titles.
The original r276450 was reverted in r276476 for leaks:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%283%29/builds/3954
Fixed here by calling AddChildView(title_) on Tab (duh).
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=276566
Patch Set 1 #Patch Set 2 : Call AddChildView(title_) on Tab to prevent leaks. #
Messages
Total messages: 10 (0 generated)
|