Changeset 172706 in webkit


Ignore:
Timestamp:
Aug 18, 2014 10:02:13 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Fix keyTimes list length of from/to/by animations.
https://bugs.webkit.org/show_bug.cgi?id=136037

Patch by Renata Hodovan <rhodovan.u-szeged@partner.samsung.com> on 2014-08-18
Reviewed by Darin Adler.

Source/WebCore:

For from/to/by animations, the length of keyTimes and keyPoints
attribute if are specified must be equal and must have at least
2 values.

This is backport of my fix in Blink: https://codereview.chromium.org/453243003/

Test: svg/animations/invalid-keytime-number-crash.html

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::startedActiveInterval):

LayoutTests:

  • svg/animations/invalid-keytime-number-crash-expected.txt: Added.
  • svg/animations/invalid-keytime-number-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r172702 r172706  
     12014-08-18  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
     2
     3        Fix keyTimes list length of from/to/by animations.
     4        https://bugs.webkit.org/show_bug.cgi?id=136037
     5
     6        Reviewed by Darin Adler.
     7
     8        * svg/animations/invalid-keytime-number-crash-expected.txt: Added.
     9        * svg/animations/invalid-keytime-number-crash.html: Added.
     10
    1112014-08-18  Zan Dobersek  <zdobersek@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r172705 r172706  
     12014-08-18  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
     2
     3        Fix keyTimes list length of from/to/by animations.
     4        https://bugs.webkit.org/show_bug.cgi?id=136037
     5
     6        Reviewed by Darin Adler.
     7
     8        For from/to/by animations, the length of keyTimes and keyPoints
     9        attribute if are specified must be equal and must have at least
     10        2 values.
     11
     12        This is backport of my fix in Blink: https://codereview.chromium.org/453243003/
     13
     14        Test: svg/animations/invalid-keytime-number-crash.html
     15
     16        * svg/SVGAnimationElement.cpp:
     17        (WebCore::SVGAnimationElement::startedActiveInterval):
     18
    1192014-08-18  Brent Fulgham  <bfulgham@apple.com>
    220
  • trunk/Source/WebCore/svg/SVGAnimationElement.cpp

    r171591 r172706  
    585585    if (animationMode == NoAnimation)
    586586        return;
     587    if ((animationMode == FromToAnimation || animationMode == FromByAnimation || animationMode == ToAnimation || animationMode == ByAnimation)
     588        && (fastHasAttribute(SVGNames::keyPointsAttr) && fastHasAttribute(SVGNames::keyTimesAttr) && (m_keyTimes.size() < 2 || m_keyTimes.size() != m_keyPoints.size())))
     589        return;
    587590    if (animationMode == FromToAnimation)
    588591        m_animationValid = calculateFromAndToValues(from, to);
Note: See TracChangeset for help on using the changeset viewer.