diff options
-rw-r--r-- | WebKit/android/nav/SelectText.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp index 9792cd3..3716b03 100644 --- a/WebKit/android/nav/SelectText.cpp +++ b/WebKit/android/nav/SelectText.cpp @@ -1542,9 +1542,9 @@ bool SelectText::wordSelection(const SkPicture* picture) void SelectText::swapAsNeeded() { - if (m_selStart.fTop >= m_selEnd.fBottom - || (m_selStart.fBottom > m_selEnd.fTop - && m_selStart.fRight > m_selEnd.fLeft)) + if (m_selStart.fTop >= (m_selEnd.fTop + m_selEnd.fBottom) >> 1 + || (m_selEnd.fTop < (m_selStart.fTop + m_selStart.fBottom) >> 1 + && m_selStart.fRight > m_selEnd.fLeft)) { SkTSwap(m_startBase, m_endBase); SkTSwap(m_selStart, m_selEnd); |