summaryrefslogtreecommitdiffstats
path: root/views/controls/label.cc
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 21:21:07 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 21:21:07 +0000
commitacf04c0edce30142a87cdef912ad90190911edcb (patch)
treeff31a0d888b409525b09c85de35c60cf419de27a /views/controls/label.cc
parente318afe67728cddff041aaaaaa2283b328f669cf (diff)
downloadchromium_src-acf04c0edce30142a87cdef912ad90190911edcb.zip
chromium_src-acf04c0edce30142a87cdef912ad90190911edcb.tar.gz
chromium_src-acf04c0edce30142a87cdef912ad90190911edcb.tar.bz2
Merge 46484 - This CL fixes issue 41985 The focus frames are out of range on the Options : RTL.
Previously, Label::CalculateDrawStringParams() computes the text boundary for signleline and multiline texts differently, so the boundary of focus rectangle is computed differently too inside Label::Paint(). Now, Label::CalculateDrawStringParams() computes text boundary without differentiate singleline and multiline 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 TBR=xji@chromium.org Review URL: http://codereview.chromium.org/1988001 git-svn-id: svn://svn.chromium.org/chrome/branches/375/src@46495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/label.cc')
-rw-r--r--views/controls/label.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/views/controls/label.cc b/views/controls/label.cc
index 89e9a572..1baba68 100644
--- a/views/controls/label.cc
+++ b/views/controls/label.cc
@@ -88,14 +88,6 @@ void Label::Paint(gfx::Canvas* canvas) {
if (HasFocus() || paint_as_focused_) {
text_bounds.Inset(-kFocusBorderPadding, -kFocusBorderPadding);
- // If the label is a single line of text, then the computed text bound
- // corresponds directly to the text being drawn and no mirroring is needed
- // for the RTL case. For multiline text, the text bound is an estimation
- // and is recomputed in gfx::Canvas::SizeStringInt(). For multiline text
- // in RTL, we need to take mirroring into account when computing the focus
- // rectangle.
- if (flags & gfx::Canvas::MULTI_LINE)
- text_bounds.set_x(MirroredLeftPointForRect(text_bounds));
canvas->DrawFocusRect(text_bounds.x(), text_bounds.y(),
text_bounds.width(), text_bounds.height());
}