Changeset 76033 in webkit


Ignore:
Timestamp:
Jan 18, 2011 10:10:37 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Reviewed by Kenneth Rohde Christiansen.

[Qt] Incorrect shadow alpha with semi-transparent solid fillStyle
https://bugs.webkit.org/show_bug.cgi?id=52611

This is related to bug 52559. The shadow color alpha must be multiplied
by the context brush alpha.

New test to ensure correct behavior of canvas with fillPath using a
semi-transparent fillStyle color and a shadow.

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

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

Reviewed by Kenneth Rohde Christiansen.

[Qt] Incorrect shadow alpha with semi-transparent solid fillStyle
https://bugs.webkit.org/show_bug.cgi?id=52611

This is related to bug 52559. The shadow color alpha must be multiplied
by the context brush alpha.

Test: fast/canvas/canvas-fillPath-alpha-shadow.html

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r76032 r76033  
     12011-01-18  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Incorrect shadow alpha with semi-transparent solid fillStyle
     6        https://bugs.webkit.org/show_bug.cgi?id=52611
     7
     8        This is related to bug 52559. The shadow color alpha must be multiplied
     9        by the context brush alpha.
     10
     11        New test to ensure correct behavior of canvas with fillPath using a
     12        semi-transparent fillStyle color and a shadow.
     13
     14        * fast/canvas/canvas-fillPath-alpha-shadow-expected.txt: Added.
     15        * fast/canvas/canvas-fillPath-alpha-shadow.html: Added.
     16        * fast/canvas/script-tests/canvas-fillPath-alpha-shadow.js: Added.
     17
    1182011-01-18  John Knottenbelt  <jknotten@chromium.org>
    219
  • trunk/Source/WebCore/ChangeLog

    r76030 r76033  
     12011-01-18  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Incorrect shadow alpha with semi-transparent solid fillStyle
     6        https://bugs.webkit.org/show_bug.cgi?id=52611
     7
     8        This is related to bug 52559. The shadow color alpha must be multiplied
     9        by the context brush alpha.
     10
     11        Test: fast/canvas/canvas-fillPath-alpha-shadow.html
     12
     13        * platform/graphics/qt/GraphicsContextQt.cpp:
     14        (WebCore::GraphicsContext::fillPath):
     15
    1162011-01-18  Andrey Kosyakov  <caseq@chromium.org>
    217
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r75973 r76033  
    99 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
    1010 * Copyright (C) 2008 Dirk Schulze <vbs85@gmx.de>
    11  * Copyright (C) 2010 Sencha, Inc.
     11 * Copyright (C) 2010, 2011 Sencha, Inc.
    1212 *
    1313 * All rights reserved.
     
    506506                    shadowPainter->setOpacity(static_cast<qreal>(shadow->m_color.alpha()) / 255);
    507507                    shadowPainter->fillPath(platformPath, brush);
    508                 } else
    509                     shadowPainter->fillPath(platformPath, QColor(shadow->m_color));
     508                } else {
     509                    QColor shadowColor = shadow->m_color;
     510                    shadowColor.setAlphaF(shadowColor.alphaF() * p->brush().color().alphaF());
     511                    shadowPainter->fillPath(platformPath, shadowColor);
     512                }
    510513                shadow->endShadowLayer(this);
    511514            }
     
    513516            QPointF offset = shadow->offset();
    514517            p->translate(offset);
    515             p->fillPath(platformPath, QColor(shadow->m_color));
     518            QColor shadowColor = shadow->m_color;
     519            shadowColor.setAlphaF(shadowColor.alphaF() * p->brush().color().alphaF());
     520            p->fillPath(platformPath, shadowColor);
    516521            p->translate(-offset);
    517522        }
Note: See TracChangeset for help on using the changeset viewer.