| 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "core/svg/SVGTransformTearOff.h" | 31 #include "core/svg/SVGTransformTearOff.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 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 SVGTransformTearOff::SVGTransformTearOff(PassRefPtrWillBeRawPtr<SVGTransform> ta
rget, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const
QualifiedName& attributeName) | 39 SVGTransformTearOff::SVGTransformTearOff(RawPtr<SVGTransform> target, SVGElement
* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName&
attributeName) |
| 40 : SVGPropertyTearOff<SVGTransform>(target, contextElement, propertyIsAnimVal
, attributeName) | 40 : SVGPropertyTearOff<SVGTransform>(target, contextElement, propertyIsAnimVal
, attributeName) |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 SVGTransformTearOff::~SVGTransformTearOff() | 44 SVGTransformTearOff::~SVGTransformTearOff() |
| 45 { | 45 { |
| 46 } | 46 } |
| 47 | 47 |
| 48 DEFINE_TRACE(SVGTransformTearOff) | 48 DEFINE_TRACE(SVGTransformTearOff) |
| 49 { | 49 { |
| 50 visitor->trace(m_matrixTearoff); | 50 visitor->trace(m_matrixTearoff); |
| 51 SVGPropertyTearOff<SVGTransform>::trace(visitor); | 51 SVGPropertyTearOff<SVGTransform>::trace(visitor); |
| 52 } | 52 } |
| 53 | 53 |
| 54 SVGMatrixTearOff* SVGTransformTearOff::matrix() | 54 SVGMatrixTearOff* SVGTransformTearOff::matrix() |
| 55 { | 55 { |
| 56 if (!m_matrixTearoff) { | 56 if (!m_matrixTearoff) { |
| 57 m_matrixTearoff = SVGMatrixTearOff::create(this); | 57 m_matrixTearoff = SVGMatrixTearOff::create(this); |
| 58 } | 58 } |
| 59 | 59 |
| 60 return m_matrixTearoff.get(); | 60 return m_matrixTearoff.get(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void SVGTransformTearOff::setMatrix(PassRefPtrWillBeRawPtr<SVGMatrixTearOff> mat
rix, ExceptionState& exceptionState) | 63 void SVGTransformTearOff::setMatrix(RawPtr<SVGMatrixTearOff> matrix, ExceptionSt
ate& exceptionState) |
| 64 { | 64 { |
| 65 if (isImmutable()) { | 65 if (isImmutable()) { |
| 66 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); | 66 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); |
| 67 return; | 67 return; |
| 68 } | 68 } |
| 69 | 69 |
| 70 target()->setMatrix(matrix->value()); | 70 target()->setMatrix(matrix->value()); |
| 71 commitChange(); | 71 commitChange(); |
| 72 } | 72 } |
| 73 | 73 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 if (isImmutable()) { | 120 if (isImmutable()) { |
| 121 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); | 121 exceptionState.throwDOMException(NoModificationAllowedError, "The attrib
ute is read-only."); |
| 122 return; | 122 return; |
| 123 } | 123 } |
| 124 | 124 |
| 125 target()->setSkewY(y); | 125 target()->setSkewY(y); |
| 126 commitChange(); | 126 commitChange(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace blink | 129 } // namespace blink |
| OLD | NEW |