| Index: Source/core/svg/SVGPointTearOff.cpp
|
| diff --git a/Source/core/svg/SVGRectTearOff.cpp b/Source/core/svg/SVGPointTearOff.cpp
|
| similarity index 68%
|
| copy from Source/core/svg/SVGRectTearOff.cpp
|
| copy to Source/core/svg/SVGPointTearOff.cpp
|
| index 64a2538c50c2656117137d6d704a5122264ff0b2..5081029c93a6f9331476f84ef3fe59882a6a9953 100644
|
| --- a/Source/core/svg/SVGRectTearOff.cpp
|
| +++ b/Source/core/svg/SVGPointTearOff.cpp
|
| @@ -30,20 +30,21 @@
|
|
|
| #include "config.h"
|
|
|
| -#include "core/svg/SVGRectTearOff.h"
|
| +#include "core/svg/SVGPointTearOff.h"
|
|
|
| #include "bindings/v8/ExceptionState.h"
|
| #include "core/dom/ExceptionCode.h"
|
| +#include "core/svg/SVGMatrix.h"
|
|
|
| namespace WebCore {
|
|
|
| -SVGRectTearOff::SVGRectTearOff(PassRefPtr<SVGRect> target, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName)
|
| - : NewSVGPropertyTearOff<SVGRect>(target, contextElement, propertyIsAnimVal, attributeName)
|
| +SVGPointTearOff::SVGPointTearOff(PassRefPtr<SVGPoint> target, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName)
|
| + : NewSVGPropertyTearOff<SVGPoint>(target, contextElement, propertyIsAnimVal, attributeName)
|
| {
|
| ScriptWrappable::init(this);
|
| }
|
|
|
| -void SVGRectTearOff::setX(float f, ExceptionState& exceptionState)
|
| +void SVGPointTearOff::setX(float f, ExceptionState& exceptionState)
|
| {
|
| if (isImmutable()) {
|
| exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| @@ -54,7 +55,7 @@ void SVGRectTearOff::setX(float f, ExceptionState& exceptionState)
|
| commitChange();
|
| }
|
|
|
| -void SVGRectTearOff::setY(float f, ExceptionState& exceptionState)
|
| +void SVGPointTearOff::setY(float f, ExceptionState& exceptionState)
|
| {
|
| if (isImmutable()) {
|
| exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| @@ -65,26 +66,10 @@ void SVGRectTearOff::setY(float f, ExceptionState& exceptionState)
|
| commitChange();
|
| }
|
|
|
| -void SVGRectTearOff::setWidth(float f, ExceptionState& exceptionState)
|
| +PassRefPtr<SVGPointTearOff> SVGPointTearOff::matrixTransform(SVGMatrix matrix)
|
| {
|
| - if (isImmutable()) {
|
| - exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| - return;
|
| - }
|
| -
|
| - target()->setWidth(f);
|
| - commitChange();
|
| -}
|
| -
|
| -void SVGRectTearOff::setHeight(float f, ExceptionState& exceptionState)
|
| -{
|
| - if (isImmutable()) {
|
| - exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| - return;
|
| - }
|
| -
|
| - target()->setHeight(f);
|
| - commitChange();
|
| + FloatPoint point = target()->matrixTransform(matrix);
|
| + return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnimVal);
|
| }
|
|
|
| }
|
|
|