[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:35:54 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit ce47e92a1129e5a915a45bf910c6179f07627f7f
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 2 01:16:48 2010 +0000
2010-02-01 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] Use the fallback style on Maemo 5
https://bugs.webkit.org/show_bug.cgi?id=34376
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::RenderThemeQt):
(WebCore::RenderThemeQt::fallbackStyle):
(WebCore::RenderThemeQt::qStyle):
(WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
* platform/qt/RenderThemeQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3b715d8..9662be7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-01 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the fallback style on Maemo 5
+
+ https://bugs.webkit.org/show_bug.cgi?id=34376
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::RenderThemeQt):
+ (WebCore::RenderThemeQt::fallbackStyle):
+ (WebCore::RenderThemeQt::qStyle):
+ (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
+ * platform/qt/RenderThemeQt.h:
+
2010-02-01 Kavita Kanetkar <kkanetkar at chromium.org>
Reviewed by Nate Chapin.
diff --git a/WebCore/platform/qt/RenderThemeQt.cpp b/WebCore/platform/qt/RenderThemeQt.cpp
index 83e3746..271c11a 100644
--- a/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/WebCore/platform/qt/RenderThemeQt.cpp
@@ -129,7 +129,6 @@ PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
RenderThemeQt::RenderThemeQt(Page* page)
: RenderTheme()
, m_page(page)
- , m_fallbackStyle(0)
{
QPushButton button;
button.setAttribute(Qt::WA_MacSmallSize);
@@ -139,6 +138,8 @@ RenderThemeQt::RenderThemeQt(Page* page)
#ifdef Q_WS_MAC
m_buttonFontPixelSize = fontInfo.pixelSize();
#endif
+
+ m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
}
RenderThemeQt::~RenderThemeQt()
@@ -147,19 +148,17 @@ RenderThemeQt::~RenderThemeQt()
}
// for some widget painting, we need to fallback to Windows style
-QStyle* RenderThemeQt::fallbackStyle()
+QStyle* RenderThemeQt::fallbackStyle() const
{
- if (!m_fallbackStyle)
- m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
-
- if (!m_fallbackStyle)
- m_fallbackStyle = QApplication::style();
-
- return m_fallbackStyle;
+ return (m_fallbackStyle) ? m_fallbackStyle : QApplication::style();
}
QStyle* RenderThemeQt::qStyle() const
{
+#ifdef Q_WS_MAEMO_5
+ return fallbackStyle();
+#endif
+
if (m_page) {
QWebPageClient* pageClient = m_page->chrome()->client()->platformPageClient();
@@ -773,6 +772,11 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const
void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
{
+#ifdef Q_WS_MAEMO_5
+ static QPalette lightGrayPalette(Qt::lightGray);
+ palette = lightGrayPalette;
+ return;
+#endif
// If the webview has a custom palette, use it
if (!m_page)
return;
diff --git a/WebCore/platform/qt/RenderThemeQt.h b/WebCore/platform/qt/RenderThemeQt.h
index e6bab7e..5385881 100644
--- a/WebCore/platform/qt/RenderThemeQt.h
+++ b/WebCore/platform/qt/RenderThemeQt.h
@@ -145,7 +145,7 @@ private:
void setPaletteFromPageClientIfExists(QPalette&) const;
- QStyle* fallbackStyle();
+ QStyle* fallbackStyle() const;
Page* m_page;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list