コード例 #1
0
void FrameLoaderClientAndroid::restoreViewState() {
    WebViewCore* webViewCore = WebViewCore::getWebViewCore(m_frame->view());
    HistoryItem* item = m_frame->loader()->history()->currentItem();
    AndroidWebHistoryBridge* bridge = item->bridge();
    // restore the scale (only) for the top frame
    if (!m_frame->tree()->parent()) {
        int scale = bridge->scale();
        webViewCore->restoreScale(scale);
        int screenWidthScale = bridge->screenWidthScale();
        if (screenWidthScale != scale)
            webViewCore->restoreScreenWidthScale(screenWidthScale);
    }
}