Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAnimateElement.h

Issue 2602423002: Push attributeName handling down into SVGAnimateElement (Closed)
Patch Set: Remove excess space Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 float calculateDistance(const String& fromString, 72 float calculateDistance(const String& fromString,
73 const String& toString) final; 73 const String& toString) final;
74 bool isAdditive() final; 74 bool isAdditive() final;
75 75
76 void parseAttribute(const QualifiedName&, 76 void parseAttribute(const QualifiedName&,
77 const AtomicString&, 77 const AtomicString&,
78 const AtomicString&) override; 78 const AtomicString&) override;
79 void svgAttributeChanged(const QualifiedName&) override; 79 void svgAttributeChanged(const QualifiedName&) override;
80 80
81 void setTargetElement(SVGElement*) final; 81 void setTargetElement(SVGElement*) final;
82 void setAttributeName(const QualifiedName&) final; 82 void setAttributeName(const QualifiedName&);
83 83
84 enum AttributeType { AttributeTypeCSS, AttributeTypeXML, AttributeTypeAuto }; 84 enum AttributeType { AttributeTypeCSS, AttributeTypeXML, AttributeTypeAuto };
85 AttributeType getAttributeType() const { return m_attributeType; } 85 AttributeType getAttributeType() const { return m_attributeType; }
86 86
87 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, 87 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest,
88 stringsShouldNotSupportAddition); 88 stringsShouldNotSupportAddition);
89 89
90 private: 90 private:
91 void resetAnimatedPropertyType(); 91 void resetAnimatedPropertyType();
92 92
93 bool shouldApplyAnimation(const SVGElement& targetElement, 93 bool shouldApplyAnimation(const SVGElement& targetElement,
94 const QualifiedName& attributeName); 94 const QualifiedName& attributeName);
95 95
96 void setAttributeType(const AtomicString&); 96 void setAttributeType(const AtomicString&);
97 97
98 InsertionNotificationRequest insertedInto(ContainerNode*) final;
99 void removedFrom(ContainerNode*) final;
100
98 void checkInvalidCSSAttributeType(); 101 void checkInvalidCSSAttributeType();
99 bool hasValidAttributeName() const; 102 bool hasValidAttributeName() const;
100 103
101 virtual void resolveTargetProperty(); 104 virtual void resolveTargetProperty();
102 void clearTargetProperty(); 105 void clearTargetProperty();
103 106
104 virtual SVGPropertyBase* createPropertyForAnimation(const String&) const; 107 virtual SVGPropertyBase* createPropertyForAnimation(const String&) const;
105 SVGPropertyBase* createPropertyForAttributeAnimation(const String&) const; 108 SVGPropertyBase* createPropertyForAttributeAnimation(const String&) const;
106 SVGPropertyBase* createPropertyForCSSAnimation(const String&) const; 109 SVGPropertyBase* createPropertyForCSSAnimation(const String&) const;
107 110
(...skipping 26 matching lines...) Expand all
134 return element.hasTagName(SVGNames::animateTag) || 137 return element.hasTagName(SVGNames::animateTag) ||
135 element.hasTagName(SVGNames::animateTransformTag) || 138 element.hasTagName(SVGNames::animateTransformTag) ||
136 element.hasTagName(SVGNames::setTag); 139 element.hasTagName(SVGNames::setTag);
137 } 140 }
138 141
139 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); 142 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement);
140 143
141 } // namespace blink 144 } // namespace blink
142 145
143 #endif // SVGAnimateElement_h 146 #endif // SVGAnimateElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698