<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[24815] trunk</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/24815">24815</a></dd>
<dt>Author</dt> <dd>treat</dd>
<dt>Date</dt> <dd>2007-08-01 21:21:28 -0700 (Wed, 01 Aug 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add an interface to manage global history for clients</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCorepro">trunk/WebCore/WebCore.pro</a></li>
<li><a href="#trunkWebCoreplatformqtTemporaryLinkStubscpp">trunk/WebCore/platform/qt/TemporaryLinkStubs.cpp</a></li>
<li><a href="#trunkWebKitQtApiheaderspri">trunk/WebKitQt/Api/headers.pri</a></li>
<li><a href="#trunkWebKitQtChangeLog">trunk/WebKitQt/ChangeLog</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebKitQtApiqwebhistoryinterfacecpp">trunk/WebKitQt/Api/qwebhistoryinterface.cpp</a></li>
<li><a href="#trunkWebKitQtApiqwebhistoryinterfaceh">trunk/WebKitQt/Api/qwebhistoryinterface.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (24814 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-08-02 02:24:33 UTC (rev 24814)
+++ trunk/WebCore/ChangeLog        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -2,6 +2,15 @@
</span><span class="cx">
</span><span class="cx"> Reviewed by George Staikos.
</span><span class="cx">
</span><ins>+ Add an interface to manage global history for clients
+
+ * WebCore.pro:
+ * platform/qt/TemporaryLinkStubs.cpp:
+
+2007-08-01 Adam Treat <treat@kde.org>
+
+ Reviewed by George Staikos.
+
</ins><span class="cx"> Do not call update or paint from inside a paint event.
</span><span class="cx">
</span><span class="cx"> * platform/qt/ScrollViewQt.cpp:
</span></span></pre></div>
<a id="trunkWebCoreWebCorepro"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.pro (24814 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.pro        2007-08-02 02:24:33 UTC (rev 24814)
+++ trunk/WebCore/WebCore.pro        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -758,6 +758,7 @@
</span><span class="cx"> $$PWD/../WebKitQt/Api/qwebobjectplugin.h \
</span><span class="cx"> $$PWD/../WebKitQt/Api/qwebobjectplugin_p.h \
</span><span class="cx"> $$PWD/../WebKitQt/Api/qwebobjectpluginconnector.h \
</span><ins>+ $$PWD/../WebKitQt/Api/qwebhistoryinterface.h \
</ins><span class="cx"> $$PWD/../WebKitQt/Api/qcookiejar.h \
</span><span class="cx"> $$PWD/../WebKitQt/WebCoreSupport/FrameLoaderClientQt.h
</span><span class="cx">
</span><span class="lines">@@ -829,7 +830,8 @@
</span><span class="cx"> ../WebKitQt/Api/qwebpagehistory.cpp \
</span><span class="cx"> ../WebKitQt/Api/qwebsettings.cpp \
</span><span class="cx"> ../WebKitQt/Api/qwebobjectplugin.cpp \
</span><del>- ../WebKitQt/Api/qwebobjectpluginconnector.cpp
</del><ins>+ ../WebKitQt/Api/qwebobjectpluginconnector.cpp \
+ ../WebKitQt/Api/qwebhistoryinterface.cpp
</ins><span class="cx">
</span><span class="cx"> gdk-port {
</span><span class="cx"> HEADERS += \
</span></span></pre></div>
<a id="trunkWebCoreplatformqtTemporaryLinkStubscpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/qt/TemporaryLinkStubs.cpp (24814 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/qt/TemporaryLinkStubs.cpp        2007-08-02 02:24:33 UTC (rev 24814)
+++ trunk/WebCore/platform/qt/TemporaryLinkStubs.cpp        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -67,9 +67,6 @@
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><del>-
-bool WebCore::historyContains(DeprecatedString const&) { return false; }
-
</del><span class="cx"> void Frame::setNeedsReapplyStyles() { notImplemented(); }
</span><span class="cx">
</span><span class="cx"> void FrameView::updateBorder() { notImplemented(); }
</span></span></pre></div>
<a id="trunkWebKitQtApiheaderspri"></a>
<div class="modfile"><h4>Modified: trunk/WebKitQt/Api/headers.pri (24814 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitQt/Api/headers.pri        2007-08-02 02:24:33 UTC (rev 24814)
+++ trunk/WebKitQt/Api/headers.pri        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -6,4 +6,5 @@
</span><span class="cx"> $$PWD/qwebobjectpluginconnector.h \
</span><span class="cx"> $$PWD/qwebpage.h \
</span><span class="cx"> $$PWD/qwebpagehistory.h \
</span><del>- $$PWD/qwebsettings.h
</del><ins>+ $$PWD/qwebsettings.h \
+ $$PWD/qwebhistoryinterface.h
</ins></span></pre></div>
<a id="trunkWebKitQtApiqwebhistoryinterfacecpp"></a>
<div class="addfile"><h4>Added: trunk/WebKitQt/Api/qwebhistoryinterface.cpp (0 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitQt/Api/qwebhistoryinterface.cpp         (rev 0)
+++ trunk/WebKitQt/Api/qwebhistoryinterface.cpp        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ Copyright (C) 2007 Staikos Computing Services Inc. <info@staikos.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ This class provides all functionality needed for tracking global history.
+*/
+
+#include "qwebhistoryinterface.h"
+
+#include <QCoreApplication>
+
+#include "DeprecatedString.h"
+
+namespace WebCore {
+
+bool historyContains(const DeprecatedString& s)
+{
+ if (!QWebHistoryInterface::defaultInterface())
+ return false;
+
+ return QWebHistoryInterface::defaultInterface()->historyContains(QString(s));
+}
+
+} // namespace WebCore
+
+static QWebHistoryInterface *default_interface;
+
+static bool gRoutineAdded;
+
+static void gCleanupInterface()
+{
+ delete default_interface;
+ default_interface = 0;
+}
+
+/*!
+ Sets a new default interface that will be used by all of WebKit
+ for managing history.
+*/
+void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface *defaultInterface)
+{
+ if (default_interface == defaultInterface)
+ return;
+ if (default_interface)
+ delete default_interface;
+ default_interface = defaultInterface;
+ if (!gRoutineAdded) {
+ qAddPostRoutine(gCleanupInterface);
+ gRoutineAdded = true;
+ }
+}
+
+/*!
+ Returns the default interface that will be used by WebKit. If no
+ default interface has been set, QtWebkit will not track history.
+*/
+QWebHistoryInterface *QWebHistoryInterface::defaultInterface()
+{
+ return default_interface;
+}
+
+QWebHistoryInterface::QWebHistoryInterface(QObject *parent) : QObject(parent)
+{
+}
+
+QWebHistoryInterface::~QWebHistoryInterface()
+{
+}
</ins></span></pre></div>
<a id="trunkWebKitQtApiqwebhistoryinterfaceh"></a>
<div class="addfile"><h4>Added: trunk/WebKitQt/Api/qwebhistoryinterface.h (0 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitQt/Api/qwebhistoryinterface.h         (rev 0)
+++ trunk/WebKitQt/Api/qwebhistoryinterface.h        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+/*
+ Copyright (C) 2007 Staikos Computing Services, Inc. <info@staikos.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ This class provides all functionality needed for tracking global history.
+*/
+
+#ifndef QWEBHISTORYINTERFACE_H
+#define QWEBHISTORYINTERFACE_H
+
+#include <qobject.h>
+
+#include <qwebkitglobal.h>
+
+class QWEBKIT_EXPORT QWebHistoryInterface : public QObject
+{
+ Q_OBJECT
+public:
+ QWebHistoryInterface(QObject *parent = 0);
+ ~QWebHistoryInterface();
+
+ static void setDefaultInterface(QWebHistoryInterface *defaultInterface);
+ static QWebHistoryInterface *defaultInterface();
+
+ virtual bool historyContains(const QString &url) const = 0;
+};
+
+#endif
</ins></span></pre></div>
<a id="trunkWebKitQtChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKitQt/ChangeLog (24814 => 24815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKitQt/ChangeLog        2007-08-02 02:24:33 UTC (rev 24814)
+++ trunk/WebKitQt/ChangeLog        2007-08-02 04:21:28 UTC (rev 24815)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2007-08-01 Adam Treat <treat@kde.org>
+
+ Reviewed by George Staikos.
+
+ Add an interface to manage global history for clients
+
+ * Api/headers.pri:
+ * Api/qwebhistoryinterface.cpp: Added.
+ (WebCore::historyContains):
+ (gCleanupInterface):
+ (QWebHistoryInterface::setDefaultInterface):
+ (QWebHistoryInterface::defaultInterface):
+ (QWebHistoryInterface::QWebHistoryInterface):
+ * Api/qwebhistoryinterface.h: Added.
+
</ins><span class="cx"> 2007-07-30 Adam Treat <treat@kde.org>
</span><span class="cx">
</span><span class="cx"> Fix build.
</span></span></pre>
</div>
</div>
</body>
</html>