summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGSVGElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGSVGElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGSVGElement.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/WebCore/svg/SVGSVGElement.cpp b/Source/WebCore/svg/SVGSVGElement.cpp
index 8cde7d516..cde9aa664 100644
--- a/Source/WebCore/svg/SVGSVGElement.cpp
+++ b/Source/WebCore/svg/SVGSVGElement.cpp
@@ -474,8 +474,15 @@ RenderObject* SVGSVGElement::createRenderer(RenderArena* arena, RenderStyle*)
Node::InsertionNotificationRequest SVGSVGElement::insertedInto(ContainerNode* rootParent)
{
- if (rootParent->inDocument())
+ if (rootParent->inDocument()) {
document()->accessSVGExtensions()->addTimeContainer(this);
+
+ // Animations are started at the end of document parsing and after firing the load event,
+ // but if we miss that train (deferred programmatic element insertion for example) we need
+ // to initialize the time container here.
+ if (!document()->parsing() && !document()->processingLoadEvent() && document()->loadEventFinished())
+ timeContainer()->begin();
+ }
return SVGStyledLocatableElement::insertedInto(rootParent);
}