summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGAnimateMotionElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGAnimateMotionElement.cpp')
-rw-r--r--WebCore/svg/SVGAnimateMotionElement.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index 9a0da7f..a3f4ef9 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -28,9 +28,11 @@
#include "Attribute.h"
#include "RenderObject.h"
+#include "RenderSVGResource.h"
#include "SVGElementInstance.h"
#include "SVGMPathElement.h"
#include "SVGParserUtilities.h"
+#include "SVGPathBuilder.h"
#include "SVGPathElement.h"
#include "SVGTransformList.h"
#include <math.h>
@@ -87,7 +89,9 @@ void SVGAnimateMotionElement::parseMappedAttribute(Attribute* attr)
{
if (attr->name() == SVGNames::pathAttr) {
m_path = Path();
- pathFromSVGData(m_path, attr->value());
+ SVGPathBuilder builder(m_path);
+ // FIXME: We should analyse the returned value.
+ builder.build(attr->value());
} else
SVGAnimationElement::parseMappedAttribute(attr);
}
@@ -214,9 +218,12 @@ void SVGAnimateMotionElement::applyResultsToTarget()
{
// We accumulate to the target element transform list so there is not much to do here.
SVGElement* targetElement = this->targetElement();
- if (targetElement && targetElement->renderer())
- targetElement->renderer()->setNeedsLayout(true);
-
+ if (!targetElement)
+ return;
+
+ if (RenderObject* renderer = targetElement->renderer())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
+
// ...except in case where we have additional instances in <use> trees.
const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
@@ -228,7 +235,7 @@ void SVGAnimateMotionElement::applyResultsToTarget()
transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f());
if (RenderObject* renderer = shadowTreeElement->renderer()) {
renderer->setNeedsTransformUpdate();
- renderer->setNeedsLayout(true);
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
}
}
}
@@ -248,5 +255,3 @@ float SVGAnimateMotionElement::calculateDistance(const String& fromString, const
}
#endif // ENABLE(SVG)
-
-// vim:ts=4:noet