Commit 0fddaca1 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

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:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 769a08cf
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:
2010-05-04 Joseph Pecoraro <joepeck@webkit.org>
 
Reviewed by Dan Bernstein.
......@@ -123,6 +123,10 @@ maemo5|symbian|embedded {
}
maemo5 {
DEFINES += WTF_USE_QT_MOBILE_THEME=1
}
contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
DEFINES += ENABLE_NO_LISTBOX_RENDERING=1
}
......@@ -2149,13 +2153,15 @@ SOURCES += \
../WebKit/qt/Api/qwebinspector.cpp \
../WebKit/qt/Api/qwebkitversion.cpp
contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
HEADERS += platform/qt/Maemo5Webstyle.h
SOURCES += platform/qt/Maemo5Webstyle.cpp
}
maemo5 {
HEADERS += \
../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h \
platform/qt/Maemo5Webstyle.h
SOURCES += \
../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp \
platform/qt/Maemo5Webstyle.cpp
HEADERS += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
SOURCES += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
}
......
......@@ -42,7 +42,7 @@
#include "HTMLInputElement.h"
#include "HTMLMediaElement.h"
#include "HTMLNames.h"
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
#include "Maemo5Webstyle.h"
#endif
#include "NotImplemented.h"
......@@ -153,7 +153,7 @@ RenderThemeQt::RenderThemeQt(Page* page)
m_buttonFontPixelSize = fontInfo.pixelSize();
#endif
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
m_fallbackStyle = new Maemo5WebStyle;
#else
m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
......@@ -168,7 +168,7 @@ RenderThemeQt::~RenderThemeQt()
#endif
}
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& fill, const Color& backgroundColor) const
{
switch (style->appearance()) {
......@@ -200,7 +200,7 @@ QStyle* RenderThemeQt::fallbackStyle() const
QStyle* RenderThemeQt::qStyle() const
{
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
return fallbackStyle();
#endif
......@@ -220,7 +220,7 @@ String RenderThemeQt::extraDefaultStyleSheet()
#if ENABLE(NO_LISTBOX_RENDERING)
result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet));
#endif
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet));
#endif
return result;
......@@ -656,7 +656,9 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
#ifndef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
// Mobile theme uses border radius.
#else
// WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius();
......@@ -906,7 +908,7 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const
void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
{
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
static QPalette lightGrayPalette(Qt::lightGray);
palette = lightGrayPalette;
return;
......
......@@ -78,7 +78,7 @@ public:
virtual double caretBlinkInterval() const;
#ifdef Q_WS_MAEMO_5
#if USE(QT_MOBILE_THEME)
virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const;
virtual int popupInternalPaddingBottom(RenderStyle*) const;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment