diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-16 18:36:28 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-16 18:36:28 +0000 |
commit | 6d1f0db178b618e02b5c27f4ad99eed6f94f5685 (patch) | |
tree | d0e34800e9af3771abc0aa3406dc4eb8785c58db /chrome | |
parent | 79dffd71563948141396599f861bb79d85269093 (diff) | |
download | chromium_src-6d1f0db178b618e02b5c27f4ad99eed6f94f5685.zip chromium_src-6d1f0db178b618e02b5c27f4ad99eed6f94f5685.tar.gz chromium_src-6d1f0db178b618e02b5c27f4ad99eed6f94f5685.tar.bz2 |
This CL fixes issue 4376: Press "Tab" key to navigate - Text focus is showing at wrong place in Hebrew and Arabic.
when drawing focus rectangle for CheckBox,the left point of the rectangle should be mirrored for RTL text.
http://crbug.com/4376
TEST:
1. Launch RTL Chome (for ex: set language as Hebrew).
2. Go to > Customize and Control Google Chrome > Options > Under the Hood or any other Tab
3. Press tab key to navigate thought text options
4. The focus is properly set on the text. (without this fix, the focus is not properly set on the text).
Review URL: http://codereview.chromium.org/14452
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/checkbox.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/views/checkbox.cc b/chrome/views/checkbox.cc index d5714ad..45895bd 100644 --- a/chrome/views/checkbox.cc +++ b/chrome/views/checkbox.cc @@ -84,11 +84,13 @@ void CheckBox::Paint(ChromeCanvas* canvas) { gfx::Rect r; ComputeTextRect(&r); // Paint the focus border if any. - if (HasFocus()) - canvas->DrawFocusRect(r.x() - kFocusPaddingHorizontal, + if (HasFocus()) { + // Mirror left point for rectangle to draw focus for RTL text. + canvas->DrawFocusRect(MirroredLeftPointForRect(r) - kFocusPaddingHorizontal, r.y() - kFocusPaddingVertical, r.width() + kFocusPaddingHorizontal * 2, r.height() + kFocusPaddingVertical * 2); + } PaintFloatingView(canvas, label_, r.x(), r.y(), r.width(), r.height()); } |