From 379f172c0f5573f49b03a72a22f917f3c2d3caae Mon Sep 17 00:00:00 2001 From: "xji@chromium.org" Date: Wed, 5 May 2010 20:00:29 +0000 Subject: 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 --- views/controls/label.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'views/controls/label.h') 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(); -- cgit v1.1