예제 #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);
    }
}
예제 #2
0
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);
}
예제 #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);
}
예제 #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);
}