summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text.cc
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 20:30:36 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 20:30:36 +0000
commit1e7bc051a47c44498f5b7ec32d606fb86ea2386f (patch)
treeda455e38c93105160da0479de0b64e22c1e20a5e /ui/gfx/render_text.cc
parent0d3dc0ad092bb3ba2c65d3d696986bd77fd98c03 (diff)
downloadchromium_src-1e7bc051a47c44498f5b7ec32d606fb86ea2386f.zip
chromium_src-1e7bc051a47c44498f5b7ec32d606fb86ea2386f.tar.gz
chromium_src-1e7bc051a47c44498f5b7ec32d606fb86ea2386f.tar.bz2
Fix tab title fading direction in RTL locales.
BUG=134759, 134746 TEST=On Windows, launch chrome.exe with --lang=he and go to http://en.wikipedia.org/wiki/Main_Page. Observe that the text is faded on the right. Open another tab and go to http://www.bbc.co.uk/arabic/topics/syria/ and observe that the text is faded on the left. Observe the same is true with LTR locales. Review URL: https://chromiumcodereview.appspot.com/10689013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text.cc')
-rw-r--r--ui/gfx/render_text.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 7743668..cd9b505 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -853,7 +853,10 @@ void RenderText::ApplyFadeEffects(internal::SkiaTextRenderer* renderer) {
bool fade_left = fade_head();
bool fade_right = fade_tail();
// Under RTL, |fade_right| == |fade_head|.
- if (GetTextDirection() == base::i18n::RIGHT_TO_LEFT)
+ // TODO(asvitkine): This is currently not based on GetTextDirection() because
+ // RenderTextWin does not return a direction that's based on
+ // the text content.
+ if (horizontal_alignment() == ALIGN_RIGHT)
std::swap(fade_left, fade_right);
gfx::Rect solid_part = display_rect();