Changeset 151566 in webkit


Ignore:
Timestamp:
Jun 13, 2013 11:25:10 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CSS Background Blending] Enable CSS Background blending for layers with SVGs.

Source/WebCore:

The change implies adding the blending parameter for SVGImage
https://bugs.webkit.org/show_bug.cgi?id=117588

Patch by Mihai Tica <mitica@adobe.com> on 2013-06-13
Reviewed by Dirk Schulze.

Tests: css3/compositing/background-blend-mode-image-svg.html

css3/compositing/background-blend-mode-svg-color.html

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::draw):

LayoutTests:

Adding tests for SVGs over simple background colors and images blending with SVGs.
https://bugs.webkit.org/show_bug.cgi?id=117588

Patch by Mihai Tica <mitica@adobe.com> on 2013-06-13
Reviewed by Dirk Schulze.

  • css3/compositing/background-blend-mode-image-svg-expected.txt: Added.
  • css3/compositing/background-blend-mode-image-svg.html: Added.
  • css3/compositing/background-blend-mode-svg-color-expected.txt: Added.
  • css3/compositing/background-blend-mode-svg-color.html: Added.
  • css3/compositing/resources/red-circle.svg: Added.
  • platform/mac/css3/compositing/background-blend-mode-image-svg-expected.png: Added.
  • platform/mac/css3/compositing/background-blend-mode-svg-color-expected.png: Added.
Location:
trunk
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151565 r151566  
     12013-06-13  Mihai Tica  <mitica@adobe.com>
     2
     3        [CSS Background Blending] Enable CSS Background blending for layers with SVGs.
     4
     5        Adding tests for SVGs over simple background colors and images blending with SVGs.
     6        https://bugs.webkit.org/show_bug.cgi?id=117588
     7
     8        Reviewed by Dirk Schulze.
     9
     10        * css3/compositing/background-blend-mode-image-svg-expected.txt: Added.
     11        * css3/compositing/background-blend-mode-image-svg.html: Added.
     12        * css3/compositing/background-blend-mode-svg-color-expected.txt: Added.
     13        * css3/compositing/background-blend-mode-svg-color.html: Added.
     14        * css3/compositing/resources/red-circle.svg: Added.
     15        * platform/mac/css3/compositing/background-blend-mode-image-svg-expected.png: Added.
     16        * platform/mac/css3/compositing/background-blend-mode-svg-color-expected.png: Added.
     17
    1182013-06-13  Mihai Tica  <mitica@adobe.com>
    219
  • trunk/Source/WebCore/ChangeLog

    r151565 r151566  
     12013-06-13  Mihai Tica  <mitica@adobe.com>
     2
     3        [CSS Background Blending] Enable CSS Background blending for layers with SVGs.
     4
     5        The change implies adding the blending parameter for SVGImage
     6        https://bugs.webkit.org/show_bug.cgi?id=117588
     7
     8        Reviewed by Dirk Schulze.
     9
     10        Tests: css3/compositing/background-blend-mode-image-svg.html
     11               css3/compositing/background-blend-mode-svg-color.html
     12
     13        * svg/graphics/SVGImage.cpp:
     14        (WebCore::SVGImage::draw):
     15
    1162013-06-13  Mihai Tica  <mitica@adobe.com>
    217
  • trunk/Source/WebCore/svg/graphics/SVGImage.cpp

    r151525 r151566  
    192192}
    193193
    194 void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode)
     194void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode)
    195195{
    196196    if (!m_page)
     
    200200
    201201    GraphicsContextStateSaver stateSaver(*context);
    202     context->setCompositeOperation(compositeOp);
     202    context->setCompositeOperation(compositeOp, blendMode);
    203203    context->clip(enclosingIntRect(dstRect));
    204204    if (compositeOp != CompositeSourceOver)
Note: See TracChangeset for help on using the changeset viewer.