2010-07-23 Balazs Kelemen <kb@inf.u-szeged.hu>
authorabecsi@webkit.org <abecsi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jul 2010 13:39:33 +0000 (13:39 +0000)
committerabecsi@webkit.org <abecsi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jul 2010 13:39:33 +0000 (13:39 +0000)
        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  <kb@inf.u-szeged.hu>

        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 <kb@inf.u-szeged.hu>

        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
WebCore/ChangeLog
WebCore/WebCore.pro
WebKit.pro
WebKit2/ChangeLog
WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
WebKit2/WebKit2.pro [new file with mode: 0644]
WebKit2/WebProcess/qt/WebProcessMainQt.cpp [new file with mode: 0644]
WebKit2/qt/MainQt.cpp [new file with mode: 0644]

index f1aec58a59606b777d99c65e11b283f8607c9198..ab52b0f6d7c6991970e4355517ea3b996f64820e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-23  Balazs Kelemen  <kb@inf.u-szeged.hu>
+
+        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  <antognolli@profusion.mobi>
 
         Reviewed by Antonio Gomes.
index e3569ee233bccfab6fd7776f75ce07f07e58bfef..9b568b5b96c11186e50d1004ae758caab11bcfb9 100644 (file)
@@ -1,3 +1,13 @@
+2010-07-23  Balazs Kelemen  <kb@inf.u-szeged.hu>
+
+        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  <pfeldman@chromium.org>
 
         Not reviewed: Chromium tests fix.
index 66fa5caef511d42018f5dbe3cf5bfedf95575fc6..83e74e06b3f2fb47f9bf48b0490208c6a36863e1 100644 (file)
@@ -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
 
 }
 
index d8c1bc5970c79e4f5c8509bf6e9b84855d2c9300..43b0e3b6080825cf84bb0dc4b3dfbcaaf99fe0dd 100644 (file)
@@ -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
index 0558592f0e2f038dafb5e5c17f11354750ef812f..827be1c45efd74284e8fb7f74e0f8ecb771dd0cc 100644 (file)
@@ -1,3 +1,19 @@
+2010-07-19 Balazs Kelemen <kb@inf.u-szeged.hu>
+
+        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  <darin@apple.com>
 
         Reviewed by Sam Weinig.
index efa6cee00f8893eee748bd40f2b97d249fbccfe8..5be4419de615e780cd1d0e3e96d13f5b29cd4277 100644 (file)
 #include <wtf/PassRefPtr.h>
 #include <wtf/Threading.h>
 
-#if USE(MEEGOTOUCH)
-#include <meegotouch/MComponentData>
-#endif
-
 #include <QApplication>
 #include <QDebug>
 #include <QLocalServer>
 #include <sys/resource.h>
 #include <unistd.h>
 
-#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 (file)
index 0000000..7494398
--- /dev/null
@@ -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 (file)
index 0000000..f48cff7
--- /dev/null
@@ -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 <runtime/InitializeThreading.h>
+#include "WebProcess.h"
+#include <wtf/Threading.h>
+
+#include <QApplication>
+#include <QString>
+#include <QStringList>
+#include <QtGlobal>
+
+#if USE(MEEGOTOUCH)
+#include <meegotouch/MComponentData>
+#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 (file)
index 0000000..d42ef05
--- /dev/null
@@ -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 <QtGlobal>
+
+#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);
+}