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> 2010-05-04 Joseph Pecoraro <joepeck@webkit.org>
   
Reviewed by Dan Bernstein. Reviewed by Dan Bernstein.
...@@ -123,6 +123,10 @@ maemo5|symbian|embedded { ...@@ -123,6 +123,10 @@ maemo5|symbian|embedded {
} }
maemo5 { maemo5 {
DEFINES += WTF_USE_QT_MOBILE_THEME=1
}
contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
DEFINES += ENABLE_NO_LISTBOX_RENDERING=1 DEFINES += ENABLE_NO_LISTBOX_RENDERING=1
} }
...@@ -2149,13 +2153,15 @@ SOURCES += \ ...@@ -2149,13 +2153,15 @@ SOURCES += \
../WebKit/qt/Api/qwebinspector.cpp \ ../WebKit/qt/Api/qwebinspector.cpp \
../WebKit/qt/Api/qwebkitversion.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 { maemo5 {
HEADERS += \ HEADERS += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h \ SOURCES += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
platform/qt/Maemo5Webstyle.h
SOURCES += \
../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp \
platform/qt/Maemo5Webstyle.cpp
} }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "HTMLInputElement.h" #include "HTMLInputElement.h"
#include "HTMLMediaElement.h" #include "HTMLMediaElement.h"
#include "HTMLNames.h" #include "HTMLNames.h"
#ifdef Q_WS_MAEMO_5 #if USE(QT_MOBILE_THEME)
#include "Maemo5Webstyle.h" #include "Maemo5Webstyle.h"
#endif #endif
#include "NotImplemented.h" #include "NotImplemented.h"
...@@ -153,7 +153,7 @@ RenderThemeQt::RenderThemeQt(Page* page) ...@@ -153,7 +153,7 @@ RenderThemeQt::RenderThemeQt(Page* page)
m_buttonFontPixelSize = fontInfo.pixelSize(); m_buttonFontPixelSize = fontInfo.pixelSize();
#endif #endif
#ifdef Q_WS_MAEMO_5 #if USE(QT_MOBILE_THEME)
m_fallbackStyle = new Maemo5WebStyle; m_fallbackStyle = new Maemo5WebStyle;
#else #else
m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
...@@ -168,7 +168,7 @@ RenderThemeQt::~RenderThemeQt() ...@@ -168,7 +168,7 @@ RenderThemeQt::~RenderThemeQt()
#endif #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 bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& fill, const Color& backgroundColor) const
{ {
switch (style->appearance()) { switch (style->appearance()) {
...@@ -200,7 +200,7 @@ QStyle* RenderThemeQt::fallbackStyle() const ...@@ -200,7 +200,7 @@ QStyle* RenderThemeQt::fallbackStyle() const
QStyle* RenderThemeQt::qStyle() const QStyle* RenderThemeQt::qStyle() const
{ {
#ifdef Q_WS_MAEMO_5 #if USE(QT_MOBILE_THEME)
return fallbackStyle(); return fallbackStyle();
#endif #endif
...@@ -220,7 +220,7 @@ String RenderThemeQt::extraDefaultStyleSheet() ...@@ -220,7 +220,7 @@ String RenderThemeQt::extraDefaultStyleSheet()
#if ENABLE(NO_LISTBOX_RENDERING) #if ENABLE(NO_LISTBOX_RENDERING)
result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet)); result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet));
#endif #endif
#ifdef Q_WS_MAEMO_5 #if USE(QT_MOBILE_THEME)
result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet)); result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet));
#endif #endif
return result; return result;
...@@ -656,7 +656,9 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo ...@@ -656,7 +656,9 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const 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 // 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 // see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius(); style->resetBorderRadius();
...@@ -906,7 +908,7 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const ...@@ -906,7 +908,7 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const
void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
{ {
#ifdef Q_WS_MAEMO_5 #if USE(QT_MOBILE_THEME)
static QPalette lightGrayPalette(Qt::lightGray); static QPalette lightGrayPalette(Qt::lightGray);
palette = lightGrayPalette; palette = lightGrayPalette;
return; return;
......
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
virtual double caretBlinkInterval() const; 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 bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const;
virtual int popupInternalPaddingBottom(RenderStyle*) const; virtual int popupInternalPaddingBottom(RenderStyle*) const;
#endif #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