Changeset 117711 in webkit
- Timestamp:
- May 20, 2012 1:58:04 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117709 r117711 1 2012-05-20 Philip Rogers <pdr@google.com> 2 3 Accumulate SVG animations into first contributing element 4 https://bugs.webkit.org/show_bug.cgi?id=86385 5 6 Reviewed by Nikolas Zimmermann. 7 8 * svg/animations/multiple-animations-ending-expected.txt: Added. 9 * svg/animations/multiple-animations-ending.html: Added. 10 * svg/animations/resources/multiple-animations-ending.svg: Added. 11 * svg/animations/script-tests/multiple-animations-ending.js: Added. 12 (sample1): 13 (sample2): 14 (sample3): 15 (sample4): 16 (sample5): 17 (sample6): 18 (sample7): 19 (sample8): 20 (sample9): 21 (sample10): 22 (sample11): 23 (sample12): 24 (sample13): 25 (sample14): 26 (sample15): 27 (sample16): 28 (sample17): 29 (sample18): 30 (sample19): 31 (sample20): 32 (sample21): 33 (sample22): 34 (sample23): 35 (executeTest): 36 * svg/animations/svg-two-animate-elements-crash-expected.svg: Added. 37 * svg/animations/svg-two-animate-elements-crash.svg: Added. 38 1 39 2012-05-20 Philip Rogers <pdr@google.com> 2 40 -
trunk/Source/WebCore/ChangeLog
r117709 r117711 1 2012-05-20 Philip Rogers <pdr@google.com> 2 3 Accumulate SVG animations into first contributing element 4 https://bugs.webkit.org/show_bug.cgi?id=86385 5 6 Reviewed by Nikolas Zimmermann. 7 8 Previously we were accumulating animations into the first animation element when 9 there were multiple animations for a single element. This crashed if the first 10 animation ended first because the first animation was prematurely cleaned up. 11 This change accumulates animations into the first _contributing_ animation element. 12 13 Tests: svg/animations/multiple-animations-ending.html 14 svg/animations/svg-two-animate-elements-crash-expected.svg 15 svg/animations/svg-two-animate-elements-crash.svg 16 17 * svg/animation/SMILTimeContainer.cpp: 18 (WebCore::SMILTimeContainer::updateAnimations): 19 * svg/animation/SVGSMILElement.cpp: 20 (WebCore::SVGSMILElement::progress): 21 1 22 2012-05-20 Philip Rogers <pdr@google.com> 2 23 -
trunk/Source/WebCore/svg/animation/SMILTimeContainer.cpp
r116451 r117711 242 242 } 243 243 244 // Results are accumulated to the first animation that animates a particular element/attribute pair.244 // Results are accumulated to the first animation that animates and contributes to a particular element/attribute pair. 245 245 ElementAttributePair key(targetElement, attributeName); 246 246 SVGSMILElement* resultElement = resultsElements.get(key).get(); 247 bool accumulatedResultElement = false; 247 248 if (!resultElement) { 248 249 if (!animation->hasValidAttributeType()) … … 250 251 resultElement = animation; 251 252 resultsElements.add(key, resultElement); 253 accumulatedResultElement = true; 252 254 } 253 255 … … 255 257 if (animation->progress(elapsed, resultElement, seekToTime)) 256 258 contributingElements.add(resultElement); 259 else if (accumulatedResultElement) 260 resultsElements.remove(key); 257 261 258 262 SMILTime nextFireTime = animation->nextProgressTime(); -
trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp
r117195 r117711 1056 1056 bool animationIsContributing = isContributing(elapsed); 1057 1057 1058 // Only reset the animated type to the base value once for the lowest priority animation that animates a particular element/attribute pair.1059 if (this == resultElement )1058 // Only reset the animated type to the base value once for the lowest priority animation that animates and contributes to a particular element/attribute pair. 1059 if (this == resultElement && animationIsContributing) 1060 1060 resetAnimatedType(); 1061 1061
Note: See TracChangeset
for help on using the changeset viewer.