Changeset 65392 in webkit


Ignore:
Timestamp:
Aug 15, 2010 10:27:39 PM (14 years ago)
Author:
ariya@webkit.org
Message:

2010-08-15 Ariya Hidayat <ariya@sencha.com>

Reviewed by Antonio Gomes.

[Qt] Border should not cast shadows
https://bugs.webkit.org/show_bug.cgi?id=44015

Update pixel test reference.

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

2010-08-15 Ariya Hidayat <ariya@sencha.com>

Reviewed by Antonio Gomes.

[Qt] Border should not cast shadows
https://bugs.webkit.org/show_bug.cgi?id=44015

Shadows should be not casted except for brush fill (which is not what
drawLine and drawRect are supposed to do).

  • platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): Remove shadow painting, (WebCore::GraphicsContext::drawLine): ditto.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r65382 r65392  
     12010-08-15  Ariya Hidayat  <ariya@sencha.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] Border should not cast shadows
     6        https://bugs.webkit.org/show_bug.cgi?id=44015
     7
     8        Update pixel test reference.
     9
     10        * platform/qt/fast/box-shadow/basic-shadows-expected.checksum:
     11        * platform/qt/fast/box-shadow/basic-shadows-expected.png:
     12
    1132010-08-15  Adam Barth  <abarth@webkit.org>
    214
  • trunk/LayoutTests/platform/qt/fast/box-shadow/basic-shadows-expected.checksum

    r65326 r65392  
    1 2b67d6d647e12fd1583a14e9d2e0bb11
     1b4d3c35c842ed05b52fc30be51863f1f
  • trunk/WebCore/ChangeLog

    r65391 r65392  
     12010-08-15  Ariya Hidayat  <ariya@sencha.com>
     2
     3        Reviewed by Antonio Gomes.
     4
     5        [Qt] Border should not cast shadows
     6        https://bugs.webkit.org/show_bug.cgi?id=44015
     7
     8        Shadows should be not casted except for brush fill (which is not what
     9        drawLine and drawRect are supposed to do).
     10
     11        * platform/graphics/qt/GraphicsContextQt.cpp:
     12        (WebCore::GraphicsContext::drawRect): Remove shadow painting,
     13        (WebCore::GraphicsContext::drawLine): ditto.
     14
    1152010-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
    216
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r65362 r65392  
    302302
    303303// Draws a filled rectangle with a stroked border.
     304// This is only used to draw borders (real fill is done via fillRect), and
     305// thus it must not cast any shadow.
    304306void GraphicsContext::drawRect(const IntRect& rect)
    305307{
     
    311313    p->setRenderHint(QPainter::Antialiasing, m_data->antiAliasingForRectsAndLines);
    312314
    313     if (m_data->hasShadow()) {
    314         IntRect shadowRect = rect;
    315         shadowRect.move(m_data->shadowOffset.x(), m_data->shadowOffset.y());
    316         shadowRect.inflate(static_cast<int>(p->pen().widthF()));
    317         p->fillRect(shadowRect, m_data->shadowColor);
    318     }
    319 
    320315    p->drawRect(rect);
    321316
     
    324319
    325320// This is only used to draw borders.
     321// Must not cast any shadow.
    326322void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
    327323{
     
    344340    p->setRenderHint(QPainter::Antialiasing, m_data->antiAliasingForRectsAndLines);
    345341    adjustLineToPixelBoundaries(p1, p2, width, style);
    346 
    347     if (m_data->hasShadow()) {
    348         if (textDrawingMode() == cTextFill) {
    349             p->save();
    350             p->translate(m_data->shadowOffset);
    351             p->setPen(m_data->shadowColor);
    352             p->drawLine(p1, p2);
    353             p->restore();
    354         }
    355     }
    356342
    357343    int patWidth = 0;
Note: See TracChangeset for help on using the changeset viewer.