diff options
author | Russell Brenner <russellbrenner@google.com> | 2012-03-16 15:28:13 -0700 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2012-03-16 15:28:13 -0700 |
commit | b327374e1be9171551a5545ed2ab87e79a36ed7a (patch) | |
tree | f91af40a75241180e303984db241b759abb8aa63 /Source | |
parent | 96ba0dde7ae9e2db6e4558794e1f57090b5b6c2f (diff) | |
download | external_webkit-b327374e1be9171551a5545ed2ab87e79a36ed7a.zip external_webkit-b327374e1be9171551a5545ed2ab87e79a36ed7a.tar.gz external_webkit-b327374e1be9171551a5545ed2ab87e79a36ed7a.tar.bz2 |
Fix selection positioning for RTL languages
Logic error prevented placement of the cursor at the left edge of an
RTL sequence.
Bug: 5041179
Change-Id: I091f1d8ae546890b6a6be50f729b662742ca2221
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/platform/graphics/android/FontAndroid.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp index ef7740c..6ae839b 100644 --- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp @@ -1003,14 +1003,14 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run, int glyph = walker.logClusters()[from]; fromX = base + walker.positions()[glyph].x(); fromAdvance = walker.advances()[glyph]; - } else + } else if (!walker.rtl()) from -= numCodePoints; if (toX == -1 && to < numCodePoints) { int glyph = walker.logClusters()[to]; toX = base + walker.positions()[glyph].x(); toAdvance = walker.advances()[glyph]; - } else + } else if (!walker.rtl()) to -= numCodePoints; if (!walker.rtl()) |