diff options
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 570b4a82e639..424dd6dfd90e 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -3144,7 +3144,7 @@ public class WebView extends AbsoluteLayout return; } if (nativeHasCursorNode()) { - Rect cursorBounds = nativeGetCursorRingBounds(); + Rect cursorBounds = cursorRingBounds(); if (!cursorBounds.contains(contentX, contentY)) { int slop = viewToContentDimension(mNavSlop); cursorBounds.inset(-slop, -slop); @@ -7545,7 +7545,7 @@ public class WebView extends AbsoluteLayout return false; } if (time - mLastCursorTime <= TRACKBALL_TIMEOUT - && !mLastCursorBounds.equals(nativeGetCursorRingBounds())) { + && !mLastCursorBounds.equals(cursorRingBounds())) { nativeSelectBestAt(mLastCursorBounds); } if (DebugFlags.WEB_VIEW) { @@ -10125,7 +10125,7 @@ public class WebView extends AbsoluteLayout } mInitialHitTestResult = null; mLastCursorTime = time; - mLastCursorBounds = nativeGetCursorRingBounds(); + mLastCursorBounds = cursorRingBounds(); boolean keyHandled = nativeMoveCursor(keyCode, count, noScroll) == false; if (DebugFlags.WEB_VIEW) { @@ -10136,7 +10136,7 @@ public class WebView extends AbsoluteLayout if (keyHandled == false) { return keyHandled; } - Rect contentCursorRingBounds = nativeGetCursorRingBounds(); + Rect contentCursorRingBounds = cursorRingBounds(); if (contentCursorRingBounds.isEmpty()) return keyHandled; Rect viewCursorRingBounds = contentToViewRect(contentCursorRingBounds); // set last touch so that context menu related functions will work @@ -10350,6 +10350,14 @@ public class WebView extends AbsoluteLayout return isEditable; } + // TODO: Remove this + Rect cursorRingBounds() { + if (sDisableNavcache) { + return new Rect(); + } + return nativeGetCursorRingBounds(); + } + private native int nativeCacheHitFramePointer(); private native boolean nativeCacheHitIsPlugin(); private native Rect nativeCacheHitNodeBounds(); |
