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

Commit 0a784a54 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

When requesting the href of a link, also request the link's text.

Change-Id: If3cf97d0b328d654919b1334b07d4c8cc7b1a9ea
parent 6a942dbe
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -506,6 +506,7 @@ final class WebViewCore {
            int framePtr, int x, int y);

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

    private native void nativeTouchUp(int touchGeneration,
            int framePtr, int nodePtr, int x, int y);
@@ -1160,8 +1161,10 @@ final class WebViewCore {

                        case REQUEST_CURSOR_HREF: {
                            Message hrefMsg = (Message) msg.obj;
                            String res = nativeRetrieveHref(msg.arg1, msg.arg2);
                            hrefMsg.getData().putString("url", res);
                            hrefMsg.getData().putString("url",
                                    nativeRetrieveHref(msg.arg1, msg.arg2));
                            hrefMsg.getData().putString("title",
                                    nativeRetrieveAnchorText(msg.arg1, msg.arg2));
                            hrefMsg.sendToTarget();
                            break;
                        }