diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 20:00:29 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-05 20:00:29 +0000 |
commit | 379f172c0f5573f49b03a72a22f917f3c2d3caae (patch) | |
tree | 978c4cd43679ba373f73b7427c02ad69cc5b318b /views/controls/label.h | |
parent | 705243f33047d66a6e0c674041af5dc59073871d (diff) | |
download | chromium_src-379f172c0f5573f49b03a72a22f917f3c2d3caae.zip chromium_src-379f172c0f5573f49b03a72a22f917f3c2d3caae.tar.gz chromium_src-379f172c0f5573f49b03a72a22f917f3c2d3caae.tar.bz2 |
This CL fixes issue 41985 - The focus frames are out of range on the Options : RTL.
Previously, Label::CalculateDrawStringParams() computes the text boundary for signle-line and multi-line texts differently, so the boundary of focus rectangle is computed differently too inside Label::Paint().
Now, Label::CalculateDrawStringParams() computes text boundary without differentiate single-line and multi-line text, the boundary itself always takes mirror into consideration. So, the boundary of focus rectangle no longer need mirroring for both cases.
BUG=http://crbug.com/41985
TEST=
1. Launch Chrome with RTL languages UI (ex: chrome.exe --lang=he)
2. click Wrench => Options Under the Hood
3. click or press tab to focus any string there.
4. the focus should be around the text, not out of the text range.
Review URL: http://codereview.chromium.org/1694012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/label.h')
-rw-r--r-- | views/controls/label.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/views/controls/label.h b/views/controls/label.h index e68593be..60ccb69 100644 --- a/views/controls/label.h +++ b/views/controls/label.h @@ -192,6 +192,8 @@ class Label : public View { // calculations done for drawing text. FRIEND_TEST(LabelTest, DrawSingleLineString); FRIEND_TEST(LabelTest, DrawMultiLineString); + FRIEND_TEST(LabelTest, DrawSingleLineStringInRTL); + FRIEND_TEST(LabelTest, DrawMultiLineStringInRTL); static gfx::Font GetDefaultFont(); |