fix DRT after the changes to QWebPage.
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Jan 2008 14:49:50 +0000 (14:49 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Jan 2008 14:49:50 +0000 (14:49 +0000)
The great thing is that we actually don't have
any regressions from the QWebPage change :)

Signed-off-by: Simon
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29167 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp

index 2e67995..70fac13 100644 (file)
@@ -2,6 +2,19 @@
 
         Reviewed by Simon.
 
+        fix DRT after the changes to QWebPage.
+        
+        The great thing is that we actually don't have
+        any regressions from the QWebPage change :)
+        
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::DumpRenderTree::DumpRenderTree):
+
+2008-01-04  Lars Knoll  <lars@trolltech.com>
+
+        Reviewed by Simon.
+
         make QWebPage a QObject and get things to compile.
         
         Nothing works currently though.
index 7044e9f..fe2f764 100644 (file)
@@ -41,6 +41,7 @@
 
 #include <qwebpage.h>
 #include <qwebframe.h>
+#include <qwebview.h>
 #include <qwebsettings.h>
 
 #include <unistd.h>
@@ -68,6 +69,7 @@ public:
 
 private:
     DumpRenderTree *m_drt;
+    QWidget *m_view;
 };
 
 WebPage::WebPage(QWidget *parent, DumpRenderTree *drt)
@@ -112,9 +114,13 @@ DumpRenderTree::DumpRenderTree()
     m_controller = new LayoutTestController(this);
     connect(m_controller, SIGNAL(done()), this, SLOT(dump()), Qt::QueuedConnection);
 
-    m_page = new WebPage(0, this);
+    QWebView *view = new QWebView(0);
+    view->resize(QSize(maxViewWidth, maxViewHeight));
+    m_page = new WebPage(view, this);
+    view->setPage(m_page);
     connect(m_page, SIGNAL(frameCreated(QWebFrame *)), this, SLOT(connectFrame(QWebFrame *)));
-    m_page->setViewportSize(QSize(maxViewWidth, maxViewHeight));
+    connectFrame(m_page->mainFrame());
+    
     m_page->mainFrame()->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     m_page->mainFrame()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     connect(m_page->mainFrame(), SIGNAL(titleChanged(const QString&)),
@@ -126,7 +132,7 @@ DumpRenderTree::DumpRenderTree()
     QObject::connect(this, SIGNAL(quit()), qApp, SLOT(quit()), Qt::QueuedConnection);
     qt_drt_run(true);
     QFocusEvent event(QEvent::FocusIn, Qt::ActiveWindowFocusReason);
-    QApplication::sendEvent(m_page, &event);
+    QApplication::sendEvent(view, &event);
 }
 
 DumpRenderTree::~DumpRenderTree()