Title: [109669] trunk
Revision
109669
Author
[email protected]
Date
2012-03-03 19:08:45 -0800 (Sat, 03 Mar 2012)

Log Message

[Qt] Fix static_libs_as_shared build
https://bugs.webkit.org/show_bug.cgi?id=80214

Patch by Simon Hausmann <[email protected]> on 2012-03-03
Reviewed by Tor Arne Vestbø.

Source/WebKit/qt:

Add helper function to be called by WebProcess main
to potentially initialize the QStyle theme.

* WebCoreSupport/InitWebCoreQt.cpp:
(WebKit):
(WebKit::initializeWebKit2Theme):

Source/WebKit2:

Replace (static) link time dependency to WK1 with entrypoint
in the separate WebProcess for activating the QStyle theme if
necessary.

* Target.pri:
* UIProcess/Launcher/ProcessLauncher.h:
* WebProcess/qt/WebProcessMainQt.cpp:
(WebKit::WebProcessMainQt):
* qt/MainQt.cpp:
(WebKit):
(main):

Tools:

* WebKitTestRunner/qt/main.cpp:
(main): Set the correct environment variable for choosing the theme in the
web process.

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (109668 => 109669)


--- trunk/Source/WebKit/qt/ChangeLog	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-03-04 03:08:45 UTC (rev 109669)
@@ -1,3 +1,17 @@
+2012-03-03  Simon Hausmann  <[email protected]>
+
+        [Qt] Fix static_libs_as_shared build
+        https://bugs.webkit.org/show_bug.cgi?id=80214
+
+        Reviewed by Tor Arne Vestbø.
+
+        Add helper function to be called by WebProcess main
+        to potentially initialize the QStyle theme.
+
+        * WebCoreSupport/InitWebCoreQt.cpp:
+        (WebKit):
+        (WebKit::initializeWebKit2Theme):
+
 2012-03-02  Casper van Donderen  <[email protected]>
 
         [Qt] Documentation cleanup

Modified: trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp (109668 => 109669)


--- trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp	2012-03-04 03:08:45 UTC (rev 109669)
@@ -48,6 +48,17 @@
 #include <runtime/InitializeThreading.h>
 #include <wtf/MainThread.h>
 
