Changeset 53166 in webkit


Ignore:
Timestamp:
Jan 12, 2010 3:10:22 PM (14 years ago)
Author:
Beth Dakin
Message:

WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION: -
webkit-svg-shadow with opacity still over-clipped

Reviewed by Sam Weinig.

We need to call inflateForShadow() on the repaintRect before we
clip for opacity or we will over-clip.

  • rendering/SVGRenderSupport.cpp:

(WebCore::SVGRenderBase::prepareToRenderSVGContent):

LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION:
-webkit-svg-shadow with opacity still over-clipped

Reviewed by Sam Weinig.

  • platform/mac/svg/css/shadow-and-opacity-expected.checksum: Added.
  • platform/mac/svg/css/shadow-and-opacity-expected.png: Added.
  • platform/mac/svg/css/shadow-and-opacity-expected.txt: Added.
  • svg/css/shadow-and-opacity.svg: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53163 r53166  
     12010-01-12  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Test for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION:
     6        -webkit-svg-shadow with opacity still over-clipped
     7
     8        * platform/mac/svg/css/shadow-and-opacity-expected.checksum: Added.
     9        * platform/mac/svg/css/shadow-and-opacity-expected.png: Added.
     10        * platform/mac/svg/css/shadow-and-opacity-expected.txt: Added.
     11        * svg/css/shadow-and-opacity.svg: Added.
     12
    1132010-01-11  Jon Honeycutt  <jhoneycutt@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r53165 r53166  
     12010-01-12  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=33550 REGRESSION: -
     6        webkit-svg-shadow with opacity still over-clipped
     7
     8        We need to call inflateForShadow() on the repaintRect before we
     9        clip for opacity or we will over-clip.
     10        * rendering/SVGRenderSupport.cpp:
     11        (WebCore::SVGRenderBase::prepareToRenderSVGContent):
     12
    1132010-01-12  Steve Falkenburg  <sfalken@apple.com>
    214
  • trunk/WebCore/rendering/SVGRenderSupport.cpp

    r53103 r53166  
    9393    ASSERT(svgStyle);
    9494
     95    ShadowData* shadow = svgStyle->shadow();
     96    IntRect repaintIntRectWithShadow = enclosingIntRect(repaintRect);
     97    if (shadow)
     98        svgStyle->inflateForShadow(repaintIntRectWithShadow);
     99
    95100    // Setup transparency layers before setting up filters!
    96101    float opacity = style->opacity();
    97102    if (opacity < 1.0f) {
    98         paintInfo.context->clip(enclosingIntRect(repaintRect));
     103        paintInfo.context->clip(repaintIntRectWithShadow);
    99104        paintInfo.context->beginTransparencyLayer(opacity);
    100105    }
    101106
    102     if (ShadowData* shadow = svgStyle->shadow()) {
    103         IntRect shadowRect = enclosingIntRect(repaintRect);
    104         svgStyle->inflateForShadow(shadowRect);
    105         paintInfo.context->clip(shadowRect);
     107    if (shadow) {
     108        paintInfo.context->clip(repaintIntRectWithShadow);
    106109        paintInfo.context->setShadow(IntSize(shadow->x, shadow->y), shadow->blur, shadow->color, style->colorSpace());
    107110        paintInfo.context->beginTransparencyLayer(1.0f);
Note: See TracChangeset for help on using the changeset viewer.