Accumulate SVG animations into first contributing element
authorpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 May 2012 20:58:04 +0000 (20:58 +0000)
committerpdr@google.com <pdr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 May 2012 20:58:04 +0000 (20:58 +0000)
commit6a47091006fc97c381528a28cb9630552baad288
treeb1262c475997d07c1c2f9191480171ceeb3ec378
parente076fda7d51bdc0071e04c419d57cd93705951df
Accumulate SVG animations into first contributing element
https://bugs.webkit.org/show_bug.cgi?id=86385

Reviewed by Nikolas Zimmermann.

Source/WebCore:

Previously we were accumulating animations into the first animation element when
there were multiple animations for a single element. This crashed if the first
animation ended first because the first animation was prematurely cleaned up.
This change accumulates animations into the first _contributing_ animation element.

Tests: svg/animations/multiple-animations-ending.html
       svg/animations/svg-two-animate-elements-crash-expected.svg
       svg/animations/svg-two-animate-elements-crash.svg

* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateAnimations):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::progress):

LayoutTests:

* svg/animations/multiple-animations-ending-expected.txt: Added.
* svg/animations/multiple-animations-ending.html: Added.
* svg/animations/resources/multiple-animations-ending.svg: Added.
* svg/animations/script-tests/multiple-animations-ending.js: Added.
(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(sample6):
(sample7):
(sample8):
(sample9):
(sample10):
(sample11):
(sample12):
(sample13):
(sample14):
(sample15):
(sample16):
(sample17):
(sample18):
(sample19):
(sample20):
(sample21):
(sample22):
(sample23):
(executeTest):
* svg/animations/svg-two-animate-elements-crash-expected.svg: Added.
* svg/animations/svg-two-animate-elements-crash.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/animations/multiple-animations-ending-expected.txt [new file with mode: 0644]
LayoutTests/svg/animations/multiple-animations-ending.html [new file with mode: 0644]
LayoutTests/svg/animations/resources/multiple-animations-ending.svg [new file with mode: 0644]
LayoutTests/svg/animations/script-tests/multiple-animations-ending.js [new file with mode: 0644]
LayoutTests/svg/animations/svg-two-animate-elements-crash-expected.svg [new file with mode: 0644]
LayoutTests/svg/animations/svg-two-animate-elements-crash.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/animation/SMILTimeContainer.cpp
Source/WebCore/svg/animation/SVGSMILElement.cpp