/* package */ void didFirstLayout() { if (!mFirstLayoutDone) { mFirstLayoutDone = true; // ensure {@link WebViewCore#webkitDraw} is called as we were // blocking the update in {@link #loadStarted} mWebViewCore.contentDraw(); } mWebViewCore.mEndScaleZoom = true; }
/** * native callback Indicates the beginning of a new load. This method will be called once for the * main frame. */ private void loadStarted(String url, Bitmap favicon, int loadType, boolean isMainFrame) { mIsMainFrame = isMainFrame; if (isMainFrame || loadType == FRAME_LOADTYPE_STANDARD) { mLoadType = loadType; if (isMainFrame) { // Call onPageStarted for main frames. mCallbackProxy.onPageStarted(url, favicon); // as didFirstLayout() is only called for the main frame, reset // mFirstLayoutDone only for the main frames mFirstLayoutDone = false; mCommitted = false; // remove pending draw to block update until mFirstLayoutDone is // set to true in didFirstLayout() mWebViewCore.removeMessages(WebViewCore.EventHub.WEBKIT_DRAW); } // Note: only saves committed form data in standard load if (loadType == FRAME_LOADTYPE_STANDARD && mSettings.getSaveFormData()) { final WebHistoryItem h = mCallbackProxy.getBackForwardList().getCurrentItem(); if (h != null) { String currentUrl = h.getUrl(); if (currentUrl != null) { mDatabase.setFormData(currentUrl, getFormTextData()); } } } } }
/** native callback Indicates the WebKit has committed to the new load */ private void transitionToCommitted(int loadType, boolean isMainFrame) { // loadType is not used yet if (isMainFrame) { mCommitted = true; mWebViewCore.getWebView().mViewManager.postResetStateAll(); } }
/** * native callback Indicates the beginning of a new load. This method will be called once for the * main frame. */ private void loadStarted(String url, Bitmap favicon, int loadType, boolean isMainFrame) { mIsMainFrame = isMainFrame; if (isMainFrame || loadType == FRAME_LOADTYPE_STANDARD) { mLoadType = loadType; if (isMainFrame) { // Call onPageStarted for main frames. mCallbackProxy.onPageStarted(url, favicon); // as didFirstLayout() is only called for the main frame, reset // mFirstLayoutDone only for the main frames mFirstLayoutDone = false; mCommitted = false; // remove pending draw to block update until mFirstLayoutDone is // set to true in didFirstLayout() mWebViewCore.clearContent(); mWebViewCore.removeMessages(WebViewCore.EventHub.WEBKIT_DRAW); } } }
/** Close this frame and window. */ private void closeWindow(WebViewCore w) { mCallbackProxy.onCloseWindow(w.getWebView()); }
private void resetLoadingStates() { mCommitted = true; mWebViewCore.mEndScaleZoom = mFirstLayoutDone == false; mFirstLayoutDone = true; }
/** * The factory for HTML5VideoViewProxy instances. * * @param webViewCore is the WebViewCore that is requesting the proxy. * @return a new HTML5VideoViewProxy object. */ public static HTML5VideoViewProxy getInstance(WebViewCore webViewCore, int nativePtr) { return new HTML5VideoViewProxy(webViewCore.getWebViewClassic(), nativePtr); }
private float density() { return WebViewCore.getFixedDisplayDensity(mContext); }