diff options
| author | Leon Scroggins <scroggo@google.com> | 2009-11-24 14:49:21 -0500 |
|---|---|---|
| committer | Leon Scroggins <scroggo@google.com> | 2009-11-25 10:14:50 -0500 |
| commit | f90b1261a53bc0bfc772337551eb4c540022cd22 (patch) | |
| tree | 1c985fa0001b2f348d6ebd80ca16a1775ad73dc0 /core/java/android | |
| parent | a2d259aa4a06eb92af2ef4530ae065497a581496 (diff) | |
| download | frameworks_base-f90b1261a53bc0bfc772337551eb4c540022cd22.zip frameworks_base-f90b1261a53bc0bfc772337551eb4c540022cd22.tar.gz frameworks_base-f90b1261a53bc0bfc772337551eb4c540022cd22.tar.bz2 | |
When clicking on a WebTextView, always call nativeMotionUp.
We were previously calling nativeTextInputMotionUp, which was
intended to be faster than nativeMotionUp, which does more work.
However, as discussed in http://b/issue?id=2257787 , I think we
should simply call nativeMotionUp, which does everything the old
method did, while also correcting things if necessary. This fixes
the second problem listed in http://b/issue?id=2266756 , since
nativeMotionUp will recognize that the <select> element should
take the click.
Since I have removed a native method, this requires a change to
external/webkit.
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 77943d8..3207c79 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4787,7 +4787,7 @@ public class WebView extends AbsoluteLayout } /** - * Do a touch up from a WebTextView. This will be handled by webkit to + * Due a touch up from a WebTextView. This will be handled by webkit to * change the selection. * @param event MotionEvent in the WebTextView's coordinates. */ @@ -4797,10 +4797,7 @@ public class WebView extends AbsoluteLayout } int x = viewToContentX((int) event.getX() + mWebTextView.getLeft()); int y = viewToContentY((int) event.getY() + mWebTextView.getTop()); - if (nativeFocusNodePointer() != nativeCursorNodePointer()) { - nativeMotionUp(x, y, mNavSlop); - } - nativeTextInputMotionUp(x, y); + nativeMotionUp(x, y, mNavSlop); } /** @@ -5941,12 +5938,6 @@ public class WebView extends AbsoluteLayout private native void nativeSetHeightCanMeasure(boolean measure); // Returns a value corresponding to CachedFrame::ImeAction /* package */ native int nativeTextFieldAction(); - /** - * Perform a click on a currently focused text input. Since it is already - * focused, there is no need to go through the nativeMotionUp code, which - * may change the Cursor. - */ - private native void nativeTextInputMotionUp(int x, int y); private native int nativeTextGeneration(); // Never call this version except by updateCachedTextfield(String) - // we always want to pass in our generation number. |
