Changeset 161964 in webkit


Ignore:
Timestamp:
Jan 14, 2014 7:38:26 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: Background-blend-mode doesn't work for an element with an
SVG image as background and border-style or padding set.
The problem consisted in the drawing path using the default
blending parameter at all times.
https://bugs.webkit.org/show_bug.cgi?id=118894

Patch by Mihai Tica <mitica@adobe.com> on 2014-01-14
Reviewed by Dirk Schulze.

Test: css3/compositing/background-blend-mode-data-uri-svg-image.html

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawPatternForContainer): Pass blendMode to Image::drawPattern.

  • svg/graphics/SVGImage.h: Add a blendMode parameter to drawPatternForContainer.
  • svg/graphics/SVGImageForContainer.cpp:

(WebCore::SVGImageForContainer::drawPattern): Pass blendMode to drawPatternForContainer call.

LayoutTests: Background-blend-mode doesn't work for an element with an
SVG image as background and border-style or padding set.
https://bugs.webkit.org/show_bug.cgi?id=118894

Patch by Mihai Tica <mitica@adobe.com> on 2014-01-14
Reviewed by Dirk Schulze.

  • css3/compositing/background-blend-mode-data-uri-svg-image-expected.html: Added.
  • css3/compositing/background-blend-mode-data-uri-svg-image.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r161961 r161964  
     12014-01-14  Mihai Tica  <mitica@adobe.com>
     2
     3        Background-blend-mode doesn't work for an element with an
     4        SVG image as background and border-style or padding set.
     5        https://bugs.webkit.org/show_bug.cgi?id=118894
     6
     7        Reviewed by Dirk Schulze.
     8
     9        * css3/compositing/background-blend-mode-data-uri-svg-image-expected.html: Added.
     10        * css3/compositing/background-blend-mode-data-uri-svg-image.html: Added.
     11
    1122014-01-14  Mihnea Ovidenie  <mihnea@adobe.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r161963 r161964  
     12014-01-14  Mihai Tica  <mitica@adobe.com>
     2
     3        Background-blend-mode doesn't work for an element with an
     4        SVG image as background and border-style or padding set.
     5        The problem consisted in the drawing path using the default
     6        blending parameter at all times.
     7        https://bugs.webkit.org/show_bug.cgi?id=118894
     8
     9        Reviewed by Dirk Schulze.
     10
     11        Test: css3/compositing/background-blend-mode-data-uri-svg-image.html
     12
     13        * svg/graphics/SVGImage.cpp:
     14        (WebCore::SVGImage::drawPatternForContainer): Pass blendMode to Image::drawPattern.
     15        * svg/graphics/SVGImage.h: Add a blendMode parameter to drawPatternForContainer.
     16        * svg/graphics/SVGImageForContainer.cpp:
     17        (WebCore::SVGImageForContainer::drawPattern): Pass blendMode to drawPatternForContainer call.
     18
    1192014-01-14  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
    220
  • trunk/Source/WebCore/svg/graphics/SVGImage.cpp

    r159791 r161964  
    183183
    184184void SVGImage::drawPatternForContainer(GraphicsContext* context, const FloatSize containerSize, float zoom, const FloatRect& srcRect,
    185     const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace colorSpace, CompositeOperator compositeOp, const FloatRect& dstRect)
     185    const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode blendMode, const FloatRect& dstRect)
    186186{
    187187    FloatRect zoomedContainerRect = FloatRect(FloatPoint(), containerSize);
     
    214214
    215215    context->setDrawLuminanceMask(false);
    216     image->drawPattern(context, scaledSrcRect, unscaledPatternTransform, phase, colorSpace, compositeOp, dstRect);
     216    image->drawPattern(context, scaledSrcRect, unscaledPatternTransform, phase, colorSpace, compositeOp, dstRect, blendMode);
    217217}
    218218
  • trunk/Source/WebCore/svg/graphics/SVGImage.h

    r160248 r161964  
    9393    void drawForContainer(GraphicsContext*, const FloatSize, float, const FloatRect&, const FloatRect&, ColorSpace, CompositeOperator, BlendMode);
    9494    void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const FloatRect&, const AffineTransform&, const FloatPoint&, ColorSpace,
    95         CompositeOperator, const FloatRect&);
     95        CompositeOperator, BlendMode, const FloatRect&);
    9696
    9797    std::unique_ptr<SVGImageChromeClient> m_chromeClient;
  • trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp

    r157909 r161964  
    4444
    4545void SVGImageForContainer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
    46     const FloatPoint& phase, ColorSpace colorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode)
     46    const FloatPoint& phase, ColorSpace colorSpace, CompositeOperator compositeOp, const FloatRect& dstRect, BlendMode blendMode)
    4747{
    4848    m_image->setSpaceSize(spaceSize());
    49     m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, colorSpace, compositeOp, dstRect);
     49    m_image->drawPatternForContainer(context, m_containerSize, m_zoom, srcRect, patternTransform, phase, colorSpace, compositeOp, blendMode, dstRect);
    5050}
    5151
Note: See TracChangeset for help on using the changeset viewer.