diff options
author | Cary Clark <cary@android.com> | 2011-01-12 10:38:54 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-12 10:38:54 -0800 |
commit | 20b2d50821e99e931dc574a7348af84c63ac5988 (patch) | |
tree | a5e86a47092e8eab2353709c8ab2df686c81fd03 /WebKit/android/nav/SelectText.cpp | |
parent | c0e03e4dfc21bef53c7674af12014856b97a2876 (diff) | |
parent | 4e65c3ef3ab34e815d6464636a52d5250ebb50ab (diff) | |
download | external_webkit-20b2d50821e99e931dc574a7348af84c63ac5988.zip external_webkit-20b2d50821e99e931dc574a7348af84c63ac5988.tar.gz external_webkit-20b2d50821e99e931dc574a7348af84c63ac5988.tar.bz2 |
Merge "always compute cx, cy in select text" into honeycomb
Diffstat (limited to 'WebKit/android/nav/SelectText.cpp')
-rw-r--r-- | WebKit/android/nav/SelectText.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp index f2d7521..ff69ddd 100644 --- a/WebKit/android/nav/SelectText.cpp +++ b/WebKit/android/nav/SelectText.cpp @@ -608,11 +608,11 @@ public: } // cx and cy are the distances from the tested center // The center distance is used when the test point is over the text - int cx = INT_MAX; - int cy = INT_MAX; - if (ignoreColumn && dy == 0 && mDy == 0) { - cy = std::abs(((testBounds.fTop + testBounds.fBottom) >> 1) + int cx = std::abs(((testBounds.fLeft + testBounds.fRight) >> 1) + - mFocusX); + int cy = std::abs(((testBounds.fTop + testBounds.fBottom) >> 1) - mFocusY); + if (ignoreColumn && dy == 0 && mDy == 0) { if (mCy < cy) { #ifdef EXTRA_NOISY_LOGGING DBG_NAV_LOGD("FirstCheck reject cy=%d mCy=%d", cy, mCy); @@ -621,8 +621,6 @@ public: } if (mCy == cy) { if (dx == 0 && mDx == 0) { - cx = std::abs(((testBounds.fLeft + testBounds.fRight) >> 1) - - mFocusX); if (mCx < cx) { #ifdef EXTRA_NOISY_LOGGING DBG_NAV_LOGD("FirstCheck reject cx=%d mCx=%d", cx, mCx); |