| 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 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "core/svg/SVGTransformTearOff.h" | 31 #include "core/svg/SVGTransformTearOff.h" |
| 32 | 32 |
| 33 #include "core/svg/SVGElement.h" | 33 #include "core/svg/SVGElement.h" |
| 34 #include "core/svg/SVGMatrixTearOff.h" |
| 34 | 35 |
| 35 namespace blink { | 36 namespace blink { |
| 36 | 37 |
| 37 SVGTransformTearOff::SVGTransformTearOff(SVGTransform* target, SVGElement* conte
xtElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attribu
teName) | 38 SVGTransformTearOff::SVGTransformTearOff(SVGTransform* target, SVGElement* conte
xtElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attribu
teName) |
| 38 : SVGPropertyTearOff<SVGTransform>(target, contextElement, propertyIsAnimVal
, attributeName) | 39 : SVGPropertyTearOff<SVGTransform>(target, contextElement, propertyIsAnimVal
, attributeName) |
| 39 { | 40 { |
| 40 } | 41 } |
| 41 | 42 |
| 42 SVGTransformTearOff::~SVGTransformTearOff() | 43 SVGTransformTearOff::~SVGTransformTearOff() |
| 43 { | 44 { |
| 44 } | 45 } |
| 45 | 46 |
| 46 DEFINE_TRACE(SVGTransformTearOff) | 47 DEFINE_TRACE(SVGTransformTearOff) |
| 47 { | 48 { |
| 48 visitor->trace(m_matrixTearoff); | 49 visitor->trace(m_matrixTearoff); |
| 49 SVGPropertyTearOff<SVGTransform>::trace(visitor); | 50 SVGPropertyTearOff<SVGTransform>::trace(visitor); |
| 50 } | 51 } |
| 51 | 52 |
| 53 SVGTransformTearOff* SVGTransformTearOff::create(SVGMatrixTearOff* matrix) |
| 54 { |
| 55 return create(SVGTransform::create(matrix->value()), nullptr, PropertyIsNotA
nimVal); |
| 56 } |
| 57 |
| 52 SVGMatrixTearOff* SVGTransformTearOff::matrix() | 58 SVGMatrixTearOff* SVGTransformTearOff::matrix() |
| 53 { | 59 { |
| 54 if (!m_matrixTearoff) | 60 if (!m_matrixTearoff) |
| 55 m_matrixTearoff = SVGMatrixTearOff::create(this); | 61 m_matrixTearoff = SVGMatrixTearOff::create(this); |
| 56 return m_matrixTearoff.get(); | 62 return m_matrixTearoff.get(); |
| 57 } | 63 } |
| 58 | 64 |
| 59 void SVGTransformTearOff::setMatrix(SVGMatrixTearOff* matrix, ExceptionState& ex
ceptionState) | 65 void SVGTransformTearOff::setMatrix(SVGMatrixTearOff* matrix, ExceptionState& ex
ceptionState) |
| 60 { | 66 { |
| 61 if (isImmutable()) { | 67 if (isImmutable()) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 target()->setSkewY(y); | 121 target()->setSkewY(y); |
| 116 commitChange(); | 122 commitChange(); |
| 117 } | 123 } |
| 118 | 124 |
| 119 DEFINE_TRACE_WRAPPERS(SVGTransformTearOff) | 125 DEFINE_TRACE_WRAPPERS(SVGTransformTearOff) |
| 120 { | 126 { |
| 121 visitor->traceWrappers(contextElement()); | 127 visitor->traceWrappers(contextElement()); |
| 122 } | 128 } |
| 123 | 129 |
| 124 } // namespace blink | 130 } // namespace blink |
| OLD | NEW |