2009-12-04 Dirk Schulze <krit@webkit.org>
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 20:19:50 +0000 (20:19 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Dec 2009 20:19:50 +0000 (20:19 +0000)
commitce950ac3107bdb8760ef19c29c0747a0c293c6c0
tree12e4f90dbe9ab8a8811b57185c9c433fd96d9d68
parent634fe0d7c5bb027c881141544d849b1e452afcad
2009-12-04  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        Gradient SVG animation demonstrates tearing at animation extremes
        https://bugs.webkit.org/show_bug.cgi?id=11929

        The focalPoint of a radial gradient is temporarly substracted by
        the centralPoint, if the focalPoint is not in the radius of the
        gradient. This is needed to calculate a new postion of the focalPoint
        according to the specification. But the new focalPoint needs to be
        moved by the centralPoint after this calculation, which is not the case
        at the moment. This patch fixes this issue. It was also introduced a
        deviation of maximal 0.2% for Cairo to get around the fixed point numbers
        in Cairo.

        W3C-SVG-1.1/pservers-grad-13-b needed an update. The missing adjustment
        of the new focalPoint caused wrong results for the last three tests.

        Test: svg/custom/radial-gradient-with-outstanding-focalPoint.svg

        * svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):

        Gradient SVG animation demonstrates tearing at animation extremes
        https://bugs.webkit.org/show_bug.cgi?id=11929

        In SVG a focalPoint must be inside the radius of a radial gradient.
        It this isn't the case, we have to move the focalPoint into the radius.
        This checks the correct behavior of WebKit on false values for fx, fy.

        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png:
        * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum: Added.
        * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png: Added.
        * platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.txt: Added.
        * svg/custom/radial-gradient-with-outstanding-focalPoint.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png
LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/custom/radial-gradient-with-outstanding-focalPoint-expected.txt [new file with mode: 0644]
LayoutTests/svg/custom/radial-gradient-with-outstanding-focalPoint.svg [new file with mode: 0644]
WebCore/ChangeLog
WebCore/svg/SVGRadialGradientElement.cpp