| Index: third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp b/third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp
|
| index 178046be9ddfa528971fe49db29a9ca3e5fdbba7..ebff1f65177f326445c48f10344a3d3bf6ab2c7d 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGLengthTearOff.cpp
|
| @@ -138,7 +138,13 @@ void SVGLengthTearOff::setValue(float value, ExceptionState& exceptionState)
|
| return;
|
| }
|
|
|
| - target()->setValueAsNumber(value);
|
| + if (target()->isRelative() && !canResolveRelativeUnits(contextElement())) {
|
| + exceptionState.throwDOMException(NotSupportedError, "Could not resolve relative length.");
|
| + return;
|
| + }
|
| +
|
| + SVGLengthContext lengthContext(contextElement());
|
| + target()->setValue(value, lengthContext);
|
| commitChange();
|
| }
|
|
|
|
|