Exemple #1
0
/*!
  Sets the current item to be the next item in the history and goes to the
  corresponding page; i.e., goes forward one history item.

  \sa back(), goToItem()
*/
void QWebHistory::forward()
{
    if (canGoForward()) {
        WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
        page->goToItem(d->lst->forwardItem(), WebCore::FrameLoadTypeIndexedBackForward);
    }
}
static void WebHistoryRestoreIndex(JNIEnv* env, jobject obj, jint frame, jint index)
{
    LOG_ASSERT(frame, "RestoreState needs a valid Frame pointer!");
    WebCore::Frame* pFrame = (WebCore::Frame*)frame;
    WebCore::Page* page = pFrame->page();
    WebCore::HistoryItem* currentItem =
            page->backForwardList()->entries()[index].get();

    // load the current page with FrameLoadTypeIndexedBackForward so that it
    // will use cache when it is possible
    page->goToItem(currentItem, FrameLoadTypeIndexedBackForward);
}
Exemple #3
0
/*!
  Sets the current item to be the specified \a item in the history and goes to the page.

  \sa back(), forward()
*/
void QWebHistory::goToItem(const QWebHistoryItem &item)
{
    WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
    page->goToItem(item.d->item, WebCore::FrameLoadTypeIndexedBackForward);
}
Exemple #4
0
/*!
  Sets the current item to be the specified \a item in the history and goes to the page.

  \sa back(), forward()
*/
void QWebHistory::goToItem(const QWebHistoryItem &item)
{
    d->lst->goToItem(item.d->item);
    WebCore::Page* page = d->lst->page();
    page->goToItem(currentItem().d->item, WebCore::FrameLoadTypeIndexedBackForward);
}