Changeset 87887 in webkit


Ignore:
Timestamp:
Jun 2, 2011 3:04:33 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-02 Ian Henderson <ianh@apple.com>

Reviewed by Simon Fraser.

[CG] GraphicsContext::fillRoundedRect() ignores the gradient fill the CGContextFillEllipseInRect() code path
https://bugs.webkit.org/show_bug.cgi?id=61882

If we have a gradient or pattern fill set, take the slow path, which
handles these cases properly.

No new tests, since we never try to fill a rounded rect with a
gradient or pattern.

  • platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillRoundedRect):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87885 r87887  
     12011-06-02  Ian Henderson  <ianh@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        [CG] GraphicsContext::fillRoundedRect() ignores the gradient fill the CGContextFillEllipseInRect() code path
     6        https://bugs.webkit.org/show_bug.cgi?id=61882
     7
     8        If we have a gradient or pattern fill set, take the slow path, which
     9        handles these cases properly.
     10
     11        No new tests, since we never try to fill a rounded rect with a
     12        gradient or pattern.
     13
     14        * platform/graphics/cg/GraphicsContextCG.cpp:
     15        (WebCore::GraphicsContext::fillRoundedRect):
     16
    1172011-06-02  MORITA Hajime  <morrita@google.com>
    218
  • trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r85036 r87887  
    771771    bool equalWidths = (topLeft.width() == topRight.width() && topRight.width() == bottomLeft.width() && bottomLeft.width() == bottomRight.width());
    772772    bool equalHeights = (topLeft.height() == bottomLeft.height() && bottomLeft.height() == topRight.height() && topRight.height() == bottomRight.height());
    773     if (equalWidths && equalHeights && topLeft.width() * 2 == rect.width() && topLeft.height() * 2 == rect.height())
     773    bool hasCustomFill = m_state.fillGradient || m_state.fillPattern;
     774    if (!hasCustomFill && equalWidths && equalHeights && topLeft.width() * 2 == rect.width() && topLeft.height() * 2 == rect.height())
    774775        CGContextFillEllipseInRect(context, rect);
    775776    else {
Note: See TracChangeset for help on using the changeset viewer.