[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
hausmann at webkit.org
hausmann at webkit.org
Thu Feb 4 21:27:16 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit c59a93ffdb03cac63964b641925560245541c00b
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 25 14:20:56 2010 +0000
[Qt] Clean up code to determine palette from page client in RenderThemeQt
https://bugs.webkit.org/show_bug.cgi?id=34052
Patch by Simon Hausmann <hausmann at webkit.org> on 2010-01-25
Reviewed by Kenneth Christiansen.
Use the RenderTheme's associated page instead of going through the
render tree and the document.
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
(WebCore::RenderThemeQt::initializeCommonQStyleOptions):
* platform/qt/RenderThemeQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ee5bc35..9b5a05a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-25 Simon Hausmann <hausmann at webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Clean up code to determine palette from page client in RenderThemeQt
+ https://bugs.webkit.org/show_bug.cgi?id=34052
+
+ Use the RenderTheme's associated page instead of going through the
+ render tree and the document.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
+ (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
+ * platform/qt/RenderThemeQt.h:
+
2010-01-25 Janne Koskinen <janne.p.koskinen at digia.com>
Reviewed by Simon Hausmann.
diff --git a/WebCore/platform/qt/RenderThemeQt.cpp b/WebCore/platform/qt/RenderThemeQt.cpp
index e1a957d..0cc8d7c 100644
--- a/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/WebCore/platform/qt/RenderThemeQt.cpp
@@ -768,13 +768,12 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const
}
}
-static inline void setPaletteFromPageClientIfExists(QPalette &palette, const RenderObject *o)
+void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
{
// If the webview has a custom palette, use it
- Page* page = o->document()->page();
- if (!page)
+ if (!m_page)
return;
- Chrome* chrome = page->chrome();
+ Chrome* chrome = m_page->chrome();
if (!chrome)
return;
ChromeClient* chromeClient = chrome->client();
@@ -803,7 +802,7 @@ ControlPart RenderThemeQt::initializeCommonQStyleOptions(QStyleOption& option, R
if (isHovered(o))
option.state |= QStyle::State_MouseOver;
- setPaletteFromPageClientIfExists(option.palette, o);
+ setPaletteFromPageClientIfExists(option.palette);
RenderStyle* style = o->style();
if (!style)
return NoControlPart;
diff --git a/WebCore/platform/qt/RenderThemeQt.h b/WebCore/platform/qt/RenderThemeQt.h
index ee854a4..be277fa 100644
--- a/WebCore/platform/qt/RenderThemeQt.h
+++ b/WebCore/platform/qt/RenderThemeQt.h
@@ -140,6 +140,8 @@ private:
void setButtonPadding(RenderStyle*) const;
void setPopupPadding(RenderStyle*) const;
+ void setPaletteFromPageClientIfExists(QPalette&) const;
+
QStyle* qStyle() const;
QStyle* fallbackStyle();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list