Changeset 58788 in webkit


Ignore:
Timestamp:
May 4, 2010 5:16:27 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-05-04 Luiz Agostini <luiz.agostini@openbossa.org>

Reviewed by Simon Hausmann.

[Qt] QT_MOBILE_THEME compile time flag
https://bugs.webkit.org/show_bug.cgi?id=38439

Replacing preprocessor conditional used in RenderThemeQt from Q_WS_MAEMO_5 to
USE(QT_MOBILE_THEME).

  • WebCore.pro:
  • platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::RenderThemeQt): (WebCore::RenderThemeQt::qStyle): (WebCore::RenderThemeQt::extraDefaultStyleSheet): (WebCore::RenderThemeQt::adjustMenuListButtonStyle): (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
  • platform/qt/RenderThemeQt.h:
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r58786 r58788  
     12010-05-04  Luiz Agostini  <luiz.agostini@openbossa.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] QT_MOBILE_THEME compile time flag
     6        https://bugs.webkit.org/show_bug.cgi?id=38439
     7
     8        Replacing preprocessor conditional used in RenderThemeQt from Q_WS_MAEMO_5 to
     9        USE(QT_MOBILE_THEME).
     10
     11        * WebCore.pro:
     12        * platform/qt/RenderThemeQt.cpp:
     13        (WebCore::RenderThemeQt::RenderThemeQt):
     14        (WebCore::RenderThemeQt::qStyle):
     15        (WebCore::RenderThemeQt::extraDefaultStyleSheet):
     16        (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
     17        (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
     18        * platform/qt/RenderThemeQt.h:
     19
    1202010-05-04  Joseph Pecoraro  <joepeck@webkit.org>
    221
  • trunk/WebCore/WebCore.pro

    r58751 r58788  
    124124
    125125maemo5 {
     126    DEFINES += WTF_USE_QT_MOBILE_THEME=1
     127}
     128
     129contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
    126130    DEFINES += ENABLE_NO_LISTBOX_RENDERING=1
    127131}
     
    21502154    ../WebKit/qt/Api/qwebkitversion.cpp
    21512155
     2156
     2157contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
     2158    HEADERS += platform/qt/Maemo5Webstyle.h
     2159    SOURCES += platform/qt/Maemo5Webstyle.cpp
     2160}
     2161
    21522162maemo5 {
    2153     HEADERS += \
    2154         ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h \
    2155         platform/qt/Maemo5Webstyle.h
    2156     SOURCES += \
    2157         ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp \
    2158         platform/qt/Maemo5Webstyle.cpp
     2163    HEADERS += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
     2164    SOURCES += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
    21592165}
    21602166
  • trunk/WebCore/platform/qt/RenderThemeQt.cpp

    r58672 r58788  
    4343#include "HTMLMediaElement.h"
    4444#include "HTMLNames.h"
    45 #ifdef Q_WS_MAEMO_5
     45#if USE(QT_MOBILE_THEME)
    4646#include "Maemo5Webstyle.h"
    4747#endif
     
    154154#endif
    155155
    156 #ifdef Q_WS_MAEMO_5
     156#if USE(QT_MOBILE_THEME)
    157157    m_fallbackStyle = new Maemo5WebStyle;
    158158#else
     
    169169}
    170170
    171 #ifdef Q_WS_MAEMO_5
     171#if USE(QT_MOBILE_THEME)
    172172bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& fill, const Color& backgroundColor) const
    173173{
     
    201201QStyle* RenderThemeQt::qStyle() const
    202202{
    203 #ifdef Q_WS_MAEMO_5
     203#if USE(QT_MOBILE_THEME)
    204204    return fallbackStyle();
    205205#endif
     
    221221    result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet));
    222222#endif
    223 #ifdef Q_WS_MAEMO_5
     223#if USE(QT_MOBILE_THEME)
    224224    result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet));
    225225#endif
     
    657657void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
    658658{
    659 #ifndef Q_WS_MAEMO_5
     659#if USE(QT_MOBILE_THEME)
     660    // Mobile theme uses border radius.
     661#else
    660662    // WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
    661663    // see also http://bugs.webkit.org/show_bug.cgi?id=18399
     
    907909void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
    908910{
    909 #ifdef Q_WS_MAEMO_5
     911#if USE(QT_MOBILE_THEME)
    910912    static QPalette lightGrayPalette(Qt::lightGray);
    911913    palette = lightGrayPalette;
  • trunk/WebCore/platform/qt/RenderThemeQt.h

    r56860 r58788  
    7979    virtual double caretBlinkInterval() const;
    8080
    81 #ifdef Q_WS_MAEMO_5
     81#if USE(QT_MOBILE_THEME)
    8282    virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const;
    8383    virtual int popupInternalPaddingBottom(RenderStyle*) const;
Note: See TracChangeset for help on using the changeset viewer.