Changeset 109669 in webkit


Ignore:
Timestamp:
Mar 3, 2012 7:08:45 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Simon Hausmann <simon.hausmann@nokia.com> 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.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/ChangeLog

    r109572 r109669  
     12012-03-03  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        [Qt] Fix static_libs_as_shared build
     4        https://bugs.webkit.org/show_bug.cgi?id=80214
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        Add helper function to be called by WebProcess main
     9        to potentially initialize the QStyle theme.
     10
     11        * WebCoreSupport/InitWebCoreQt.cpp:
     12        (WebKit):
     13        (WebKit::initializeWebKit2Theme):
     14
    1152012-03-02  Casper van Donderen  <casper.vandonderen@nokia.com>
    216
  • trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp

    r109542 r109669  
    4949#include <wtf/MainThread.h>
    5050
     51namespace WebKit {
     52
     53// Called also from WebKit2's WebProcess.
     54Q_DECL_EXPORT void initializeWebKit2Theme()
     55{
     56    if (qgetenv("QT_WEBKIT_THEME_NAME") == "qstyle")
     57        WebCore::RenderThemeQt::setCustomTheme(WebCore::RenderThemeQStyle::create, new WebCore::ScrollbarThemeQStyle);
     58}
     59
     60}
     61
    5162namespace WebCore {
    5263
  • trunk/Source/WebKit2/ChangeLog

    r109667 r109669  
     12012-03-03  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        [Qt] Fix static_libs_as_shared build
     4        https://bugs.webkit.org/show_bug.cgi?id=80214
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        Replace (static) link time dependency to WK1 with entrypoint
     9        in the separate WebProcess for activating the QStyle theme if
     10        necessary.
     11
     12        * Target.pri:
     13        * UIProcess/Launcher/ProcessLauncher.h:
     14        * WebProcess/qt/WebProcessMainQt.cpp:
     15        (WebKit::WebProcessMainQt):
     16        * qt/MainQt.cpp:
     17        (WebKit):
     18        (main):
     19
    1202012-03-03  Hans Wennborg  <hans@chromium.org>
    221
  • trunk/Source/WebKit2/Target.pri

    r109555 r109669  
    726726    WebProcess/qt/WebProcessQt.cpp
    727727
    728 INCLUDEPATH += ../WebKit/qt/WebCoreSupport
    729 
    730728mac: {
    731729    INCLUDEPATH += \
  • trunk/Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h

    r95901 r109669  
    3131#include <wtf/RefPtr.h>
    3232#include <wtf/Threading.h>
    33 
    34 #if PLATFORM(QT)
    35 class QLocalSocket;
    36 #endif
    3733
    3834namespace WebKit {
  • trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp

    r109555 r109669  
    4444#endif
    4545
    46 #include "RenderThemeQStyle.h"
    47 #include "ScrollbarThemeQStyle.h"
    48 
    4946#ifndef NDEBUG
    5047#if !OS(WINDOWS)
     
    207204    WebGraphicsLayer::initFactory();
    208205#endif
    209     if (!qgetenv("QT_WEBKIT_USE_QSTYLE_THEME").isEmpty())
    210         RenderThemeQt::setCustomTheme(RenderThemeQStyle::create, new ScrollbarThemeQStyle);
    211206
    212207    WebKit::WebProcess::shared().initialize(identifier, RunLoop::main());
  • trunk/Source/WebKit2/qt/MainQt.cpp

    r95901 r109669  
    2929namespace WebKit {
    3030Q_DECL_IMPORT int WebProcessMainQt(int argc, char** argv);
     31Q_DECL_IMPORT void initializeWebKit2Theme();
    3132}
    3233
     
    3637int main(int argc, char** argv)
    3738{
     39    WebKit::initializeWebKit2Theme();
    3840    return WebKit::WebProcessMainQt(argc, argv);
    3941}
  • trunk/Tools/ChangeLog

    r109667 r109669  
     12012-03-03  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        [Qt] Fix static_libs_as_shared build
     4        https://bugs.webkit.org/show_bug.cgi?id=80214
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        * WebKitTestRunner/qt/main.cpp:
     9        (main): Set the correct environment variable for choosing the theme in the
     10        web process.
     11
    1122012-03-03  Hans Wennborg  <hans@chromium.org>
    213
  • trunk/Tools/WebKitTestRunner/qt/main.cpp

    r109555 r109669  
    9393    }
    9494
    95     qputenv("QT_WEBKIT_USE_QSTYLE_THEME", "1");
     95    qputenv("QT_WEBKIT_THEME_NAME", "qstyle");
    9696
    9797    QQuickWebViewExperimental::setFlickableViewportEnabled(false);
Note: See TracChangeset for help on using the changeset viewer.