Fix bookmark button text directionality and eliding.
commit391eea0ec402e1a36c04e42b0932c45e5e993e2b
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 25 Jun 2014 23:52:23 +0000 (25 23:52 +0000)
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 25 Jun 2014 23:52:23 +0000 (25 23:52 +0000)
treedfeffe5ae5d7d849f3de5024b8da75c3d5c24147
parent11a3256248f424b9ec9c38029980e2c85b94841d
Fix bookmark button text directionality and eliding.

r278156 changed these buttons to LabelButton instances.

Make these buttons respect their text directionality.
Add LabelButton::SetDirectionalityMode to fix the Label.
Respect forced directionality in Canvas::DrawFadedString.
(still need to align with UI for text/icon placement)
(I might change this pattern in the future)

Use fade eliding on Linux, but ellipsis eliding on Win.
(the text looks bad faded on Win due to Issue 388084)

See bookmark_fading_and_alignment_fix_PS2b[_linux].png at
http://crbug.com/388086#c3 and http://crbug.com/388086#c4

BUG=388086,388084
TEST=Long RTL bookmarks elide correctly, look good.
R=sky@chromium.org

Review URL: https://codereview.chromium.org/350813002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279863 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
ui/gfx/canvas_skia.cc
ui/views/controls/button/label_button.cc
ui/views/controls/button/label_button.h