Added the first revision of QWebView and started moving functionality from QWebPave...
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jan 2008 13:50:59 +0000 (13:50 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jan 2008 13:50:59 +0000 (13:50 +0000)
Signed-off-by: Lars
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29122 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
WebCore/ChangeLog
WebCore/WebCore.pro
WebKit/qt/Api/headers.pri
WebKit/qt/Api/qwebframe.h
WebKit/qt/Api/qwebpage.cpp
WebKit/qt/Api/qwebpage.h
WebKit/qt/Api/qwebpagehistory.h
WebKit/qt/Api/qwebview.cpp [new file with mode: 0644]
WebKit/qt/Api/qwebview.h [new file with mode: 0644]
WebKit/qt/ChangeLog
WebKit/qt/QtLauncher/main.cpp
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp

index 1b6645caa77091467fbcd6e4b3f8144a41f3fcbb..cf0e9ec1cea33161e32822f4919f1829df22fc80 100644 (file)
@@ -1,3 +1,11 @@
+2008-01-03  Simon Hausmann  <hausmann@webkit.org>
+
+        Reviewed by Lars.
+
+        Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
+
+        * WebCore.pro:
+
 2008-01-03  Alp Toker  <alp@atoker.com>
 
         Suggested by Mark Rowe.
index 7b56146d3f0e040ef2aad7cf9992ebb4c1dec0cc..6c11eebc5864ceb0fa41e18b1d413c7a460251bf 100644 (file)
@@ -872,6 +872,7 @@ qt-port {
     $$PWD/platform/qt/SharedTimerQt.h \
     $$PWD/../WebKit/qt/Api/qwebframe.h \
     $$PWD/../WebKit/qt/Api/qwebpage.h \
+    $$PWD/../WebKit/qt/Api/qwebview.h \
     $$PWD/../WebKit/qt/Api/qwebnetworkinterface.h \
     $$PWD/../WebKit/qt/Api/qwebnetworkinterface_p.h \
     $$PWD/../WebKit/qt/Api/qwebobjectplugin.h \
@@ -949,6 +950,7 @@ qt-port {
     ../WebKit/qt/Api/qwebnetworkinterface.cpp \
     ../WebKit/qt/Api/qcookiejar.cpp \
     ../WebKit/qt/Api/qwebpage.cpp \
+    ../WebKit/qt/Api/qwebview.cpp \
     ../WebKit/qt/Api/qwebpagehistory.cpp \
     ../WebKit/qt/Api/qwebsettings.cpp \
     ../WebKit/qt/Api/qwebobjectplugin.cpp \
index 846b793d28cd9bb1ee00f38fd319a0d071fbf717..1e70072a7f497bbc6e503bbebac0f7744af68abf 100644 (file)
@@ -5,6 +5,7 @@ WEBKIT_API_HEADERS = $$PWD/qcookiejar.h \
                      $$PWD/qwebobjectplugin.h \
                      $$PWD/qwebobjectpluginconnector.h \
                      $$PWD/qwebpage.h \
+                     $$PWD/qwebview.h \
                      $$PWD/qwebpagehistory.h \
                      $$PWD/qwebsettings.h \
                      $$PWD/qwebhistoryinterface.h
index 858c56570c30a7fd079dc6fd203f872ba1bdb953..9eda6e48926fe52c3e8d1d54ac4ea11f4c1def14 100644 (file)
@@ -85,6 +85,14 @@ Q_SIGNALS:
     void titleChanged(const QString &title);
     void hoveringOverLink(const QString &link, const QString &title, const QString &textContent);
 
+    void loadStarted();
+    void loadFinished();
+
+    /**
+     * Signal is emitted when an icon ("favicon") is loaded from the site.
+     */
+    void iconLoaded();
+
 private:
     friend class QWebPage;
     friend class QWebPagePrivate;
index 7ca2310a43ae564dfcf17dc07f085280fb9f8592..fabe52300f58c6e3694307afa2943d337ea460a8 100644 (file)
@@ -32,6 +32,7 @@
 #include "qwebsettings.h"
 
 #include "Frame.h"
+#include "FrameLoaderClientQt.h"
 #include "ChromeClientQt.h"
 #include "ContextMenu.h"
 #include "ContextMenuClientQt.h"
@@ -126,8 +127,6 @@ void QWebPagePrivate::createMainFrame()
         frameData.marginWidth = 0;
         frameData.marginHeight = 0;
         mainFrame = new QWebFrame(q, &frameData);
-        QObject::connect(mainFrame, SIGNAL(titleChanged(const QString&)),
-                q, SIGNAL(titleChanged(const QString&)));
         mainFrame->d->frameView->setFrameGeometry(q->geometry());
 
         emit q->frameCreated(mainFrame);
@@ -359,14 +358,9 @@ QWebFrame *QWebPage::mainFrame() const
     return d->mainFrame;
 }
 
-QSize QWebPage::sizeHint() const
+QWebFrame *QWebPage::currentFrame() const
 {
-    return QSize(800, 600);
-}
-
-void QWebPage::stop()
-{
-    triggerAction(Stop);
+    return static_cast<WebCore::FrameLoaderClientQt *>(d->page->focusController()->focusedOrMainFrame()->loader()->client())->webFrame();
 }
 
 QWebPageHistory *QWebPage::history() const
index 0ead003bdea1b242cc045173a2785fec5b9c1f22..120321dfc6be87bdfd36a529e6f8df502acbbfd3 100644 (file)
@@ -85,7 +85,7 @@ public:
         DownloadImageToDisk,
         CopyImageToClipboard,
 
-        GoBack,
+        GoBack, // ###GoBackward instead?
         GoForward,
         Stop,
         Reload,
@@ -140,17 +140,18 @@ public:
     explicit QWebPage(QWidget *parent = 0);
     ~QWebPage();
 
+    // ### move to frame
     void open(const QUrl &url);
     void open(const QWebNetworkRequest &request);
 
     QWebFrame *mainFrame() const;
+    QWebFrame *currentFrame() const;
 
     QWebPageHistory *history() const;
 
     QWebSettings *settings();
 
-    QSize sizeHint() const;
-
+    // ### move to frame
     QString title() const;
     QUrl url() const;
     QPixmap icon() const;
@@ -175,35 +176,12 @@ public:
     QAction *action(WebAction action) const;
     virtual void triggerAction(WebAction action, bool checked = false);
 
-public Q_SLOTS:
-    /**
-     * Stops loading of the page, if loading.
-     */
-    void stop();
-
 Q_SIGNALS:
-    /**
-     * Signal is emitted when load is started on one of the child
-     * frames of the page. The frame on which the load started
-     * is passed.
-     */
-    void loadStarted(QWebFrame *frame);
     /**
      * Signal is emitted when the global progress status changes.
      * It accumulates changes from all the child frames.
      */
     void loadProgressChanged(int progress);
-    /**
-     * Signal is emitted when load has been finished on one of
-     * the child frames of the page. The frame on which the
-     * load finished is passed as an argument.
-     */
-    void loadFinished(QWebFrame *frame);
-    /**
-     * Signal is emitted when the title of this page has changed.
-     * Applies only to the main frame.  Sub-frame titles do not trigger this.
-     */
-    void titleChanged(const QString& title);
     /**
      * Signal is emitted when the mouse is hovering over a link.
      * The first parameter is the link url, the second is the link title
@@ -215,16 +193,13 @@ Q_SIGNALS:
      * Signal is emitted when the statusbar text is changed by the page.
      */
     void statusBarTextChanged(const QString& text);
-    /**
-     * Signal is emitted when an icon ("favicon") is loaded from the site.
-     */
-    void iconLoaded();
 
     void selectionChanged();
 
     /**
       * Signal is emitted when the mainframe()'s initial layout is completed.
      */
+    // ### move to frame
     void initialLayoutComplete();
 
     // ### call addedToHistory instead, something more signal'ish
@@ -234,6 +209,12 @@ Q_SIGNALS:
 
     void geometryChangeRequest(const QRect& geom);
 
+    //void addEmbeddableWidget(QWidget *widget);
+    //void addEmbeddableWidget(const QString &classid, QWidget *widget);
+    //void removeEmbeddableWidget(QWidget *widget);
+    //QHash<QString, QWidget *> embeddableWidgets() const;
+    //void clearEmbeddableWidgets();
+
 protected:
     virtual QWebPage *createWindow();
     virtual QWebPage *createModalDialog();
index f82af47305d8bfe2dbda472f95cdbf6ca74173c9..938afd54422e40919136c67d8de60db5fd1dcb32 100644 (file)
@@ -56,6 +56,7 @@ private:
 };
 
 class QWebPageHistoryPrivate;
+// ### rename to QWebHistory
 class QWEBKIT_EXPORT QWebPageHistory
 {
 public:
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
new file mode 100644 (file)
index 0000000..31c1c09
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+    Copyright (C) 2007 Trolltech ASA
+
+    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., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "qwebview.h"
+#include "qwebframe.h"
+#include "qevent.h"
+
+class QWebViewPrivate
+{
+public:
+    QWebPage *page;
+};
+
+QWebView::QWebView(QWidget *parent)
+    : QWidget(parent)
+{
+    d = new QWebViewPrivate;
+    d->page = 0;
+}
+
+QWebView::~QWebView()
+{
+    if (d->page && d->page->parent() == this)
+        delete d->page;
+    delete d;
+}
+
+QWebPage *QWebView::page() const
+{
+    if (!d->page) {
+        QWebView *that = const_cast<QWebView *>(this);
+        that->setPage(new QWebPage(that));
+    }
+    return d->page;
+}
+
+void QWebView::setPage(QWebPage *page)
+{
+    if (d->page == page)
+        return;
+    if (d->page) {
+        if (d->page->parent() == this) {
+            delete d->page;
+        } else {
+            d->page->disconnect(this);
+        }
+    }
+    d->page = page;
+    if (d->page) {
+        // #### connect signals
+        QWebFrame *mainFrame = d->page->mainFrame();
+        connect(mainFrame, SIGNAL(loadStarted()),
+                this, SIGNAL(loadStarted()));
+        connect(mainFrame, SIGNAL(loadFinished()),
+                this, SIGNAL(loadFinished()));
+        connect(mainFrame, SIGNAL(titleChanged(const QString&)),
+                this, SIGNAL(titleChanged(const QString&)));
+        connect(mainFrame, SIGNAL(iconLoaded()),
+                this, SIGNAL(iconLoaded()));
+
+        connect(d->page, SIGNAL(loadProgressChanged(int)),
+                this, SIGNAL(loadProgressChanged(int)));
+        connect(d->page, SIGNAL(statusBarTextChanged(const QString &)),
+                this, SIGNAL(statusBarTextChanged(const QString &)));
+    }
+    update();
+}
+
+void QWebView::load(const QUrl &url)
+{
+    page()->open(url);
+}
+
+void QWebView::load(const QWebNetworkRequest &request)
+{
+    page()->open(request);
+}
+
+void QWebView::setHtml(const QString &html, const QUrl &baseUrl)
+{
+    // #### FIXME
+}
+
+void QWebView::setHtml(const QByteArray &html, const QUrl &baseUrl)
+{
+    // #### FIXME
+}
+
+QWebPageHistory *QWebView::history() const
+{
+    return page()->history();
+}
+
+QWebSettings *QWebView::settings() const
+{
+    return page()->settings();
+}
+
+QString QWebView::title() const
+{
+    if (d->page)
+        return d->page->title();
+    return QString();
+}
+
+QUrl QWebView::url() const
+{
+    if (d->page)
+        return d->page->url();
+    return QUrl();
+}
+
+QPixmap QWebView::icon() const
+{
+    if (d->page)
+        return d->page->icon();
+    return QPixmap();
+}
+
+QString QWebView::selectedText() const
+{
+    if (d->page)
+        return d->page->selectedText();
+    return QString();
+}
+
+QAction *QWebView::action(QWebPage::WebAction action) const
+{
+    return page()->action(action);
+}
+
+void QWebView::triggerAction(QWebPage::WebAction action, bool checked)
+{
+    page()->triggerAction(action, checked);
+}
+
+bool QWebView::isModified()
+{
+    if (d->page)
+        return d->page->isModified();
+    return false;
+}
+
+Qt::TextInteractionFlags QWebView::textInteractionFlags() const
+{
+    // ### FIXME (add to page)
+    return Qt::TextInteractionFlags();
+}
+
+void QWebView::setTextInteractionFlags(Qt::TextInteractionFlags flags)
+{
+    Q_UNUSED(flags)
+    // ### FIXME (add to page)
+}
+
+QSize QWebView::sizeHint() const
+{
+    return QSize(800, 600); // ####...
+}
+
+void QWebView::stop()
+{
+    if (d->page)
+        d->page->triggerAction(QWebPage::Stop);
+}
+
+void QWebView::backward()
+{
+    if (d->page)
+        d->page->triggerAction(QWebPage::GoBack);
+}
+
+void QWebView::forward()
+{
+    if (d->page)
+        d->page->triggerAction(QWebPage::GoForward);
+}
+
+void QWebView::reload()
+{
+    if (d->page)
+        d->page->triggerAction(QWebPage::Reload);
+}
+
+void QWebView::resizeEvent(QResizeEvent *e)
+{
+    if (d->page)
+        d->page->resize(e->size());
+}
+
diff --git a/WebKit/qt/Api/qwebview.h b/WebKit/qt/Api/qwebview.h
new file mode 100644 (file)
index 0000000..536e11b
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+    Copyright (C) 2007 Trolltech ASA
+    Copyright (C) 2007 Staikos Computing Services Inc.
+
+    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., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+#ifndef QWEBVIEW_H
+#define QWEBVIEW_H
+
+#include "qwebkitglobal.h"
+#include "qwebpage.h"
+#include <QtGui/qwidget.h>
+
+class QWebPage;
+class QWebViewPrivate;
+
+class QWEBKIT_EXPORT QWebView : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit QWebView(QWidget *parent = 0);
+    virtual ~QWebView();
+
+    QWebPage *page() const;
+    void setPage(QWebPage *page);
+
+    // ### also offer in QWebFrame
+    void load(const QUrl &url);
+    void load(const QWebNetworkRequest &request);
+    void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
+    void setHtml(const QByteArray &html, const QUrl &baseUrl = QUrl());
+
+    QWebPageHistory *history() const;
+    QWebSettings *settings() const;
+
+    QString title() const;
+    QUrl url() const;
+    QPixmap icon() const;
+
+    QString selectedText() const;
+
+    QAction *action(QWebPage::WebAction action) const;
+    void triggerAction(QWebPage::WebAction action, bool checked = false);
+
+    bool isModified();
+
+    Qt::TextInteractionFlags textInteractionFlags() const;
+    void setTextInteractionFlags(Qt::TextInteractionFlags flags);
+
+    /* #### QTextBrowser compatibility?
+    bool openLinks() const;
+    void setOpenLinks(bool open);
+
+    bool openExternalLinks() const;
+    void setOpenExternalLinks(bool open);
+    */
+
+    QSize sizeHint() const;
+public Q_SLOTS:
+    void stop();
+    void backward();
+    void forward();
+    void reload();
+
+Q_SIGNALS:
+    void loadStarted();
+    void loadProgressChanged(int progress);
+    void loadFinished();
+    void titleChanged(const QString& title);
+    void statusBarTextChanged(const QString& text);
+    void linkClicked(const QUrl &url);
+    void selectionChanged();
+    void iconLoaded();
+
+protected:
+    virtual void resizeEvent(QResizeEvent *e);
+
+private:
+    QWebViewPrivate *d;
+};
+
+#endif // QWEBVIEW_H
index 81468249306715c1e05353f280667c3b7ca07aa2..c81e83c99dbb0aacfab5d8d920afcfcb4010a096 100644 (file)
@@ -1,3 +1,48 @@
+2008-01-03  Simon Hausmann  <hausmann@webkit.org>
+
+        Reviewed by Lars.
+
+        Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
+        
+
+        * Api/headers.pri:
+        * Api/qwebframe.h:
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::createMainFrame):
+        * Api/qwebpage.h:
+        * Api/qwebpagehistory.h:
+        * Api/qwebview.cpp: Added.
+        (QWebView::QWebView):
+        (QWebView::~QWebView):
+        (QWebView::page):
+        (QWebView::setPage):
+        (QWebView::load):
+        (QWebView::setHtml):
+        (QWebView::history):
+        (QWebView::settings):
+        (QWebView::title):
+        (QWebView::url):
+        (QWebView::icon):
+        (QWebView::selectedText):
+        (QWebView::action):
+        (QWebView::triggerAction):
+        (QWebView::isModified):
+        (QWebView::textInteractionFlags):
+        (QWebView::setTextInteractionFlags):
+        (QWebView::sizeHint):
+        (QWebView::stop):
+        (QWebView::backward):
+        (QWebView::forward):
+        (QWebView::reload):
+        * Api/qwebview.h: Added.
+        * QtLauncher/main.cpp:
+        (MainWindow::MainWindow):
+        (MainWindow::webPage):
+        (MainWindow::changeLocation):
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::setFrame):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+
 2007-12-14  Darin Adler  <darin@apple.com>
 
         Reviewed by Alexey.
