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

Commit af01bcaf authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 5703

* changes:
  Add JS Flag support.
parents 1f9508ce b308137e
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -1009,6 +1009,17 @@ public class WebView extends AbsoluteLayout
        Network.disablePlatformNotifications();
        Network.disablePlatformNotifications();
    }
    }


    /**
     * Sets JavaScript engine flags.
     *
     * @param flags JS engine flags in a String
     *
     * @hide pending API solidification
     */
    public void setJsFlags(String flags) {
        mWebViewCore.sendMessage(EventHub.SET_JS_FLAGS, flags);
    }

    /**
    /**
     * Inform WebView of the network state. This is used to set
     * Inform WebView of the network state. This is used to set
     * the javascript property window.navigator.isOnline and
     * the javascript property window.navigator.isOnline and
+8 −0
Original line number Original line Diff line number Diff line
@@ -407,6 +407,8 @@ final class WebViewCore {


    private native void nativeDumpNavTree();
    private native void nativeDumpNavTree();


    private native void nativeSetJsFlags(String flags);

    /**
    /**
     *  Delete text from start to end in the focused textfield. If there is no
     *  Delete text from start to end in the focused textfield. If there is no
     *  focus, or if start == end, silently fail.  If start and end are out of
     *  focus, or if start == end, silently fail.  If start and end are out of
@@ -689,6 +691,8 @@ final class WebViewCore {
        static final int DUMP_RENDERTREE = 171;
        static final int DUMP_RENDERTREE = 171;
        static final int DUMP_NAVTREE = 172;
        static final int DUMP_NAVTREE = 172;


        static final int SET_JS_FLAGS = 173;

        // private message ids
        // private message ids
        private static final int DESTROY =     200;
        private static final int DESTROY =     200;


@@ -1057,6 +1061,10 @@ final class WebViewCore {
                            nativeDumpNavTree();
                            nativeDumpNavTree();
                            break;
                            break;


                        case SET_JS_FLAGS:
                            nativeSetJsFlags((String)msg.obj);
                            break;

                        case SYNC_SCROLL:
                        case SYNC_SCROLL:
                            mWebkitScrollX = msg.arg1;
                            mWebkitScrollX = msg.arg1;
                            mWebkitScrollY = msg.arg2;
                            mWebkitScrollY = msg.arg2;