Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10644
Adjust DumpRenderTree to the FrameQtClient changes.
* DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt:
* DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
(WebCore::DumpRenderTree::DumpRenderTree):
(WebCore::DumpRenderTree::~DumpRenderTree):
(WebCore::DumpRenderTree::frame):
* DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
* DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp: Added.
(WebCore::DumpRenderTreeClient::DumpRenderTreeClient):
(WebCore::DumpRenderTreeClient::~DumpRenderTreeClient):
* DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16215
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-09-04 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Darin.
+
+ Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10644
+ Adjust DumpRenderTree to the FrameQtClient changes.
+
+ * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::frame):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.h:
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.cpp: Added.
+ (WebCore::DumpRenderTreeClient::DumpRenderTreeClient):
+ (WebCore::DumpRenderTreeClient::~DumpRenderTreeClient):
+ * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTreeClient.h: Added.
+
2006-09-03 Darin Adler <darin@apple.com>
* Scripts/do-webcore-rename: More renaming plans.
add_definitions(-Wno-undef -Wno-unused-parameter)
-set(DumpRenderTree_SRCS main.cpp DumpRenderTree.cpp)
+set(DumpRenderTree_SRCS main.cpp DumpRenderTree.cpp DumpRenderTreeClient.cpp)
kde4_automoc(${DumpRenderTree_SRCS})
kde4_add_executable(DumpRenderTree RUN_UNINSTALLED ${DumpRenderTree_SRCS})
target_link_libraries(DumpRenderTree ${KDE4_KDECORE_LIBS} WebCore-unity)
*/
#include "config.h"
+#include "DumpRenderTree.h"
+
+#include "Page.h"
#include "markup.h"
#include "Document.h"
-#include "DumpRenderTree.h"
#include "RenderTreeAsText.h"
#include <QTimer>
DumpRenderTree::DumpRenderTree()
: m_frame(0)
+ , m_client(new DumpRenderTreeClient())
, m_stdin(0)
, m_notifier()
{
- m_frame = new FrameQt(0 /* no toplevel widget */);
- m_frame->view()->setScrollBarsMode(ScrollBarAlwaysOff);
+ // Initialize WebCore in Qt platform mode...
+ Page* page = new Page();
+ m_frame = new FrameQt(page, 0, m_client);
+
+ page->setMainFrame(m_frame);
+
+ FrameView* view = new FrameView(m_frame);
+ view->setScrollBarsMode(ScrollBarAlwaysOff);
+
+ m_frame->setView(view);
+ view->setParentWidget(0 /* no toplevel widget */);
// Reverse calculations in QAbstractScrollArea::maximumViewportSize()
QScrollArea* area = qobject_cast<QScrollArea*>(m_frame->view()->qwidget());
DumpRenderTree::~DumpRenderTree()
{
delete m_frame;
+ delete m_client;
delete m_stdin;
delete m_notifier;
QTimer::singleShot(10, this, SLOT(checkLoaded()));
}
+FrameQt* DumpRenderTree::frame() const
+{
+ return m_frame;
+}
+
}
#include "DumpRenderTree.moc"
#include <QTextStream>
#include <QSocketNotifier>
-#include "FrameQt.h"
+#include "DumpRenderTreeClient.h"
namespace WebCore {
void readStdin(int);
void checkLoaded();
+private:
+ friend class DumpRenderTreeClient;
+
+ FrameQt* frame() const;
+
private:
FrameQt* m_frame;
+ DumpRenderTreeClient* m_client;
QTextStream* m_stdin;
QSocketNotifier* m_notifier;
--- /dev/null
+/*
+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ *
+ * All rights reserved.
+ *
+ * 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 COMPUTER, INC. ``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 COMPUTER, INC. OR
+ * 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 "DumpRenderTreeClient.h"
+
+#include "DumpRenderTree.h"
+
+namespace WebCore {
+
+DumpRenderTreeClient::DumpRenderTreeClient()
+ : FrameQtClientDefault()
+{
+}
+
+DumpRenderTreeClient::~DumpRenderTreeClient()
+{
+}
+
+}
+
+// vim: ts=4 sw=4 et
--- /dev/null
+/*
+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ *
+ * All rights reserved.
+ *
+ * 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 COMPUTER, INC. ``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 COMPUTER, INC. OR
+ * 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 DumpRenderTreeClient_H
+#define DumpRenderTreeClient_H
+
+#include "FrameQt.h"
+
+namespace WebCore {
+
+class DumpRenderTreeClient : public FrameQtClientDefault
+{
+public:
+ DumpRenderTreeClient();
+ virtual ~DumpRenderTreeClient();
+};
+
+}
+
+#endif
+
+// vim: ts=4 sw=4 et