Changeset 154270 in webkit


Ignore:
Timestamp:
Aug 19, 2013 3:19:14 AM (11 years ago)
Author:
allan.jensen@digia.com
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):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154269 r154270  
     12013-08-19  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        [Qt] QtWebKit (using the Arora browser) displays the border radii (radius) of a button very ugly
     4        https://bugs.webkit.org/show_bug.cgi?id=28113
     5
     6        Reviewed by Jocelyn Turcotte.
     7
     8        StylePainter::init() was called twice making it clobber the previous antialiasing setting.
     9
     10        This patch cleans up the construction so we only have one constructor with init inlined.
     11
     12        * platform/qt/RenderThemeQStyle.cpp:
     13        (WebCore::StylePainterQStyle::StylePainterQStyle):
     14        (WebCore::StylePainterQStyle::setupStyleOption):
     15        * platform/qt/RenderThemeQStyle.h:
     16        * platform/qt/RenderThemeQt.cpp:
     17        (WebCore::StylePainter::StylePainter):
     18        * platform/qt/RenderThemeQt.h:
     19        * platform/qt/RenderThemeQtMobile.cpp:
     20        (WebCore::StylePainterMobile::StylePainterMobile):
     21
    1222013-08-19  Julien Brianceau  <jbrianceau@nds.com>
    223
  • trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp

    r150750 r154270  
    6969
    7070StylePainterQStyle::StylePainterQStyle(RenderThemeQStyle* theme, const PaintInfo& paintInfo, RenderObject* renderObject)
    71     : StylePainter(theme, paintInfo)
     71    : StylePainter(paintInfo.context)
    7272    , qStyle(theme->qStyle())
    7373    , appearance(NoControlPart)
    7474{
    75     init(paintInfo.context ? paintInfo.context : 0);
     75    setupStyleOption();
    7676    if (renderObject)
    7777        appearance = theme->initializeCommonQStyleOptions(styleOption, renderObject);
     
    7979
    8080StylePainterQStyle::StylePainterQStyle(ScrollbarThemeQStyle* theme, GraphicsContext* context)
    81     : StylePainter()
     81    : StylePainter(context)
    8282    , qStyle(theme->qStyle())
    8383    , appearance(NoControlPart)
    8484{
    85     init(context);
    86 }
    87 
    88 void StylePainterQStyle::init(GraphicsContext* context)
    89 {
    90     painter = static_cast<QPainter*>(context->platformContext());
     85    setupStyleOption();
     86}
     87
     88void StylePainterQStyle::setupStyleOption()
     89{
    9190    if (QObject* widget = qStyle->widgetForPainter(painter)) {
    9291        styleOption.palette = widget->property("palette").value<QPalette>();
     
    9493        styleOption.direction = static_cast<Qt::LayoutDirection>(widget->property("layoutDirection").toInt());
    9594    }
    96 
    97     StylePainter::init(context);
    9895}
    9996
  • trunk/Source/WebCore/platform/qt/RenderThemeQStyle.h

    r130723 r154270  
    149149
    150150private:
    151     void init(GraphicsContext*);
     151    void setupStyleOption();
    152152
    153153    Q_DISABLE_COPY(StylePainterQStyle)
  • trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp

    r152149 r154270  
    874874}
    875875
    876 StylePainter::StylePainter(RenderThemeQt* theme, const PaintInfo& paintInfo)
    877     : painter(0)
    878 {
    879     Q_UNUSED(theme);
    880     ASSERT(paintInfo.context);
    881     init(paintInfo.context);
    882 }
    883 
    884 StylePainter::StylePainter()
    885     : painter(0)
    886 {
    887 }
    888 
    889 void StylePainter::init(GraphicsContext* context)
    890 {
    891     painter = static_cast<QPainter*>(context->platformContext());
     876StylePainter::StylePainter(GraphicsContext* context)
     877    : painter(context->platformContext())
     878{
     879    ASSERT(context);
    892880
    893881    if (painter) {
  • trunk/Source/WebCore/platform/qt/RenderThemeQt.h

    r151783 r154270  
    191191
    192192protected:
    193     StylePainter(RenderThemeQt*, const PaintInfo&);
    194     StylePainter();
    195     void init(GraphicsContext*);
     193    StylePainter(GraphicsContext*);
    196194
    197195private:
  • trunk/Source/WebCore/platform/qt/RenderThemeQtMobile.cpp

    r152149 r154270  
    210210
    211211StylePainterMobile::StylePainterMobile(RenderThemeQtMobile* theme, const PaintInfo& paintInfo)
    212     : StylePainter(theme, paintInfo)
     212    : StylePainter(paintInfo.context)
    213213{
    214214    m_previousSmoothPixmapTransform = painter->testRenderHint(QPainter::SmoothPixmapTransform);
Note: See TracChangeset for help on using the changeset viewer.