| Index: Source/core/svg/SVGSVGElement.cpp
|
| diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
|
| index 70aca55658d08b54c463efbc3f7e2ae5293b9f10..96fb1cc51d19270cea1860415b834ef46c4f8edc 100644
|
| --- a/Source/core/svg/SVGSVGElement.cpp
|
| +++ b/Source/core/svg/SVGSVGElement.cpp
|
| @@ -79,6 +79,7 @@ inline SVGSVGElement::SVGSVGElement(Document& doc)
|
| , m_useCurrentView(false)
|
| , m_zoomAndPan(SVGZoomAndPanMagnify)
|
| , m_timeContainer(SMILTimeContainer::create(this))
|
| + , m_translation(SVGPoint::create())
|
| , m_weakFactory(this)
|
| {
|
| ScriptWrappable::init(this);
|
| @@ -205,9 +206,34 @@ void SVGSVGElement::setCurrentScale(float scale)
|
| frame->setPageZoomFactor(scale);
|
| }
|
|
|
| -void SVGSVGElement::setCurrentTranslate(const FloatPoint& translation)
|
| +class SVGCurrentTranslateTearOff : public SVGPointTearOff {
|
| +public:
|
| + static PassRefPtr<SVGCurrentTranslateTearOff> create(SVGSVGElement* contextElement)
|
| + {
|
| + return adoptRef(new SVGCurrentTranslateTearOff(contextElement));
|
| + }
|
| +
|
| + virtual void commitChange()
|
| + {
|
| + ASSERT(contextElement());
|
| + toSVGSVGElement(contextElement())->updateCurrentTranslate();
|
| + }
|
| +
|
| +private:
|
| + SVGCurrentTranslateTearOff(SVGSVGElement* contextElement)
|
| + : SVGPointTearOff(contextElement->m_translation, contextElement, PropertyIsNotAnimVal)
|
| + {
|
| + }
|
| +};
|
| +
|
| +PassRefPtr<SVGPointTearOff> SVGSVGElement::currentTranslateFromJavascript()
|
| +{
|
| + return SVGCurrentTranslateTearOff::create(this);
|
| +}
|
| +
|
| +void SVGSVGElement::setCurrentTranslate(const FloatPoint& point)
|
| {
|
| - m_translation = translation;
|
| + m_translation->setValue(point);
|
| updateCurrentTranslate();
|
| }
|
|
|
| @@ -393,9 +419,9 @@ SVGAngle SVGSVGElement::createSVGAngle()
|
| return SVGAngle();
|
| }
|
|
|
| -SVGPoint SVGSVGElement::createSVGPoint()
|
| +PassRefPtr<SVGPointTearOff> SVGSVGElement::createSVGPoint()
|
| {
|
| - return SVGPoint();
|
| + return SVGPointTearOff::create(SVGPoint::create(), 0, PropertyIsNotAnimVal);
|
| }
|
|
|
| SVGMatrix SVGSVGElement::createSVGMatrix()
|
|
|