| Index: third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.cpp b/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.cpp
|
| index 059f35b388e618bfc840908ea092def40544027c..708d7d3347f55331e3a6eccef3066a7680a6503f 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGPreserveAspectRatioTearOff.cpp
|
| @@ -38,30 +38,28 @@ namespace blink {
|
|
|
| void SVGPreserveAspectRatioTearOff::setAlign(unsigned short align, ExceptionState& exceptionState)
|
| {
|
| - if (align == kSvgPreserveaspectratioUnknown || align > kSvgPreserveaspectratioXmaxymax) {
|
| - exceptionState.throwDOMException(NotSupportedError, "The alignment provided is invalid.");
|
| + if (isImmutable()) {
|
| + throwReadOnly(exceptionState);
|
| return;
|
| }
|
| - if (isImmutable()) {
|
| - exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| + if (align == kSvgPreserveaspectratioUnknown || align > kSvgPreserveaspectratioXmaxymax) {
|
| + exceptionState.throwDOMException(NotSupportedError, "The alignment provided is invalid.");
|
| return;
|
| }
|
| -
|
| target()->setAlign(static_cast<SVGPreserveAspectRatio::SVGPreserveAspectRatioType>(align));
|
| commitChange();
|
| }
|
|
|
| void SVGPreserveAspectRatioTearOff::setMeetOrSlice(unsigned short meetOrSlice, ExceptionState& exceptionState)
|
| {
|
| - if (meetOrSlice == kSvgMeetorsliceUnknown || meetOrSlice > kSvgMeetorsliceSlice) {
|
| - exceptionState.throwDOMException(NotSupportedError, "The meetOrSlice provided is invalid.");
|
| + if (isImmutable()) {
|
| + throwReadOnly(exceptionState);
|
| return;
|
| }
|
| - if (isImmutable()) {
|
| - exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
|
| + if (meetOrSlice == kSvgMeetorsliceUnknown || meetOrSlice > kSvgMeetorsliceSlice) {
|
| + exceptionState.throwDOMException(NotSupportedError, "The meetOrSlice provided is invalid.");
|
| return;
|
| }
|
| -
|
| target()->setMeetOrSlice(static_cast<SVGPreserveAspectRatio::SVGMeetOrSliceType>(meetOrSlice));
|
| commitChange();
|
| }
|
|
|