Changeset 76206 in webkit


Ignore:
Timestamp:
Jan 19, 2011 9:57:51 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-01-19 Helder Correia <helder@sencha.com>

Reviewed by Andreas Kling.

[Qt] GraphicsContext::strokePath() paints solid shadows with incorrect alpha
https://bugs.webkit.org/show_bug.cgi?id=52705

This is related to bug 52611. The shadow color alpha must be multiplied
by the context pen alpha. Fixing this results in correct behavior for
Canvas path stroke() and strokeRect() [which relies on stroke()].

  • fast/canvas/canvas-strokePath-alpha-shadow-expected.txt: Added.
  • fast/canvas/canvas-strokePath-alpha-shadow.html: Added.
  • fast/canvas/canvas-strokeRect-alpha-shadow-expected.txt: Added.
  • fast/canvas/canvas-strokeRect-alpha-shadow.html: Added.
  • fast/canvas/script-tests/canvas-strokePath-alpha-shadow.js: Added.
  • fast/canvas/script-tests/canvas-strokeRect-alpha-shadow.js: Added.

2011-01-19 Helder Correia <helder@sencha.com>

Reviewed by Andreas Kling.

[Qt] GraphicsContext::strokePath() paints solid shadows with incorrect alpha
https://bugs.webkit.org/show_bug.cgi?id=52705

This is related to bug 52611. The shadow color alpha must be multiplied
by the context pen alpha. Fixing this results in correct behavior for
Canvas path stroke() and strokeRect() [which relies on stroke()].

Tests: fast/canvas/canvas-strokePath-alpha-shadow.html

fast/canvas/canvas-strokeRect-alpha-shadow.html

  • platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::strokePath):
Location:
trunk
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r76205 r76206  
     12011-01-19  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] GraphicsContext::strokePath() paints solid shadows with incorrect alpha
     6        https://bugs.webkit.org/show_bug.cgi?id=52705
     7
     8        This is related to bug 52611. The shadow color alpha must be multiplied
     9        by the context pen alpha. Fixing this results in correct behavior for
     10        Canvas path stroke() and strokeRect() [which relies on stroke()].
     11
     12        * fast/canvas/canvas-strokePath-alpha-shadow-expected.txt: Added.
     13        * fast/canvas/canvas-strokePath-alpha-shadow.html: Added.
     14        * fast/canvas/canvas-strokeRect-alpha-shadow-expected.txt: Added.
     15        * fast/canvas/canvas-strokeRect-alpha-shadow.html: Added.
     16        * fast/canvas/script-tests/canvas-strokePath-alpha-shadow.js: Added.
     17        * fast/canvas/script-tests/canvas-strokeRect-alpha-shadow.js: Added.
     18
    1192011-01-14  Darin Fisher  <darin@chromium.org>
    220
  • trunk/Source/WebCore/ChangeLog

    r76205 r76206  
     12011-01-19  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] GraphicsContext::strokePath() paints solid shadows with incorrect alpha
     6        https://bugs.webkit.org/show_bug.cgi?id=52705
     7
     8        This is related to bug 52611. The shadow color alpha must be multiplied
     9        by the context pen alpha. Fixing this results in correct behavior for
     10        Canvas path stroke() and strokeRect() [which relies on stroke()].
     11
     12        Tests: fast/canvas/canvas-strokePath-alpha-shadow.html
     13               fast/canvas/canvas-strokeRect-alpha-shadow.html
     14
     15        * platform/graphics/qt/GraphicsContextQt.cpp:
     16        (WebCore::GraphicsContext::strokePath):
     17
    1182011-01-19  Darin Fisher  <darin@chromium.org>
    219
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r76033 r76206  
    556556            }
    557557        } else {
    558             QPen shadowPen(pen);
    559             shadowPen.setColor(m_data->shadow.m_color);
    560558            QPointF offset = shadow->offset();
    561559            p->translate(offset);
     560            QColor shadowColor = shadow->m_color;
     561            shadowColor.setAlphaF(shadowColor.alphaF() * pen.color().alphaF());
     562            QPen shadowPen(pen);
     563            shadowPen.setColor(shadowColor);
    562564            p->strokePath(platformPath, shadowPen);
    563565            p->translate(-offset);
Note: See TracChangeset for help on using the changeset viewer.