Changeset 80250 in webkit


Ignore:
Timestamp:
Mar 3, 2011 9:43:37 AM (13 years ago)
Author:
helder@sencha.com
Message:

[Qt] fast/canvas/canvas-strokePath-gradient-shadow.html fails
https://bugs.webkit.org/show_bug.cgi?id=55651

Reviewed by Andreas Kling.

When relying on ContextShadow and using a gradient stroke for a path,
the alpha of the shadow is incorrect.

Source/WebCore:

  • platform/graphics/qt/GraphicsContextQt.cpp:

(WebCore::GraphicsContext::strokePath):

LayoutTests:

  • platform/qt/Skipped: Remove test from skipped list.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r80247 r80250  
     12011-03-03  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] fast/canvas/canvas-strokePath-gradient-shadow.html fails
     6        https://bugs.webkit.org/show_bug.cgi?id=55651
     7
     8        When relying on ContextShadow and using a gradient stroke for a path,
     9        the alpha of the shadow is incorrect.
     10
     11        * platform/qt/Skipped: Remove test from skipped list.
     12
    1132011-03-03  Philippe Normand  <pnormand@igalia.com>
    214
  • trunk/LayoutTests/platform/qt/Skipped

    r80181 r80250  
    15851585fast/text/word-break-run-rounding.html
    15861586fast/transforms/transform-positioned-ancestor.html
    1587 fast/canvas/canvas-strokePath-gradient-shadow.html
    15881587
    15891588# -- timedout with --platform mac --ignore-metrics
  • trunk/Source/WebCore/ChangeLog

    r80246 r80250  
     12011-03-03  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] fast/canvas/canvas-strokePath-gradient-shadow.html fails
     6        https://bugs.webkit.org/show_bug.cgi?id=55651
     7
     8        When relying on ContextShadow and using a gradient stroke for a path,
     9        the alpha of the shadow is incorrect.
     10
     11        * platform/graphics/qt/GraphicsContextQt.cpp:
     12        (WebCore::GraphicsContext::strokePath):
     13
    1142011-03-03  Martin Robinson  <mrobinson@igalia.com>
    215
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r78846 r80250  
    556556            QPainter* shadowPainter = shadow->beginShadowLayer(this, boundingRect);
    557557            if (shadowPainter) {
    558                 shadowPainter->setOpacity(static_cast<qreal>(m_data->shadow.m_color.alpha()) / 255);
    559                 shadowPainter->strokePath(platformPath, pen);
     558                if (m_state.strokeGradient) {
     559                    QBrush brush(*m_state.strokeGradient->platformGradient());
     560                    brush.setTransform(m_state.strokeGradient->gradientSpaceTransform());
     561                    QPen shadowPen(pen);
     562                    shadowPen.setBrush(brush);
     563                    shadowPainter->setOpacity(static_cast<qreal>(shadow->m_color.alpha()) / 255);
     564                    shadowPainter->strokePath(platformPath, shadowPen);
     565                } else {
     566                    shadowPainter->setOpacity(static_cast<qreal>(m_data->shadow.m_color.alpha()) / 255);
     567                    shadowPainter->strokePath(platformPath, pen);
     568                }
    560569                shadow->endShadowLayer(this);
    561570            }
Note: See TracChangeset for help on using the changeset viewer.