Changeset 95907 in webkit
- Timestamp:
- Sep 24, 2011 1:17:38 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95906 r95907 1 2011-09-24 Young Han Lee <joybro@company100.net> 2 3 SVGAnimation does not support 'values' for from-to animations 4 https://bugs.webkit.org/show_bug.cgi?id=64859 5 6 Reviewed by Dirk Schulze. 7 8 If from-to animation have discrete calc-mode and have a 'keyTimes' list, values of 9 the keyTimes indicate the begin and the end of the animation respectively.[1][2] 10 11 When keyTimes is given, calculate the progress percentage of the animation with it 12 even for from-to animation. 13 14 [1] http://www.w3.org/TR/SVG/animate.html#ValueAttributes 15 [2] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues 16 17 * svg/animations/animate-from-to-keyTimes-expected.txt: Added. 18 * svg/animations/animate-from-to-keyTimes.html: Added. 19 * svg/animations/script-tests/animate-from-to-keyTimes.js: Added. 20 (sample1): 21 (sample2): 22 (executeTest): 23 1 24 2011-09-23 Chris Fleizach <cfleizach@apple.com> 2 25 -
trunk/Source/WebCore/ChangeLog
r95906 r95907 1 2011-09-24 Young Han Lee <joybro@company100.net> 2 3 SVGAnimation does not support 'values' for from-to animations 4 https://bugs.webkit.org/show_bug.cgi?id=64859 5 6 Reviewed by Dirk Schulze. 7 8 If from-to animation have discrete calc-mode and have a 'keyTimes' list, values of 9 the keyTimes indicate the begin and the end of the animation respectively.[1][2] 10 11 When keyTimes is given, calculate the progress percentage of the animation with it 12 even for from-to animation. 13 14 [1] http://www.w3.org/TR/SVG/animate.html#ValueAttributes 15 [2] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues 16 17 Test: svg/animations/animate-from-to-keyTimes.html 18 19 * svg/SVGAnimationElement.cpp: 20 (WebCore::SVGAnimationElement::calculatePercentForFromTo): 21 (WebCore::SVGAnimationElement::updateAnimation): 22 * svg/SVGAnimationElement.h: 23 1 24 2011-09-23 Chris Fleizach <cfleizach@apple.com> 2 25 -
trunk/Source/WebCore/svg/SVGAnimationElement.cpp
r95216 r95907 462 462 return (toKeyPoint - fromKeyPoint) * keyPointPercent + fromKeyPoint; 463 463 } 464 465 float SVGAnimationElement::calculatePercentForFromTo(float percent) const 466 { 467 if (calcMode() == CalcModeDiscrete && m_keyTimes.size() == 2) 468 return percent > m_keyTimes[1] ? 1 : 0; 469 470 return percent; 471 } 464 472 465 473 void SVGAnimationElement::currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const … … 609 617 else if (m_keyPoints.isEmpty() && mode == CalcModeSpline && m_keyTimes.size() > 1) 610 618 effectivePercent = calculatePercentForSpline(percent, calculateKeyTimesIndex(percent)); 619 else if (animationMode() == FromToAnimation || animationMode() == ToAnimation) 620 effectivePercent = calculatePercentForFromTo(percent); 611 621 else 612 622 effectivePercent = percent; -
trunk/Source/WebCore/svg/SVGAnimationElement.h
r95216 r95907 121 121 void currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const; 122 122 float calculatePercentForSpline(float percent, unsigned splineIndex) const; 123 float calculatePercentForFromTo(float percent) const; 123 124 unsigned calculateKeyTimesIndex(float percent) const; 124 125
Note: See TracChangeset
for help on using the changeset viewer.