Changeset 55259 in webkit


Ignore:
Timestamp:
Feb 25, 2010 3:02:00 PM (14 years ago)
Author:
krit@webkit.org
Message:

2010-02-25 Dirk Schulze <krit@webkit.org>

Reviewed by Nikolas Zimmermann.

Use-element doesn't transform clipPath
https://bugs.webkit.org/show_bug.cgi?id=35375

If the use element is a child of clipPath, any settings on x, y or transform does not
transform the clipPath it references.
The use-element just misses this transformation in toClipPath.

Test: svg/custom/use-on-clip-path-with-transformation.svg

  • platform/graphics/cairo/PathCairo.cpp: Gtk port translated the path to the wrong direction. (WebCore::Path::translate):
  • svg/SVGUseElement.cpp: (WebCore::SVGUseElement::toClipPath):

2010-02-25 Dirk Schulze <krit@webkit.org>

Reviewed by Nikolas Zimmermann.

Use-element doesn't transform clipPath
https://bugs.webkit.org/show_bug.cgi?id=35375

Check if the clipPath gets transformed on setting a transform or translation for use.

  • platform/mac/svg/custom/use-on-clip-path-with-transformation-expected.checksum: Added.
  • platform/mac/svg/custom/use-on-clip-path-with-transformation-expected.png: Added.
  • platform/mac/svg/custom/use-on-clip-path-with-transformation-expected.txt: Added.
  • svg/custom/use-on-clip-path-with-transformation.svg: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r55257 r55259  
     12010-02-25  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Use-element doesn't transform clipPath
     6        https://bugs.webkit.org/show_bug.cgi?id=35375
     7
     8        Check if the clipPath gets transformed on setting a transform or translation for use.
     9
     10        * platform/mac/svg/custom/use-on-clip-path-with-transformation-expected.checksum: Added.
     11        * platform/mac/svg/custom/use-on-clip-path-with-transformation-expected.png: Added.
     12        * platform/mac/svg/custom/use-on-clip-path-with-transformation-expected.txt: Added.
     13        * svg/custom/use-on-clip-path-with-transformation.svg: Added.
     14
    1152010-02-25  Jian Li  <jianli@chromium.org>
    216
  • trunk/WebCore/ChangeLog

    r55257 r55259  
     12010-02-25  Dirk Schulze  <krit@webkit.org>
     2
     3        Reviewed by Nikolas Zimmermann.
     4
     5        Use-element doesn't transform clipPath
     6        https://bugs.webkit.org/show_bug.cgi?id=35375
     7
     8        If the use element is a child of clipPath, any settings on x, y or transform does not
     9        transform the clipPath it references.
     10        The use-element just misses this transformation in toClipPath.
     11
     12        Test: svg/custom/use-on-clip-path-with-transformation.svg
     13
     14        * platform/graphics/cairo/PathCairo.cpp: Gtk port translated the path to the wrong direction.
     15        (WebCore::Path::translate):
     16        * svg/SVGUseElement.cpp:
     17        (WebCore::SVGUseElement::toClipPath):
     18
    1192010-02-25  Jian Li  <jianli@chromium.org>
    220
  • trunk/WebCore/platform/graphics/cairo/PathCairo.cpp

    r54503 r55259  
    9090{
    9191    cairo_t* cr = platformPath()->m_cr;
    92     cairo_translate(cr, p.width(), p.height());
     92    cairo_translate(cr, -p.width(), -p.height());
    9393}
    9494
  • trunk/WebCore/svg/SVGUseElement.cpp

    r54009 r55259  
    593593            // Spec: Indirect references are an error (14.3.5)
    594594            document()->accessSVGExtensions()->reportError("Not allowed to use indirect reference in <clip-path>");
    595         else
    596             return static_cast<SVGStyledTransformableElement*>(n)->toClipPath();
     595        else {
     596            Path clipPath = static_cast<SVGStyledTransformableElement*>(n)->toClipPath();
     597            clipPath.translate(FloatSize(x().value(this), y().value(this)));
     598            clipPath.transform(animatedLocalTransform());
     599            return clipPath;
     600        }
    597601    }
    598602
Note: See TracChangeset for help on using the changeset viewer.