summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/Api/qwebhistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt/Api/qwebhistory.cpp')
-rw-r--r--WebKit/qt/Api/qwebhistory.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp
index a6f3d0c..55305c9 100644
--- a/WebKit/qt/Api/qwebhistory.cpp
+++ b/WebKit/qt/Api/qwebhistory.cpp
@@ -22,6 +22,7 @@
#include "qwebhistory_p.h"
#include "qwebframe_p.h"
+#include "BackForwardListImpl.h"
#include "PlatformString.h"
#include "Image.h"
#include "KURL.h"
@@ -259,7 +260,7 @@ void QWebHistory::clear()
WebCore::BackForwardList* lst = d->lst;
//clear visited links
- WebCore::Page* page = lst->page();
+ WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(lst)->page();
if (page && page->groupPtr())
page->groupPtr()->removeVisitedLinks();
@@ -363,7 +364,7 @@ bool QWebHistory::canGoForward() const
void QWebHistory::back()
{
if (canGoBack()) {
- WebCore::Page* page = d->lst->page();
+ WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
page->goToItem(d->lst->backItem(), WebCore::FrameLoadTypeIndexedBackForward);
}
}
@@ -377,7 +378,7 @@ void QWebHistory::back()
void QWebHistory::forward()
{
if (canGoForward()) {
- WebCore::Page* page = d->lst->page();
+ WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
page->goToItem(d->lst->forwardItem(), WebCore::FrameLoadTypeIndexedBackForward);
}
}
@@ -389,7 +390,7 @@ void QWebHistory::forward()
*/
void QWebHistory::goToItem(const QWebHistoryItem &item)
{
- WebCore::Page* page = d->lst->page();
+ WebCore::Page* page = static_cast<WebCore::BackForwardListImpl*>(d->lst)->page();
page->goToItem(item.d->item, WebCore::FrameLoadTypeIndexedBackForward);
}
@@ -538,7 +539,7 @@ QDataStream& operator>>(QDataStream& source, QWebHistory& history)
}
d->lst->removeItem(nullItem);
// Update the HistoryController.
- history.d->lst->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get());
+ static_cast<WebCore::BackForwardListImpl*>(history.d->lst)->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get());
history.goToItem(history.itemAt(currentIndex));
}
}
@@ -550,7 +551,7 @@ QDataStream& operator>>(QDataStream& source, QWebHistory& history)
QWebPagePrivate* QWebHistoryPrivate::page()
{
- return QWebFramePrivate::kit(lst->page()->mainFrame())->page()->handle();
+ return QWebFramePrivate::kit(static_cast<WebCore::BackForwardListImpl*>(lst)->page()->mainFrame())->page()->handle();
}
WebCore::HistoryItem* QWebHistoryItemPrivate::core(QWebHistoryItem* q)