From 83cb42e1407ac73670100b67b72dd7d0ca17a996 Mon Sep 17 00:00:00 2001 From: "abecsi@webkit.org" Date: Fri, 23 Jul 2010 13:39:33 +0000 Subject: [PATCH] 2010-07-23 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [Qt] Setup the QtWebProcess https://bugs.webkit.org/show_bug.cgi?id=42623 * WebCore.pro: Added WebProcessMainQt.cpp to SOURCES. 2010-07-23 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [Qt] Setup the QtWebProcess https://bugs.webkit.org/show_bug.cgi?id=42623 * WebKit.pro: Add WebKit2.pro to the build guarded by webkit2 config variable. 2010-07-19 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [Qt] Setup the QtWebProcess https://bugs.webkit.org/show_bug.cgi?id=42623 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Remove the framework entry point from here to WebProcess/qt/WebProcessMainQt.cpp to match with with the mac and the win port. * WebKit2.pro: Added. * WebProcess/qt/WebProcessMainQt.cpp: Added. (WebKit::WebProcessMainQt): Framework entry point for Qt. * qt/MainQt.cpp: Added. (main): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63968 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- ChangeLog | 10 +++ WebCore/ChangeLog | 10 +++ WebCore/WebCore.pro | 1 + WebKit.pro | 4 ++ WebKit2/ChangeLog | 16 +++++ .../UIProcess/Launcher/qt/ProcessLauncherQt.cpp | 37 ---------- WebKit2/WebKit2.pro | 47 +++++++++++++ WebKit2/WebProcess/qt/WebProcessMainQt.cpp | 78 ++++++++++++++++++++++ WebKit2/qt/MainQt.cpp | 47 +++++++++++++ 9 files changed, 213 insertions(+), 37 deletions(-) create mode 100644 WebKit2/WebKit2.pro create mode 100644 WebKit2/WebProcess/qt/WebProcessMainQt.cpp create mode 100644 WebKit2/qt/MainQt.cpp diff --git a/ChangeLog b/ChangeLog index f1aec58..ab52b0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-07-23 Balazs Kelemen + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Setup the QtWebProcess + + https://bugs.webkit.org/show_bug.cgi?id=42623 + + * WebKit.pro: Add WebKit2.pro to the build guarded by webkit2 config variable. + 2010-07-20 Rafael Antognolli Reviewed by Antonio Gomes. diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index e3569ee..9b568b5 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,13 @@ +2010-07-23 Balazs Kelemen + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Setup the QtWebProcess + + https://bugs.webkit.org/show_bug.cgi?id=42623 + + * WebCore.pro: Added WebProcessMainQt.cpp to SOURCES. + 2010-07-23 Pavel Feldman Not reviewed: Chromium tests fix. diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro index 66fa5ca..83e74e0 100644 --- a/WebCore/WebCore.pro +++ b/WebCore/WebCore.pro @@ -3366,6 +3366,7 @@ SOURCES += \ ../WebKit2/WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp \ ../WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp \ ../WebKit2/WebProcess/WebProcess.cpp \ + ../WebKit2/WebProcess/qt/WebProcessMainQt.cpp } diff --git a/WebKit.pro b/WebKit.pro index d8c1bc5..43b0e3b 100644 --- a/WebKit.pro +++ b/WebKit.pro @@ -28,6 +28,10 @@ build-qtscript { JavaScriptCore/qt/benchmarks } +webkit2 { + exists($$PWD/WebKit2/WebKit2.pro): SUBDIRS += WebKit2/WebKit2.pro +} + symbian { # Forward the install target to WebCore. A workaround since INSTALLS is not implemented for symbian install.commands = $(MAKE) -C WebCore install diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog index 0558592..827be1c 100644 --- a/WebKit2/ChangeLog +++ b/WebKit2/ChangeLog @@ -1,3 +1,19 @@ +2010-07-19 Balazs Kelemen + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Setup the QtWebProcess + + https://bugs.webkit.org/show_bug.cgi?id=42623 + + * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: + Remove the framework entry point from here to WebProcess/qt/WebProcessMainQt.cpp to match with with the mac and the win port. + * WebKit2.pro: Added. + * WebProcess/qt/WebProcessMainQt.cpp: Added. + (WebKit::WebProcessMainQt): Framework entry point for Qt. + * qt/MainQt.cpp: Added. + (main): + 2010-07-22 Darin Adler Reviewed by Sam Weinig. diff --git a/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp index efa6cee..5be4419 100644 --- a/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp +++ b/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp @@ -35,10 +35,6 @@ #include #include -#if USE(MEEGOTOUCH) -#include -#endif - #include #include #include @@ -49,14 +45,6 @@ #include #include -#if !defined(QWEBKIT_EXPORT) -# if defined(QT_SHARED) -# define QWEBKIT_EXPORT Q_DECL_EXPORT -# else -# define QWEBKIT_EXPORT -# endif -#endif - using namespace WebCore; namespace WebKit { @@ -173,29 +161,4 @@ CoreIPC::Connection::Identifier ProcessLauncher::createWebThread() } // namespace WebKit -QWEBKIT_EXPORT int webProcessMain(int argc, char** argv) -{ - QApplication* app = new QApplication(argc, argv); - -#if USE(MEEGOTOUCH) - new MComponentData(argc, argv); -#endif - - srandom(time(0)); - - JSC::initializeThreading(); - WTF::initializeMainThread(); - RunLoop::initializeMainRunLoop(); - - // Create the connection. - QString identifier(app->arguments().size() > 1 ? app->arguments().at(1) : ""); - WebKit::WebProcess::shared().initialize(identifier, RunLoop::main()); - - RunLoop::run(); - - // FIXME: Do more cleanup here. - - return 0; -} - #include "ProcessLauncherQt.moc" diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro new file mode 100644 index 0000000..7494398 --- /dev/null +++ b/WebKit2/WebKit2.pro @@ -0,0 +1,47 @@ +TEMPLATE = app +TARGET = QtWebProcess + +SOURCES += \ + qt/MainQt.cpp + +isEmpty(OUTPUT_DIR): OUTPUT_DIR = .. +include(../WebKit.pri) + +INCLUDEPATH += \ + $$OUTPUT_DIR/include \ + $$PWD/UIProcess/API/C \ + $$PWD/Platform \ + $$PWD/Platform/CoreIPC \ + $$PWD/Shared \ + $$PWD/WebProcess \ + $$PWD/WebProcess/WebPage \ + $$PWD/../JavaScriptCore + +DESTDIR = $$OUTPUT_DIR/bin +!CONFIG(standalone_package): CONFIG -= app_bundle + +QT += network +macx:QT+=xml + +linux-* { + # From Creator's src/rpath.pri: + # Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR + # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var. + QMAKE_RPATHDIR = \$\$ORIGIN/../lib $$QMAKE_RPATHDIR + MY_RPATH = $$join(QMAKE_RPATHDIR, ":") + + QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${MY_RPATH}\' + QMAKE_RPATHDIR = +} else { + QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR +} + +symbian { + TARGET.UID3 = 0xA000E543 + TARGET.CAPABILITY = ReadUserData WriteUserData NetworkServices +} + +contains(QT_CONFIG, opengl) { + QT += opengl + DEFINES += QT_CONFIGURED_WITH_OPENGL +} diff --git a/WebKit2/WebProcess/qt/WebProcessMainQt.cpp b/WebKit2/WebProcess/qt/WebProcessMainQt.cpp new file mode 100644 index 0000000..f48cff7 --- /dev/null +++ b/WebKit2/WebProcess/qt/WebProcessMainQt.cpp @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * 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 "RunLoop.h" +#include +#include "WebProcess.h" +#include + +#include +#include +#include +#include + +#if USE(MEEGOTOUCH) +#include +#endif + +#if !defined(QWEBKIT_EXPORT) +#if defined(QT_SHARED) +#define QWEBKIT_EXPORT Q_DECL_EXPORT +#else +#define QWEBKIT_EXPORT +#endif +#endif + +using namespace WebCore; + +namespace WebKit { + +QWEBKIT_EXPORT int WebProcessMainQt(int argc, char** argv) +{ + QApplication* app = new QApplication(argc, argv); + +#if USE(MEEGOTOUCH) + new MComponentData(argc, argv); +#endif + + srandom(time(0)); + + JSC::initializeThreading(); + WTF::initializeMainThread(); + RunLoop::initializeMainRunLoop(); + + // Create the connection. + QString identifier(app->arguments().size() > 1 ? app->arguments().at(1) : ""); + WebKit::WebProcess::shared().initialize(identifier, RunLoop::main()); + + RunLoop::run(); + + // FIXME: Do more cleanup here. + + return 0; +} + +} diff --git a/WebKit2/qt/MainQt.cpp b/WebKit2/qt/MainQt.cpp new file mode 100644 index 0000000..d42ef05 --- /dev/null +++ b/WebKit2/qt/MainQt.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 University of Szeged + * + * 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 + +#if !defined(QWEBKIT_EXPORT) +#if defined(QT_SHARED) +#define QWEBKIT_EXPORT Q_DECL_EXPORT +#else +#define QWEBKIT_EXPORT +#endif +#endif + +namespace WebKit { +QWEBKIT_EXPORT int WebProcessMainQt(int argc, char** argv); +} + +// The framework entry point. +// We call our platform specific entry point directly rather than WebKitMain because it makes little sense +// to reimplement the handling of command line arguments from QApplication. +int main(int argc, char** argv) +{ + return WebKit::WebProcessMainQt(argc, argv); +} -- 1.8.3.1