+namespace WebKit {
+
+// Called also from WebKit2's WebProcess.
+Q_DECL_EXPORT void initializeWebKit2Theme()
+{
+    if (qgetenv("QT_WEBKIT_THEME_NAME") == "qstyle")
+        WebCore::RenderThemeQt::setCustomTheme(WebCore::RenderThemeQStyle::create, new WebCore::ScrollbarThemeQStyle);
+}
+
+}
+
 namespace WebCore {
 
 void initializeWebCoreQt()

Modified: trunk/Source/WebKit2/ChangeLog (109668 => 109669)


--- trunk/Source/WebKit2/ChangeLog	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-04 03:08:45 UTC (rev 109669)
@@ -1,3 +1,22 @@
+2012-03-03  Simon Hausmann  <[email protected]>
+
+        [Qt] Fix static_libs_as_shared build
+        https://bugs.webkit.org/show_bug.cgi?id=80214
+
+        Reviewed by Tor Arne Vestbø.
+
+        Replace (static) link time dependency to WK1 with entrypoint
+        in the separate WebProcess for activating the QStyle theme if
+        necessary.
+
+        * Target.pri:
+        * UIProcess/Launcher/ProcessLauncher.h:
+        * WebProcess/qt/WebProcessMainQt.cpp:
+        (WebKit::WebProcessMainQt):
+        * qt/MainQt.cpp:
+        (WebKit):
+        (main):
+
 2012-03-03  Hans Wennborg  <[email protected]>
 
         Implement Speech _javascript_ API

Modified: trunk/Source/WebKit2/Target.pri (109668 => 109669)


--- trunk/Source/WebKit2/Target.pri	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit2/Target.pri	2012-03-04 03:08:45 UTC (rev 109669)
@@ -725,8 +725,6 @@
     WebProcess/qt/WebProcessMainQt.cpp \
     WebProcess/qt/WebProcessQt.cpp
 
-INCLUDEPATH += ../WebKit/qt/WebCoreSupport
-
 mac: {
     INCLUDEPATH += \
         Platform/mac \

Modified: trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h (109668 => 109669)


--- trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h	2012-03-04 03:08:45 UTC (rev 109669)
@@ -31,10 +31,6 @@
 #include <wtf/RefPtr.h>
 #include <wtf/Threading.h>
 
-#if PLATFORM(QT)
-class QLocalSocket;
-#endif
-
 namespace WebKit {
 
 class ProcessLauncher : public ThreadSafeRefCounted<ProcessLauncher> {

Modified: trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp (109668 => 109669)


--- trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp	2012-03-04 03:08:45 UTC (rev 109669)
@@ -43,9 +43,6 @@
 #include "WebGraphicsLayer.h"
 #endif
 
-#include "RenderThemeQStyle.h"
-#include "ScrollbarThemeQStyle.h"
-
 #ifndef NDEBUG
 #if !OS(WINDOWS)
 #include <unistd.h>
@@ -206,8 +203,6 @@
 #if USE(ACCELERATED_COMPOSITING)
     WebGraphicsLayer::initFactory();
 #endif
-    if (!qgetenv("QT_WEBKIT_USE_QSTYLE_THEME").isEmpty())
-        RenderThemeQt::setCustomTheme(RenderThemeQStyle::create, new ScrollbarThemeQStyle);
 
     WebKit::WebProcess::shared().initialize(identifier, RunLoop::main());
 

Modified: trunk/Source/WebKit2/qt/MainQt.cpp (109668 => 109669)


--- trunk/Source/WebKit2/qt/MainQt.cpp	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Source/WebKit2/qt/MainQt.cpp	2012-03-04 03:08:45 UTC (rev 109669)
@@ -28,6 +28,7 @@
 
 namespace WebKit {
 Q_DECL_IMPORT int WebProcessMainQt(int argc, char** argv);
+Q_DECL_IMPORT void initializeWebKit2Theme();
 }
 
 // The framework entry point.
@@ -35,5 +36,6 @@
 // to reimplement the handling of command line arguments from QApplication.
 int main(int argc, char** argv)
 {
+    WebKit::initializeWebKit2Theme();
     return WebKit::WebProcessMainQt(argc, argv);
 }

Modified: trunk/Tools/ChangeLog (109668 => 109669)


--- trunk/Tools/ChangeLog	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Tools/ChangeLog	2012-03-04 03:08:45 UTC (rev 109669)
@@ -1,3 +1,14 @@
+2012-03-03  Simon Hausmann  <[email protected]>
+
+        [Qt] Fix static_libs_as_shared build
+        https://bugs.webkit.org/show_bug.cgi?id=80214
+
+        Reviewed by Tor Arne Vestbø.
+
+        * WebKitTestRunner/qt/main.cpp:
+        (main): Set the correct environment variable for choosing the theme in the
+        web process.
+
 2012-03-03  Hans Wennborg  <[email protected]>
 
         Implement Speech _javascript_ API

Modified: trunk/Tools/WebKitTestRunner/qt/main.cpp (109668 => 109669)


--- trunk/Tools/WebKitTestRunner/qt/main.cpp	2012-03-04 03:04:59 UTC (rev 109668)
+++ trunk/Tools/WebKitTestRunner/qt/main.cpp	2012-03-04 03:08:45 UTC (rev 109669)
@@ -92,7 +92,7 @@
             qputenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT", "1");
     }
 
-    qputenv("QT_WEBKIT_USE_QSTYLE_THEME", "1");
+    qputenv("QT_WEBKIT_THEME_NAME", "qstyle");
 
     QQuickWebViewExperimental::setFlickableViewportEnabled(false);
     QApplication app(argc, argv);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to