OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 inline SVGAnimateTransformElement::SVGAnimateTransformElement( | 31 inline SVGAnimateTransformElement::SVGAnimateTransformElement( |
32 Document& document) | 32 Document& document) |
33 : SVGAnimateElement(SVGNames::animateTransformTag, document), | 33 : SVGAnimateElement(SVGNames::animateTransformTag, document), |
34 m_transformType(kSvgTransformUnknown) {} | 34 m_transformType(kSvgTransformUnknown) {} |
35 | 35 |
36 DEFINE_NODE_FACTORY(SVGAnimateTransformElement) | 36 DEFINE_NODE_FACTORY(SVGAnimateTransformElement) |
37 | 37 |
38 bool SVGAnimateTransformElement::hasValidAttributeType() { | 38 bool SVGAnimateTransformElement::hasValidTarget() { |
39 SVGElement* targetElement = this->targetElement(); | 39 if (!SVGAnimateElement::hasValidTarget()) |
40 if (!targetElement) | |
41 return false; | 40 return false; |
42 | |
43 if (getAttributeType() == AttributeTypeCSS) | 41 if (getAttributeType() == AttributeTypeCSS) |
44 return false; | 42 return false; |
45 | 43 return m_type == AnimatedTransformList; |
46 return animatedPropertyType() == AnimatedTransformList; | |
47 } | 44 } |
48 | 45 |
49 void SVGAnimateTransformElement::resolveTargetProperty() { | 46 void SVGAnimateTransformElement::resolveTargetProperty() { |
50 DCHECK(targetElement()); | 47 DCHECK(targetElement()); |
51 m_targetProperty = targetElement()->propertyFromAttribute(attributeName()); | 48 m_targetProperty = targetElement()->propertyFromAttribute(attributeName()); |
52 m_type = m_targetProperty ? m_targetProperty->type() : AnimatedUnknown; | 49 m_type = m_targetProperty ? m_targetProperty->type() : AnimatedUnknown; |
53 // <animateTransform> only animates AnimatedTransformList. | 50 // <animateTransform> only animates AnimatedTransformList. |
54 // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties | 51 // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties |
55 if (m_type != AnimatedTransformList) | 52 if (m_type != AnimatedTransformList) |
56 m_type = AnimatedUnknown; | 53 m_type = AnimatedUnknown; |
(...skipping 18 matching lines...) Expand all Loading... |
75 m_transformType = parseTransformType(value); | 72 m_transformType = parseTransformType(value); |
76 if (m_transformType == kSvgTransformMatrix) | 73 if (m_transformType == kSvgTransformMatrix) |
77 m_transformType = kSvgTransformUnknown; | 74 m_transformType = kSvgTransformUnknown; |
78 return; | 75 return; |
79 } | 76 } |
80 | 77 |
81 SVGAnimateElement::parseAttribute(name, oldValue, value); | 78 SVGAnimateElement::parseAttribute(name, oldValue, value); |
82 } | 79 } |
83 | 80 |
84 } // namespace blink | 81 } // namespace blink |
OLD | NEW |