index b0dc0e9e084a0ee2c6557fd6e18bed1a7f472e17..7467c6b89c4509af4d24d79fa165fcbb3eeaa7c3 100644 (file)
@@ -28,6 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <qwebpage.h>
+#include <qwebview.h>
 #include <qwebframe.h>
 #include <qwebsettings.h>
 
@@ -284,41 +285,42 @@ class MainWindow : public QMainWindow
 public:
     MainWindow(const QUrl &url = QUrl())
     {
-        page = new WebPage(this);
-        InfoWidget *info = new InfoWidget(page);
+        view = new QWebView(this);
+        view->setPage(new WebPage(view));
+        InfoWidget *info = new InfoWidget(view);
         info->setGeometry(20, 20, info->sizeHint().width(),
                           info->sizeHint().height());
-        connect(page, SIGNAL(loadStarted(QWebFrame*)),
+        connect(view, SIGNAL(loadStarted()),
                 info, SLOT(startLoad()));
-        connect(page, SIGNAL(loadProgressChanged(int)),
+        connect(view, SIGNAL(loadProgressChanged(int)),
                 info, SLOT(changeLoad(int)));
-        connect(page, SIGNAL(loadFinished(QWebFrame*)),
+        connect(view, SIGNAL(loadFinished()),
                 info, SLOT(endLoad()));
-        connect(page, SIGNAL(loadFinished(QWebFrame*)),
+        connect(view, SIGNAL(loadFinished()),
                 this, SLOT(loadFinished()));
-        connect(page, SIGNAL(titleChanged(const QString&)),
+        connect(view, SIGNAL(titleChanged(const QString&)),
                 this, SLOT(setWindowTitle(const QString&)));
-        connect(page, SIGNAL(hoveringOverLink(const QString&, const QString&)),
+        connect(view->page(), SIGNAL(hoveringOverLink(const QString&, const QString&)),
                 this, SLOT(showLinkHover(const QString&, const QString&)));
 
 
-        setCentralWidget(page);
+        setCentralWidget(view);
 
         QToolBar *bar = addToolBar("Navigation");
         urlEdit = new SearchEdit(url.toString());
         urlEdit->setSizePolicy(QSizePolicy::Expanding, urlEdit->sizePolicy().verticalPolicy());
         connect(urlEdit, SIGNAL(returnPressed()),
                 SLOT(changeLocation()));
-        bar->addAction(page->action(QWebPage::GoBack));
-        bar->addAction(page->action(QWebPage::Stop));
-        bar->addAction(page->action(QWebPage::GoForward));
+        bar->addAction(view->action(QWebPage::GoBack));
+        bar->addAction(view->action(QWebPage::Stop));
+        bar->addAction(view->action(QWebPage::GoForward));
         bar->addSeparator();
-        bar->addAction(page->action(QWebPage::Cut));
-        bar->addAction(page->action(QWebPage::Copy));
-        bar->addAction(page->action(QWebPage::Paste));
+        bar->addAction(view->action(QWebPage::Cut));
+        bar->addAction(view->action(QWebPage::Copy));
+        bar->addAction(view->action(QWebPage::Paste));
         bar->addSeparator();
-        bar->addAction(page->action(QWebPage::Undo));
-        bar->addAction(page->action(QWebPage::Redo));
+        bar->addAction(view->action(QWebPage::Undo));
+        bar->addAction(view->action(QWebPage::Redo));
 
         addToolBarBreak();
         bar = addToolBar("Location");
@@ -329,20 +331,20 @@ public:
         hoverLabel->hide();
 
         if (url.isValid())
-            page->open(url);
+            view->load(url);
 
         info->raise();
     }
-    inline QWebPage *webPage() const { return page; }
+    inline QWebPage *webPage() const { return view->page(); }
 protected slots:
     void changeLocation()
     {
         QUrl url(urlEdit->text());
-        page->open(url);
+        view->load(url);
     }
     void loadFinished()
     {
-        urlEdit->setText(page->url().toString());
+        urlEdit->setText(view->url().toString());
     }
     void showLinkHover(const QString &link, const QString &toolTip)
     {
@@ -360,7 +362,7 @@ protected:
                                 300, hoverSize.height());
     }
 private:
-    QWebPage *page;
+    QWebView *view;
     QLineEdit *urlEdit;
     HoverLabel *hoverLabel;
 };
index 143d240179878d1c3cea0c094c00a692ab2bece8..7f99cd1259c5367d61cb96606cf92469bf042fb8 100644 (file)
@@ -79,12 +79,12 @@ void FrameLoaderClientQt::setFrame(QWebFrame* webFrame, Frame* frame)
         return;
     }
 
-    connect(this, SIGNAL(loadStarted(QWebFrame*)),
-            m_webFrame->page(), SIGNAL(loadStarted(QWebFrame *)));
+    connect(this, SIGNAL(loadStarted()),
+            m_webFrame, SIGNAL(loadStarted()));
     connect(this, SIGNAL(loadProgressChanged(int)),
             m_webFrame->page(), SIGNAL(loadProgressChanged(int)));
-    connect(this, SIGNAL(loadFinished(QWebFrame*)),
-            m_webFrame->page(), SIGNAL(loadFinished(QWebFrame *)));
+    connect(this, SIGNAL(loadFinished()),
+            m_webFrame, SIGNAL(loadFinished()));
     connect(this, SIGNAL(titleChanged(const QString&)),
             m_webFrame, SIGNAL(titleChanged(const QString&)));
 }
@@ -396,7 +396,7 @@ void FrameLoaderClientQt::clearUnarchivingState(DocumentLoader*)
 void FrameLoaderClientQt::postProgressStartedNotification()
 {
     if (m_webFrame && m_frame->page())
-        emit loadStarted(m_webFrame);
+        emit loadStarted();
     if (m_frame->tree()->parent())
         return;
     m_webFrame->page()->d->updateNavigationActions();
@@ -411,7 +411,7 @@ void FrameLoaderClientQt::postProgressEstimateChangedNotification()
 void FrameLoaderClientQt::postProgressFinishedNotification()
 {
     if (m_webFrame && m_frame->page())
-        emit loadFinished(m_webFrame);
+        emit loadFinished();
 }
 
 void FrameLoaderClientQt::setMainFrameDocumentReady(bool b)
@@ -561,7 +561,7 @@ String FrameLoaderClientQt::userAgent(const KURL& url)
 void FrameLoaderClientQt::dispatchDidReceiveIcon()
 {
     if (m_webFrame) {
-        emit m_webFrame->page()->iconLoaded();
+        emit m_webFrame->iconLoaded();
     }
 }
 
index fe528de73b013351e6ceb70d08075374ff508e23..2eced5d2efefbd221f96d2fc9cd83ffdd812a250 100644 (file)
@@ -59,9 +59,9 @@ namespace WebCore {
         void slotCallPolicyFunction(int);
     signals:
         void sigCallPolicyFunction(int);
-        void loadStarted(QWebFrame *frame);
+        void loadStarted();
         void loadProgressChanged(int d);
-        void loadFinished(QWebFrame *frame);
+        void loadFinished();
         void titleChanged(const QString& title);
 
     public:
index 7433b4e33161852efc10150a48827209c67d2586..e4af68ebcb4bac3bb2254f973b3f5642a8ba4593 100644 (file)
@@ -1,3 +1,13 @@
+2008-01-03  Simon Hausmann  <hausmann@webkit.org>
+
+        Reviewed by Lars.
+
+        Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
+        
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::DumpRenderTree::DumpRenderTree):
+
 2008-01-02  Sam Weinig  <sam@webkit.org>
 
         * Scripts/do-webcore-rename: Yet more renaming ideas.
index 37722f267697f9dfca028e7560b61a8046a91c52..0e8469bc158748198c3e91e63433e0b8ca02673b 100644 (file)
@@ -117,7 +117,7 @@ DumpRenderTree::DumpRenderTree()
     m_page->resize(maxViewWidth, maxViewHeight);
     m_page->mainFrame()->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     m_page->mainFrame()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-    connect(m_page, SIGNAL(titleChanged(const QString&)),
+    connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
             SLOT(titleChanged(const QString&)));
 
     m_eventSender = new EventSender(m_page);