Commit c7d5cf16 authored by ariya@webkit.org's avatar ariya@webkit.org

WebCore/ChangeLog:

2009-08-12  Ariya Hidayat  <ariya.hidayat@nokia.com>

        Reviewed by Holger Freyther.

        [Qt] Fix box-shadow painting in r47103. The edge should not be blurry.
        Also optimize by not having to save and restore painter state.

        * platform/graphics/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContext::drawRect):
        (WebCore::GraphicsContext::fillRect):

LayoutTests/ChangeLog:

2009-08-12  Ariya Hidayat  <ariya.hidayat@nokia.com>

        Reviewed by Holger Hans Peter Freyther.

        [Qt] Update the pixel tests for shadow edge fix.

        * platform/qt/fast/box-shadow/basic-shadows-expected.checksum:
        * platform/qt/fast/box-shadow/basic-shadows-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8d43ffa1
2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
Reviewed by Holger Hans Peter Freyther.
[Qt] Update the pixel tests for shadow edge fix.
* platform/qt/fast/box-shadow/basic-shadows-expected.checksum:
* platform/qt/fast/box-shadow/basic-shadows-expected.png:
2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
Reviewed by Simon Hausmann.
......
04a5bd6d0851de9c0abb234c40b8e1ff
\ No newline at end of file
31ec573788c7c83c885987de49542c27
\ No newline at end of file
2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
Reviewed by Holger Freyther.
[Qt] Fix box-shadow painting in r47103. The edge should not be blurry.
Also optimize by not having to save and restore painter state.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::fillRect):
2009-08-12 Ariya Hidayat <ariya.hidayat@nokia.com>
Reviewed by Adam Treat.
......
......@@ -419,12 +419,10 @@ void GraphicsContext::drawRect(const IntRect& rect)
int shadowBlur;
Color shadowColor;
if (textDrawingMode() == cTextFill && getShadow(shadowSize, shadowBlur, shadowColor)) {
p->save();
p->translate(shadowSize.width(), shadowSize.height());
p->setPen(QColor(shadowColor));
p->setBrush(QBrush(QColor(shadowColor)));
p->drawRect(rect);
p->restore();
IntRect shadowRect = rect;
shadowRect.move(shadowSize.width(), shadowSize.height());
shadowRect.inflate(p->pen().widthF());
p->fillRect(shadowRect, QColor(shadowColor));
}
p->drawRect(rect);
......@@ -720,12 +718,10 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& c)
Color shadowColor;
QPainter* p = m_data->p();
if (textDrawingMode() == cTextFill && getShadow(shadowSize, shadowBlur, shadowColor)) {
p->save();
p->translate(shadowSize.width(), shadowSize.height());
p->setPen(QColor(shadowColor));
p->setBrush(QBrush(QColor(shadowColor)));
p->drawRect(rect);
p->restore();
FloatRect shadowRect = rect;
shadowRect.move(shadowSize.width(), shadowSize.height());
shadowRect.inflate(p->pen().widthF());
p->fillRect(shadowRect, QColor(shadowColor));
}
p->fillRect(rect, m_data->solidColor);
}
......
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