| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "core/svg/SVGPointTearOff.h" | 31 #include "core/svg/SVGPointTearOff.h" |
| 32 | 32 |
| 33 #include "bindings/core/v8/ExceptionState.h" | 33 #include "bindings/core/v8/ExceptionState.h" |
| 34 #include "core/dom/ExceptionCode.h" | 34 #include "core/dom/ExceptionCode.h" |
| 35 #include "core/svg/SVGElement.h" | 35 #include "core/svg/SVGElement.h" |
| 36 #include "core/svg/SVGMatrixTearOff.h" | 36 #include "core/svg/SVGMatrixTearOff.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 SVGPointTearOff::SVGPointTearOff(PassRefPtrWillBeRawPtr<SVGPoint> target, SVGEle
ment* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedNa
me& attributeName) | 40 SVGPointTearOff::SVGPointTearOff(RawPtr<SVGPoint> target, SVGElement* contextEle
ment, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeNam
e) |
| 41 : SVGPropertyTearOff<SVGPoint>(target, contextElement, propertyIsAnimVal, at
tributeName) | 41 : SVGPropertyTearOff<SVGPoint>(target, contextElement, propertyIsAnimVal, at
tributeName) |
| 42 { | 42 { |
| 43 } | 43 } |
| 44 | 44 |
| 45 void SVGPointTearOff::setX(float f, ExceptionState& exceptionState) | 45 void SVGPointTearOff::setX(float f, ExceptionState& exceptionState) |
| 46 { | 46 { |
| 47 if (isImmutable()) { | 47 if (isImmutable()) { |
| 48 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); | 48 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); |
| 49 return; | 49 return; |
| 50 } | 50 } |
| 51 | 51 |
| 52 target()->setX(f); | 52 target()->setX(f); |
| 53 commitChange(); | 53 commitChange(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void SVGPointTearOff::setY(float f, ExceptionState& exceptionState) | 56 void SVGPointTearOff::setY(float f, ExceptionState& exceptionState) |
| 57 { | 57 { |
| 58 if (isImmutable()) { | 58 if (isImmutable()) { |
| 59 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); | 59 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); |
| 60 return; | 60 return; |
| 61 } | 61 } |
| 62 | 62 |
| 63 target()->setY(f); | 63 target()->setY(f); |
| 64 commitChange(); | 64 commitChange(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 PassRefPtrWillBeRawPtr<SVGPointTearOff> SVGPointTearOff::matrixTransform(PassRef
PtrWillBeRawPtr<SVGMatrixTearOff> matrix) | 67 RawPtr<SVGPointTearOff> SVGPointTearOff::matrixTransform(RawPtr<SVGMatrixTearOff
> matrix) |
| 68 { | 68 { |
| 69 FloatPoint point = target()->matrixTransform(matrix->value()); | 69 FloatPoint point = target()->matrixTransform(matrix->value()); |
| 70 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim
Val); | 70 return SVGPointTearOff::create(SVGPoint::create(point), 0, PropertyIsNotAnim
Val); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| OLD | NEW |