Changeset 52394 in webkit


Ignore:
Timestamp:
Dec 19, 2009 1:35:59 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-19 Dirk Schulze <krit@webkit.org>

Reviewed by Nikolas Zimmermann.

Add tests to check filter, mask, clip, opacity and marker ordering
https://bugs.webkit.org/show_bug.cgi?id=14010

Tests the right order of filter and clipper/masker aplied to a SVG
object.

  • platform/mac/svg/filters/filter-clip-expected.checksum: Added.
  • platform/mac/svg/filters/filter-clip-expected.png: Added.
  • platform/mac/svg/filters/filter-clip-expected.txt: Added.
  • svg/filters/filter-clip.svg: Added.

2009-12-19 Dirk Schulze <krit@webkit.org>

Reviewed by Nikolas Zimmermann.

Add tests to check filter, mask, clip, opacity and marker ordering
https://bugs.webkit.org/show_bug.cgi?id=14010

The right ordering for applying effects on objects in SVG is filters,
clipper/masker and opacity. This patch fixes the order of filter and
clipper/masker. Opacity and marker need another test.
This change is according to the SVG Specification:
http://www.w3.org/TR/SVG11/render.html#Elements

Test: svg/filters/filter-clip.svg

  • rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52390 r52394  
     12009-12-19  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Add tests to check filter, mask, clip, opacity and marker ordering
     6        https://bugs.webkit.org/show_bug.cgi?id=14010
     7
     8        Tests the right order of filter and clipper/masker aplied to a SVG
     9        object.
     10
     11        * platform/mac/svg/filters/filter-clip-expected.checksum: Added.
     12        * platform/mac/svg/filters/filter-clip-expected.png: Added.
     13        * platform/mac/svg/filters/filter-clip-expected.txt: Added.
     14        * svg/filters/filter-clip.svg: Added.
     15
    1162009-12-19  Benjamin Otte  <otte@gnome.org>
    217
  • trunk/WebCore/ChangeLog

    r52392 r52394  
     12009-12-19  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Add tests to check filter, mask, clip, opacity and marker ordering
     6        https://bugs.webkit.org/show_bug.cgi?id=14010
     7
     8        The right ordering for applying effects on objects in SVG is filters,
     9        clipper/masker and opacity. This patch fixes the order of filter and
     10        clipper/masker. Opacity and marker need another test.
     11        This change is according to the SVG Specification:
     12        http://www.w3.org/TR/SVG11/render.html#Elements
     13
     14        Test: svg/filters/filter-clip.svg
     15
     16        * rendering/SVGRenderSupport.cpp:
     17        (WebCore::SVGRenderBase::prepareToRenderSVGContent):
     18
    1192009-12-19  Evan Martin  <evan@chromium.org>
    220
  • trunk/WebCore/rendering/SVGRenderSupport.cpp

    r51936 r52394  
    130130    SVGResourceMasker* masker = getMaskerById(document, maskerId);
    131131
     132    if (masker) {
     133        masker->addClient(styledElement);
     134        masker->applyMask(paintInfo.context, boundingBox);
     135    } else if (!maskerId.isEmpty())
     136        svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
     137
     138    if (clipper) {
     139        clipper->addClient(styledElement);
     140        clipper->applyClip(paintInfo.context, boundingBox);
     141    } else if (!clipperId.isEmpty())
     142        svgElement->document()->accessSVGExtensions()->addPendingResource(clipperId, styledElement);
     143
    132144#if ENABLE(FILTERS)
    133145    if (filter) {
     
    137149        svgElement->document()->accessSVGExtensions()->addPendingResource(filterId, styledElement);
    138150#endif
    139 
    140     if (clipper) {
    141         clipper->addClient(styledElement);
    142         clipper->applyClip(paintInfo.context, boundingBox);
    143     } else if (!clipperId.isEmpty())
    144         svgElement->document()->accessSVGExtensions()->addPendingResource(clipperId, styledElement);
    145 
    146     if (masker) {
    147         masker->addClient(styledElement);
    148         masker->applyMask(paintInfo.context, boundingBox);
    149     } else if (!maskerId.isEmpty())
    150         svgElement->document()->accessSVGExtensions()->addPendingResource(maskerId, styledElement);
    151151}
    152152
Note: See TracChangeset for help on using the changeset viewer.