Changeset 76589 in webkit
- Timestamp:
- Jan 25, 2011 5:46:18 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76588 r76589 1 2011-01-25 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVG is missing to-animation support for Path 6 https://bugs.webkit.org/show_bug.cgi?id=52982 7 8 Added an animation test to check 'to' animations in combination with SVG paths. 9 10 * svg/animations/animate-path-to-animation-expected.txt: Added. 11 * svg/animations/animate-path-to-animation.html: Added. 12 * svg/animations/script-tests/animate-path-to-animation.js: Added. 13 (sample1): 14 (sample2): 15 (sample3): 16 (executeTest): 17 1 18 2011-01-25 Nikolas Zimmermann <nzimmermann@rim.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r76587 r76589 1 2011-01-25 Dirk Schulze <krit@webkit.org> 2 3 Reviewed by Nikolas Zimmermann. 4 5 SVG is missing to-animation support for Path 6 https://bugs.webkit.org/show_bug.cgi?id=52982 7 8 SVG was missing 'to' animation support for SVG paths. Even the fallback to discrete 9 animation did not work and an assert was thrown, because of the missing m_fromPath. 10 This also influences a test of the W3C test suite. Subtest 2 of animate-elem-83-t.svg passes now. 11 12 Test: svg/animations/animate-path-to-animation.html 13 14 * svg/SVGAnimateElement.cpp: 15 (WebCore::SVGAnimateElement::calculateAnimatedValue): Take the value of the last SVGAnimateElement for 16 m_fromPath, since 'to' animations are accumulative. 17 (WebCore::SVGAnimateElement::calculateFromAndToValues): Added support for 'to' animations. 18 (WebCore::SVGAnimateElement::resetToBaseValue): Set m_animatedPath on the first animation element to baseVal. 19 * svg/SVGPathByteStream.h: 20 (WebCore::SVGPathByteStream::copySVGPathByteStream): Return copy of current byte stream. 21 1 22 2011-01-25 Pavel Feldman <pfeldman@chromium.org> 2 23 -
trunk/Source/WebCore/svg/SVGAnimateElement.cpp
r74472 r76589 139 139 AnimationMode animationMode = this->animationMode(); 140 140 if (m_propertyType == PathProperty) { 141 if (animationMode == ToAnimation) { 142 ASSERT(results->m_animatedPathPointer); 143 m_fromPath = results->m_animatedPathPointer->copy(); 144 } 141 145 if (!percentage) { 142 146 ASSERT(m_fromPath); … … 211 215 } else if (m_propertyType == PathProperty) { 212 216 SVGPathParserFactory* factory = SVGPathParserFactory::self(); 213 if (factory->buildSVGPathByteStreamFromString(fromString, m_fromPath, UnalteredParsing)) { 214 if (factory->buildSVGPathByteStreamFromString(toString, m_toPath, UnalteredParsing)) 217 if (factory->buildSVGPathByteStreamFromString(toString, m_toPath, UnalteredParsing)) { 218 // For to-animations the from number is calculated later 219 if (animationMode() == ToAnimation || factory->buildSVGPathByteStreamFromString(fromString, m_fromPath, UnalteredParsing)) 215 220 return true; 216 221 } … … 273 278 } else if (m_propertyType == PathProperty) { 274 279 m_animatedPath.clear(); 275 m_animatedPathPointer = 0; 280 SVGPathParserFactory* factory = SVGPathParserFactory::self(); 281 factory->buildSVGPathByteStreamFromString(baseString, m_animatedPath, UnalteredParsing); 282 m_animatedPathPointer = m_animatedPath.get(); 276 283 return; 277 284 } else if (m_propertyType == PointsProperty) { -
trunk/Source/WebCore/svg/SVGPathByteStream.h
r76248 r76589 52 52 } 53 53 54 PassOwnPtr<SVGPathByteStream> copy() 55 { 56 return adoptPtr(new SVGPathByteStream(m_data)); 57 } 58 54 59 typedef Vector<unsigned char> Data; 55 60 typedef Data::const_iterator DataIterator; … … 63 68 private: 64 69 SVGPathByteStream() { } 70 SVGPathByteStream(Data& data) 71 : m_data(data) 72 { 73 } 74 65 75 Data m_data; 66 76 };
Note: See TracChangeset
for help on using the changeset viewer.