Changeset 162066 in webkit


Ignore:
Timestamp:
Jan 15, 2014 4:32:03 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: Reapplying:
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-15
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: Reapplying:
Background-blend-mode doesn't work for an element with an
SVG image as background and border-style or padding set.
Tests now use rectangles instead of circles for SVGs.
https://bugs.webkit.org/show_bug.cgi?id=118894

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

  • css3/compositing/background-blend-mode-data-uri-svg-image-expected.html:
  • css3/compositing/background-blend-mode-data-uri-svg-image.html:
  • platform/efl/TestExpectations: pass tests for efl, blendMode is not implemented.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r162064 r162066  
     12014-01-15  Mihai Tica  <mitica@adobe.com>
     2
     3        Reapplying:
     4        Background-blend-mode doesn't work for an element with an
     5        SVG image as background and border-style or padding set.
     6        Tests now use rectangles instead of circles for SVGs.
     7        https://bugs.webkit.org/show_bug.cgi?id=118894
     8
     9        Reviewed by Dirk Schulze.
     10
     11        * css3/compositing/background-blend-mode-data-uri-svg-image-expected.html:
     12        * css3/compositing/background-blend-mode-data-uri-svg-image.html:
     13        * platform/efl/TestExpectations: pass tests for efl, blendMode is not implemented.
     14
    1152014-01-15  Andrei Bucur  <abucur@adobe.com>
    216
  • trunk/LayoutTests/platform/efl/TestExpectations

    r161628 r162066  
    498498webkit.org/b/99200 css3/compositing/blend-mode-simple.html [ Skip ]
    499499webkit.org/b/99200 css3/compositing/blend-mode-should-not-have-compositing-layer.html [ Skip ]
     500webkit.org/b/118894 css3/compositing/background-blend-mode-data-uri-svg-image-expected.html [ Skip ]
    500501
    501502# No concept of secure text input
  • trunk/Source/WebCore/ChangeLog

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

    r161981 r162066  
    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, const FloatRect& dstRect, BlendMode blendMode)
    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

    r161981 r162066  
    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, const FloatRect&, BlendMode);
    9696
    9797    std::unique_ptr<SVGImageChromeClient> m_chromeClient;
  • trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp

    r161981 r162066  
    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, dstRect, blendMode);
    5050}
    5151
Note: See TracChangeset for help on using the changeset viewer.