Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e41bb535 authored by Cary Clark's avatar Cary Clark
Browse files

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
parent 4449e4b6
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -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()) {
        int contentX = viewToContentX((int) mLastTouchX + mScrollX);
        int contentY = viewToContentY((int) mLastTouchY + mScrollY);
        mWebViewCore.sendMessage(EventHub.REQUEST_CURSOR_HREF,
                    nativeCursorFramePointer(), nativeCursorNodePointer(),
                    hrefMsg);
        }
                contentX, contentY, hrefMsg);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -553,8 +553,8 @@ final class WebViewCore {
    private native void nativeMoveMouseIfLatest(int moveGeneration,
            int framePtr, int x, int y);

    private native String nativeRetrieveHref(int framePtr, int nodePtr);
    private native String nativeRetrieveAnchorText(int framePtr, int nodePtr);
    private native String nativeRetrieveHref(int x, int y);
    private native String nativeRetrieveAnchorText(int x, int y);

    private native void nativeTouchUp(int touchGeneration,
            int framePtr, int nodePtr, int x, int y);