Title: [154270] trunk/Source/WebCore
- Revision
- 154270
- Author
- [email protected]
- Date
- 2013-08-19 03:19:14 -0700 (Mon, 19 Aug 2013)
Log Message
[Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
https://bugs.webkit.org/show_bug.cgi?id=28113
Reviewed by Jocelyn Turcotte.
StylePainter::init() was called twice making it clobber the previous antialiasing setting.
This patch cleans up the construction so we only have one constructor with init inlined.
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::StylePainterQStyle::StylePainterQStyle):
(WebCore::StylePainterQStyle::setupStyleOption):
* platform/qt/RenderThemeQStyle.h:
* platform/qt/RenderThemeQt.cpp:
(WebCore::StylePainter::StylePainter):
* platform/qt/RenderThemeQt.h:
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::StylePainterMobile::StylePainterMobile):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (154269 => 154270)
--- trunk/Source/WebCore/ChangeLog 2013-08-19 09:56:16 UTC (rev 154269)
+++ trunk/Source/WebCore/ChangeLog 2013-08-19 10:19:14 UTC (rev 154270)
@@ -1,3 +1,24 @@
+2013-08-19 Allan Sandfeld Jensen <[email protected]>
+
+ [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
+ https://bugs.webkit.org/show_bug.cgi?id=28113
+
+ Reviewed by Jocelyn Turcotte.
+
+ StylePainter::init() was called twice making it clobber the previous antialiasing setting.
+
+ This patch cleans up the construction so we only have one constructor with init inlined.
+
+ * platform/qt/RenderThemeQStyle.cpp:
+ (WebCore::StylePainterQStyle::StylePainterQStyle):
+ (WebCore::StylePainterQStyle::setupStyleOption):
+ * platform/qt/RenderThemeQStyle.h:
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::StylePainter::StylePainter):
+ * platform/qt/RenderThemeQt.h:
+ * platform/qt/RenderThemeQtMobile.cpp:
+ (WebCore::StylePainterMobile::StylePainterMobile):
+
2013-08-19 Julien Brianceau <[email protected]>
<https://webkit.org/b/119998> [Qt] Build fix (broken since r154257).
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp (154269 => 154270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp 2013-08-19 09:56:16 UTC (rev 154269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp 2013-08-19 10:19:14 UTC (rev 154270)
@@ -68,33 +68,30 @@
}
StylePainterQStyle::StylePainterQStyle(RenderThemeQStyle* theme, const PaintInfo& paintInfo, RenderObject* renderObject)
- : StylePainter(theme, paintInfo)
+ : StylePainter(paintInfo.context)
, qStyle(theme->qStyle())
, appearance(NoControlPart)
{
- init(paintInfo.context ? paintInfo.context : 0);
+ setupStyleOption();
if (renderObject)
appearance = theme->initializeCommonQStyleOptions(styleOption, renderObject);
}
StylePainterQStyle::StylePainterQStyle(ScrollbarThemeQStyle* theme, GraphicsContext* context)
- : StylePainter()
+ : StylePainter(context)
, qStyle(theme->qStyle())
, appearance(NoControlPart)
{
- init(context);
+ setupStyleOption();
}
-void StylePainterQStyle::init(GraphicsContext* context)
+void StylePainterQStyle::setupStyleOption()
{
- painter = static_cast<QPainter*>(context->platformContext());
if (QObject* widget = qStyle->widgetForPainter(painter)) {
styleOption.palette = widget->property("palette").value<QPalette>();
styleOption.rect = widget->property("rect").value<QRect>();
styleOption.direction = static_cast<Qt::LayoutDirection>(widget->property("layoutDirection").toInt());
}
-
- StylePainter::init(context);
}
PassRefPtr<RenderTheme> RenderThemeQStyle::create(Page* page)
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h (154269 => 154270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h 2013-08-19 09:56:16 UTC (rev 154269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h 2013-08-19 10:19:14 UTC (rev 154270)
@@ -148,7 +148,7 @@
{ qStyle->paintScrollBar(painter, styleOption); }
private:
- void init(GraphicsContext*);
+ void setupStyleOption();
Q_DISABLE_COPY(StylePainterQStyle)
};
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (154269 => 154270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp 2013-08-19 09:56:16 UTC (rev 154269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp 2013-08-19 10:19:14 UTC (rev 154270)
@@ -873,23 +873,11 @@
return string;
}
-StylePainter::StylePainter(RenderThemeQt* theme, const PaintInfo& paintInfo)
- : painter(0)
+StylePainter::StylePainter(GraphicsContext* context)
+ : painter(context->platformContext())
{
- Q_UNUSED(theme);
- ASSERT(paintInfo.context);
- init(paintInfo.context);
-}
+ ASSERT(context);
-StylePainter::StylePainter()
- : painter(0)
-{
-}
-
-void StylePainter::init(GraphicsContext* context)
-{
- painter = static_cast<QPainter*>(context->platformContext());
-
if (painter) {
// the styles often assume being called with a pristine painter where no brush is set,
// so reset it manually
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.h (154269 => 154270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQt.h 2013-08-19 09:56:16 UTC (rev 154269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.h 2013-08-19 10:19:14 UTC (rev 154270)
@@ -190,9 +190,7 @@
QPainter* painter;
protected:
- StylePainter(RenderThemeQt*, const PaintInfo&);
- StylePainter();
- void init(GraphicsContext*);
+ StylePainter(GraphicsContext*);
private:
QBrush m_previousBrush;
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp (154269 => 154270)
--- trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp 2013-08-19 09:56:16 UTC (rev 154269)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp 2013-08-19 10:19:14 UTC (rev 154270)
@@ -209,7 +209,7 @@
}
StylePainterMobile::StylePainterMobile(RenderThemeQtMobile* theme, const PaintInfo& paintInfo)
- : StylePainter(theme, paintInfo)
+ : StylePainter(paintInfo.context)
{
m_previousSmoothPixmapTransform = painter->testRenderHint(QPainter::SmoothPixmapTransform);
if (!m_previousSmoothPixmapTransform)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes