diff options
| author | Cary Clark <cary@android.com> | 2010-11-30 15:59:59 -0500 |
|---|---|---|
| committer | Cary Clark <cary@android.com> | 2010-12-01 07:40:54 -0500 |
| commit | e41bb535a3aefa3f830d828f7f0ebfa6aee60f20 (patch) | |
| tree | 161d08d0729ea6acce013660895d0bc002588f5c /core/java/android/webkit/WebView.java | |
| parent | 4449e4b6e2c09e527b97f46f58e0c0979cf3fe72 (diff) | |
pass the x and y to retrieve anchor data
During a long press, the original pointer to the
node and frame may change. Pass the location instead
to attempt to find the anchor.
companion change is in external/webkit
bug:3240869
Change-Id: Id86107c1f8ce8680786163c1030421dbec062036
Diffstat (limited to 'core/java/android/webkit/WebView.java')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index c57931817e20..c45d815f622d 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -2183,14 +2183,13 @@ public class WebView extends AbsoluteLayout // look at the cursor node, and not the focus node. Also, what is // getFocusNodePath? public void requestFocusNodeHref(Message hrefMsg) { - if (hrefMsg == null || mNativeClass == 0) { + if (hrefMsg == null) { return; } - if (nativeCursorIsAnchor()) { - mWebViewCore.sendMessage(EventHub.REQUEST_CURSOR_HREF, - nativeCursorFramePointer(), nativeCursorNodePointer(), - hrefMsg); - } + int contentX = viewToContentX((int) mLastTouchX + mScrollX); + int contentY = viewToContentY((int) mLastTouchY + mScrollY); + mWebViewCore.sendMessage(EventHub.REQUEST_CURSOR_HREF, + contentX, contentY, hrefMsg); } /** |
