Changeset 90345 in webkit


Ignore:
Timestamp:
Jul 3, 2011 1:22:22 PM (13 years ago)
Author:
krit@webkit.org
Message:

2011-07-03 Dirk Schulze <krit@webkit.org>

SVGAnimateTransform accumulate=sum restarts on every repeat
https://bugs.webkit.org/show_bug.cgi?id=63876

Reviewed by Nikolas Zimmermann.


Test accumulate=sum on SVGAnimateTransform. The animation shouldn't start with initial value
on every repeat for accumulation.

  • svg/animations/script-tests/svgtransform-animation-1.js: Added. (sample1): (sample2): (sample3): (executeTest):
  • svg/animations/svgtransform-animation-1-expected.txt: Added.
  • svg/animations/svgtransform-animation-1.html: Added.

2011-07-03 Dirk Schulze <krit@webkit.org>

SVGAnimateTransform accumulate=sum restarts on every repeat
https://bugs.webkit.org/show_bug.cgi?id=63876

Reviewed by Nikolas Zimmermann.


We applied transforms from previous animation repeats to a transform list. The problem is, that we calculated the current
transform based on the percentage of the current repeat count. This causes an animation starting from scale level 0
on every repeat. Now I add the repeat count to the current percentage, so that the distance calculation starts from 100% on
the first repeat, from 200% on the second and so on.

Test: svg/animations/svgtransform-animation-1.html

  • svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90344 r90345  
     12011-07-03  Dirk Schulze  <krit@webkit.org>
     2
     3        SVGAnimateTransform accumulate=sum restarts on every repeat
     4        https://bugs.webkit.org/show_bug.cgi?id=63876
     5
     6        Reviewed by Nikolas Zimmermann.
     7       
     8        Test accumulate=sum on SVGAnimateTransform. The animation shouldn't start with initial value
     9        on every repeat for accumulation.
     10
     11        * svg/animations/script-tests/svgtransform-animation-1.js: Added.
     12        (sample1):
     13        (sample2):
     14        (sample3):
     15        (executeTest):
     16        * svg/animations/svgtransform-animation-1-expected.txt: Added.
     17        * svg/animations/svgtransform-animation-1.html: Added.
     18
    1192011-07-03  Sheriff Bot  <webkit.review.bot@gmail.com>
    220
  • trunk/LayoutTests/platform/wk2/Skipped

    r90330 r90345  
    494494svg/animations/svgrect-animation-1.html
    495495svg/animations/svgrect-animation-2.html
     496svg/animations/svgtransform-animation-1.html
    496497svg/animations/svgstring-animation-fallback-to-discrete.html
    497498svg/custom/absolute-sized-content-with-resources.xhtml
  • trunk/Source/WebCore/ChangeLog

    r90344 r90345  
     12011-07-03  Dirk Schulze  <krit@webkit.org>
     2
     3        SVGAnimateTransform accumulate=sum restarts on every repeat
     4        https://bugs.webkit.org/show_bug.cgi?id=63876
     5
     6        Reviewed by Nikolas Zimmermann.
     7       
     8        We applied transforms from previous animation repeats to a transform list. The problem is, that we calculated the current
     9        transform based on the percentage of the current repeat count. This causes an animation starting from scale level 0
     10        on every repeat. Now I add the repeat count to the current percentage, so that the distance calculation starts from 100% on
     11        the first repeat, from 200% on the second and so on.
     12
     13        Test: svg/animations/svgtransform-animation-1.html
     14
     15        * svg/SVGAnimateTransformElement.cpp:
     16        (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
     17
    1182011-07-03  Sheriff Bot  <webkit.review.bot@gmail.com>
    219
  • trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp

    r88637 r90345  
    162162    if (!isAdditive())
    163163        transformList->clear();
    164     if (isAccumulated() && repeat) {
    165         SVGTransform accumulatedTransform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(repeat).addToSVGTransform(SVGTransform());
    166         transformList->append(accumulatedTransform);
    167     }
     164    if (isAccumulated() && repeat)
     165        percentage += repeat;
    168166    SVGTransform transform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(percentage).addToSVGTransform(m_fromTransform);
    169167    transformList->append(transform);
Note: See TracChangeset for help on using the changeset viewer.