-
timothy_horton@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=95517 <rdar://problem/12175583> Reviewed by Brady Eidson. Previously, SVG animations would cease to animate when their parent <svg> element was removed and re-added to the document. Instead, to match Firefox and Opera, we should continue the animation with the same beginTime (i.e. the animation continues as if it had never been removed from the document). Test: svg/animations/reinserting-svg-into-document.html * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::insertedInto): Don't call begin() on an already-started SMILTimeContainer(). * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::isStarted): Added. * svg/animation/SMILTimeContainer.h: Add isStarted(). * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::insertedInto): Always reschedule SVGSMILElements with their parent SMILTimeContainer when they are inserted into the document, otherwise they are lost (and never again update) when their subtree is removed and then readded to the document. Add a test that ensures that removing an SVG element from the document and readding it continues SMIL animations. * svg/animations/reinserting-svg-into-document.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
85558650