[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:49:17 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f918a6e4b8b02960f7141a47daf5df7fbad6b68a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 21 09:39:47 2010 +0000
2010-10-21 Juha Savolainen <juha.savolainen at weego.fi>
Reviewed by Kenneth Rohde Christiansen.
This is initial implementation of QWKHistory. The QWKHistory class represents the history of a QWKPage.
https://bugs.webkit.org/show_bug.cgi?id=47716
Each QWKPage instance contains a history of a visited pages that can be accessed by QWKHistory::history().
The QWKPagePrivate class creates QWKHistory in constructor.
* UIProcess/API/qt/qwkhistory.cpp: Added.
(QWKHistoryPrivate::QWKHistoryPrivate):
(QWKHistoryPrivate::createHistory): Creates history object.
(QWKHistoryPrivate::~QWKHistoryPrivate):
(QWKHistory::QWKHistory):
(QWKHistory::~QWKHistory):
(QWKHistory::backListCount): Gets items count in back.
(QWKHistory::forwardListCount): Gets items count in forward.
(QWKHistory::count): Gets items count.
* UIProcess/API/qt/qwkhistory.h: Added.
* UIProcess/API/qt/qwkhistory_p.h: Added.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPagePrivate::~QWKPagePrivate):
(QWKPage::history): Returns history object.
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h: Added history member variable.
* WebKit2.pro: Added WKBackForwardList.h, WKBackForwardList.cpp and new files.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 25b9452..b5f8225 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,32 @@
+2010-10-21 Juha Savolainen <juha.savolainen at weego.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ This is initial implementation of QWKHistory. The QWKHistory class represents the history of a QWKPage.
+ https://bugs.webkit.org/show_bug.cgi?id=47716
+
+ Each QWKPage instance contains a history of a visited pages that can be accessed by QWKHistory::history().
+ The QWKPagePrivate class creates QWKHistory in constructor.
+
+ * UIProcess/API/qt/qwkhistory.cpp: Added.
+ (QWKHistoryPrivate::QWKHistoryPrivate):
+ (QWKHistoryPrivate::createHistory): Creates history object.
+ (QWKHistoryPrivate::~QWKHistoryPrivate):
+ (QWKHistory::QWKHistory):
+ (QWKHistory::~QWKHistory):
+ (QWKHistory::backListCount): Gets items count in back.
+ (QWKHistory::forwardListCount): Gets items count in forward.
+ (QWKHistory::count): Gets items count.
+ * UIProcess/API/qt/qwkhistory.h: Added.
+ * UIProcess/API/qt/qwkhistory_p.h: Added.
+ * UIProcess/API/qt/qwkpage.cpp:
+ (QWKPagePrivate::QWKPagePrivate):
+ (QWKPagePrivate::~QWKPagePrivate):
+ (QWKPage::history): Returns history object.
+ * UIProcess/API/qt/qwkpage.h:
+ * UIProcess/API/qt/qwkpage_p.h: Added history member variable.
+ * WebKit2.pro: Added WKBackForwardList.h, WKBackForwardList.cpp and new files.
+
2010-10-14 Adam Roben <aroben at apple.com>
Don't require the plugin to always use the same NPP struct we gave it
diff --git a/WebKit2/UIProcess/API/qt/qwkhistory.cpp b/WebKit2/UIProcess/API/qt/qwkhistory.cpp
new file mode 100644
index 0000000..bbefe96
--- /dev/null
+++ b/WebKit2/UIProcess/API/qt/qwkhistory.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 Juha Savolainen (juha.savolainen at weego.fi)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "config.h"
+#include "qwkhistory.h"
+
+#include "WKBackForwardList.h"
+#include "WebBackForwardList.h"
+#include "qwkhistory_p.h"
+
+using namespace WebKit;
+
+QWKHistoryPrivate::QWKHistoryPrivate(WebKit::WebBackForwardList* list)
+ : m_backForwardList(list)
+{
+}
+
+QWKHistory* QWKHistoryPrivate::createHistory(WebKit::WebBackForwardList* list)
+{
+ QWKHistory* history = new QWKHistory();
+ history->d = new QWKHistoryPrivate(list);
+ return history;
+}
+
+QWKHistoryPrivate::~QWKHistoryPrivate()
+{
+}
+
+QWKHistory::QWKHistory()
+{
+}
+
+QWKHistory::~QWKHistory()
+{
+ delete d;
+}
+
+int QWKHistory::backListCount() const
+{
+ return WKBackForwardListGetBackListCount(toAPI(d->m_backForwardList));
+}
+
+int QWKHistory::forwardListCount() const
+{
+ return WKBackForwardListGetForwardListCount(toAPI(d->m_backForwardList));
+}
+
+int QWKHistory::count() const
+{
+ return backListCount() + forwardListCount();
+}
+
diff --git a/WebKit2/UIProcess/API/qt/qwkhistory.h b/WebKit2/UIProcess/API/qt/qwkhistory.h
new file mode 100644
index 0000000..65912dd
--- /dev/null
+++ b/WebKit2/UIProcess/API/qt/qwkhistory.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2010 Juha Savolainen (juha.savolainen at weego.fi)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef qwkhistory_h
+#define qwkhistory_h
+
+#include "qwebkitglobal.h"
+#include <QObject>
+
+class QWKHistoryPrivate;
+
+namespace WebKit {
+class WebBackForwardList;
+}
+
+class QWEBKIT_EXPORT QWKHistory : public QObject {
+ Q_OBJECT
+public:
+ int backListCount() const;
+ int forwardListCount() const;
+ int count() const;
+
+private:
+ QWKHistory();
+ ~QWKHistory();
+
+ QWKHistoryPrivate* d;
+ friend class QWKHistoryPrivate;
+ friend class QWKPagePrivate;
+};
+
+#endif /* qwkhistory_h */
diff --git a/WebKit2/UIProcess/API/qt/qwkhistory_p.h b/WebKit2/UIProcess/API/qt/qwkhistory_p.h
new file mode 100644
index 0000000..97e6cf3
--- /dev/null
+++ b/WebKit2/UIProcess/API/qt/qwkhistory_p.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Juha Savolainen (juha.savolainen at weego.fi)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef qwkhistory_p_h
+#define qwkhistory_p_h
+
+#include "qwebkitglobal.h"
+
+namespace WebKit {
+class WebBackForwardList;
+}
+
+class QWKHistory;
+
+class QWEBKIT_EXPORT QWKHistoryPrivate {
+public:
+ static QWKHistory* createHistory(WebKit::WebBackForwardList* list);
+
+private:
+ QWKHistoryPrivate(WebKit::WebBackForwardList* list);
+ ~QWKHistoryPrivate();
+
+ WebKit::WebBackForwardList* m_backForwardList;
+
+ friend class QWKHistory;
+};
+
+#endif /* qwkhistory_p_h */
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index 2b602cf..1193141 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -24,6 +24,8 @@
#include "qwkpreferences_p.h"
#include "ClientImpl.h"
+#include "qwkhistory.h"
+#include "qwkhistory_p.h"
#include "FindIndicator.h"
#include "LocalizedStrings.h"
#include "NativeWebKeyboardEvent.h"
@@ -60,11 +62,13 @@ QWKPagePrivate::QWKPagePrivate(QWKPage* qq, WKPageNamespaceRef namespaceRef)
page = toImpl(namespaceRef)->createWebPage();
page->setPageClient(this);
pageNamespaceRef = namespaceRef;
+ history = QWKHistoryPrivate::createHistory(page->backForwardList());
}
QWKPagePrivate::~QWKPagePrivate()
{
page->close();
+ delete history;
}
void QWKPagePrivate::init(const QSize& viewportSize, PassOwnPtr<DrawingAreaProxy> proxy)
@@ -477,6 +481,11 @@ void QWKPage::setPageAndTextZoomFactors(qreal pageZoomFactor, qreal textZoomFact
WKPageSetPageAndTextZoomFactors(pageRef(), pageZoomFactor, textZoomFactor);
}
+QWKHistory* QWKPage::history() const
+{
+ return d->history;
+}
+
#ifndef QT_NO_ACTION
void QWKPage::triggerAction(WebAction action, bool)
{
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.h b/WebKit2/UIProcess/API/qt/qwkpage.h
index 869d4c3..9b3e4ef 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.h
+++ b/WebKit2/UIProcess/API/qt/qwkpage.h
@@ -17,6 +17,7 @@ class QWKGraphicsWidget;
class QWKPreferences;
class QWKPagePrivate;
class QtViewportAttributesPrivate;
+class QWKHistory;
class QWEBKIT_EXPORT QWKPage : public QObject {
Q_OBJECT
@@ -95,6 +96,8 @@ public:
void setPageZoomFactor(qreal zoomFactor);
void setPageAndTextZoomFactors(qreal pageZoomFactor, qreal textZoomFactor);
+ QWKHistory* history() const;
+
public:
Q_SIGNAL void statusBarMessage(const QString&);
Q_SIGNAL void titleChanged(const QString&);
diff --git a/WebKit2/UIProcess/API/qt/qwkpage_p.h b/WebKit2/UIProcess/API/qt/qwkpage_p.h
index 8e7d58f..373ec2d 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage_p.h
+++ b/WebKit2/UIProcess/API/qt/qwkpage_p.h
@@ -84,6 +84,8 @@ public:
QWKPage* q;
+ QWKHistory* history;
+
QAction* actions[QWKPage::WebActionCount];
QWKPreferences* preferences;
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index a4cbb9f..4eaa2bd 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -224,6 +224,7 @@ HEADERS += \
Shared/WebUserContentURLPattern.h \
UIProcess/API/C/WebKit2.h \
UIProcess/API/C/WKAPICast.h \
+ UIProcess/API/C/WKBackForwardList.h \
UIProcess/API/C/WKContext.h \
UIProcess/API/C/WKContextPrivate.h \
UIProcess/API/C/WKFrame.h \
@@ -239,6 +240,8 @@ HEADERS += \
UIProcess/API/cpp/qt/WKURLQt.h \
UIProcess/API/cpp/WKRetainPtr.h \
UIProcess/API/qt/qgraphicswkview.h \
+ UIProcess/API/qt/qwkhistory.h \
+ UIProcess/API/qt/qwkhistory_p.h \
UIProcess/API/qt/qwkpage.h \
UIProcess/API/qt/qwkpage_p.h \
UIProcess/API/qt/qwkpreferences.h \
@@ -369,6 +372,7 @@ SOURCES += \
Shared/WebPreferencesStore.cpp \
Shared/WebURLRequest.cpp \
Shared/WebURLResponse.cpp \
+ UIProcess/API/C/WKBackForwardList.cpp \
UIProcess/API/C/WKContext.cpp \
UIProcess/API/C/WKFrame.cpp \
UIProcess/API/C/WKFramePolicyListener.cpp \
@@ -379,6 +383,7 @@ SOURCES += \
UIProcess/API/C/WKPreferencesPrivate.cpp \
UIProcess/API/qt/ClientImpl.cpp \
UIProcess/API/qt/qgraphicswkview.cpp \
+ UIProcess/API/qt/qwkhistory.cpp \
UIProcess/API/qt/qwkpage.cpp \
UIProcess/API/qt/qwkpreferences.cpp \
UIProcess/API/cpp/qt/WKStringQt.cpp \
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list