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

Side by Side Diff: Source/core/svg/SVGGradientElement.h

Issue 153883003: [SVG] SVGAnimatedTransform{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove m_zoomAndPan Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGAnimatorFactory.h ('k') | Source/core/svg/SVGGradientElement.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, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 public: 45 public:
46 enum { 46 enum {
47 SVG_SPREADMETHOD_UNKNOWN = SVGSpreadMethodUnknown, 47 SVG_SPREADMETHOD_UNKNOWN = SVGSpreadMethodUnknown,
48 SVG_SPREADMETHOD_PAD = SVGSpreadMethodReflect, 48 SVG_SPREADMETHOD_PAD = SVGSpreadMethodReflect,
49 SVG_SPREADMETHOD_REFLECT = SVGSpreadMethodRepeat, 49 SVG_SPREADMETHOD_REFLECT = SVGSpreadMethodRepeat,
50 SVG_SPREADMETHOD_REPEAT = SVGSpreadMethodUnknown 50 SVG_SPREADMETHOD_REPEAT = SVGSpreadMethodUnknown
51 }; 51 };
52 52
53 Vector<Gradient::ColorStop> buildStops(); 53 Vector<Gradient::ColorStop> buildStops();
54 54
55 SVGAnimatedTransformList* gradientTransform() { return m_gradientTransform.g et(); }
55 SVGAnimatedEnumeration<SVGSpreadMethodType>* spreadMethod() { return m_sprea dMethod.get(); } 56 SVGAnimatedEnumeration<SVGSpreadMethodType>* spreadMethod() { return m_sprea dMethod.get(); }
56 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* gradientUnits() { return m_gradientUnits.get(); } 57 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* gradientUnits() { return m_gradientUnits.get(); }
57 58
58 protected: 59 protected:
59 SVGGradientElement(const QualifiedName&, Document&); 60 SVGGradientElement(const QualifiedName&, Document&);
60 61
61 bool isSupportedAttribute(const QualifiedName&); 62 bool isSupportedAttribute(const QualifiedName&);
62 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
63 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; 64 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
64 65
65 private: 66 private:
66 virtual bool needsPendingResourceHandling() const OVERRIDE FINAL { return fa lse; } 67 virtual bool needsPendingResourceHandling() const OVERRIDE FINAL { return fa lse; }
67 68
68 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE FINAL; 69 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE FINAL;
69 70
71 RefPtr<SVGAnimatedTransformList> m_gradientTransform;
70 RefPtr<SVGAnimatedEnumeration<SVGSpreadMethodType> > m_spreadMethod; 72 RefPtr<SVGAnimatedEnumeration<SVGSpreadMethodType> > m_spreadMethod;
71 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_gradientUnits; 73 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_gradientUnits;
72 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGradientElement) 74 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGradientElement)
73 DECLARE_ANIMATED_TRANSFORM_LIST(GradientTransform, gradientTransform)
74 END_DECLARE_ANIMATED_PROPERTIES 75 END_DECLARE_ANIMATED_PROPERTIES
75 }; 76 };
76 77
77 inline bool isSVGGradientElement(const Node& node) 78 inline bool isSVGGradientElement(const Node& node)
78 { 79 {
79 return node.hasTagName(SVGNames::radialGradientTag) || node.hasTagName(SVGNa mes::linearGradientTag); 80 return node.hasTagName(SVGNames::radialGradientTag) || node.hasTagName(SVGNa mes::linearGradientTag);
80 } 81 }
81 82
82 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGGradientElement); 83 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGGradientElement);
83 84
84 } // namespace WebCore 85 } // namespace WebCore
85 86
86 #endif 87 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimatorFactory.h ('k') | Source/core/svg/SVGGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698