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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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/SVGGeometryElement.cpp ('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 11 matching lines...) Expand all
22 #define SVGGradientElement_h 22 #define SVGGradientElement_h
23 23
24 #include "core/SVGNames.h" 24 #include "core/SVGNames.h"
25 #include "core/svg/SVGAnimatedBoolean.h" 25 #include "core/svg/SVGAnimatedBoolean.h"
26 #include "core/svg/SVGAnimatedEnumeration.h" 26 #include "core/svg/SVGAnimatedEnumeration.h"
27 #include "core/svg/SVGAnimatedTransformList.h" 27 #include "core/svg/SVGAnimatedTransformList.h"
28 #include "core/svg/SVGElement.h" 28 #include "core/svg/SVGElement.h"
29 #include "core/svg/SVGURIReference.h" 29 #include "core/svg/SVGURIReference.h"
30 #include "core/svg/SVGUnitTypes.h" 30 #include "core/svg/SVGUnitTypes.h"
31 #include "platform/graphics/Gradient.h" 31 #include "platform/graphics/Gradient.h"
32 #include "platform/heap/Handle.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 enum SVGSpreadMethodType { 36 enum SVGSpreadMethodType {
36 SVGSpreadMethodUnknown = 0, 37 SVGSpreadMethodUnknown = 0,
37 SVGSpreadMethodPad, 38 SVGSpreadMethodPad,
38 SVGSpreadMethodReflect, 39 SVGSpreadMethodReflect,
39 SVGSpreadMethodRepeat 40 SVGSpreadMethodRepeat
40 }; 41 };
41 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGSpreadMe thodType>(); 42 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGSpreadMe thodType>();
42 43
43 class SVGGradientElement : public SVGElement, 44 class SVGGradientElement : public SVGElement,
44 public SVGURIReference { 45 public SVGURIReference {
45 DEFINE_WRAPPERTYPEINFO(); 46 DEFINE_WRAPPERTYPEINFO();
47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGGradientElement);
46 public: 48 public:
47 enum { 49 enum {
48 SVG_SPREADMETHOD_UNKNOWN = SVGSpreadMethodUnknown, 50 SVG_SPREADMETHOD_UNKNOWN = SVGSpreadMethodUnknown,
49 SVG_SPREADMETHOD_PAD = SVGSpreadMethodReflect, 51 SVG_SPREADMETHOD_PAD = SVGSpreadMethodReflect,
50 SVG_SPREADMETHOD_REFLECT = SVGSpreadMethodRepeat, 52 SVG_SPREADMETHOD_REFLECT = SVGSpreadMethodRepeat,
51 SVG_SPREADMETHOD_REPEAT = SVGSpreadMethodUnknown 53 SVG_SPREADMETHOD_REPEAT = SVGSpreadMethodUnknown
52 }; 54 };
53 55
54 Vector<Gradient::ColorStop> buildStops(); 56 Vector<Gradient::ColorStop> buildStops();
55 57
56 SVGAnimatedTransformList* gradientTransform() { return m_gradientTransform.g et(); } 58 SVGAnimatedTransformList* gradientTransform() { return m_gradientTransform.g et(); }
57 SVGAnimatedEnumeration<SVGSpreadMethodType>* spreadMethod() { return m_sprea dMethod.get(); } 59 SVGAnimatedEnumeration<SVGSpreadMethodType>* spreadMethod() { return m_sprea dMethod.get(); }
58 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* gradientUnits() { return m_gradientUnits.get(); } 60 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* gradientUnits() { return m_gradientUnits.get(); }
59 61
62 virtual void trace(Visitor*) override;
63
60 protected: 64 protected:
61 SVGGradientElement(const QualifiedName&, Document&); 65 SVGGradientElement(const QualifiedName&, Document&);
62 66
63 bool isSupportedAttribute(const QualifiedName&); 67 bool isSupportedAttribute(const QualifiedName&);
64 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
65 virtual void svgAttributeChanged(const QualifiedName&) override; 69 virtual void svgAttributeChanged(const QualifiedName&) override;
66 70
67 private: 71 private:
68 virtual bool needsPendingResourceHandling() const override final { return fa lse; } 72 virtual bool needsPendingResourceHandling() const override final { return fa lse; }
69 73
70 virtual void childrenChanged(const ChildrenChange&) override final; 74 virtual void childrenChanged(const ChildrenChange&) override final;
71 75
72 RefPtr<SVGAnimatedTransformList> m_gradientTransform; 76 RefPtrWillBeMember<SVGAnimatedTransformList> m_gradientTransform;
73 RefPtr<SVGAnimatedEnumeration<SVGSpreadMethodType> > m_spreadMethod; 77 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGSpreadMethodType> > m_spreadMet hod;
74 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_gradientUnits; 78 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_gra dientUnits;
75 }; 79 };
76 80
77 inline bool isSVGGradientElement(const SVGElement& element) 81 inline bool isSVGGradientElement(const SVGElement& element)
78 { 82 {
79 return element.hasTagName(SVGNames::radialGradientTag) || element.hasTagName (SVGNames::linearGradientTag); 83 return element.hasTagName(SVGNames::radialGradientTag) || element.hasTagName (SVGNames::linearGradientTag);
80 } 84 }
81 85
82 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGradientElement); 86 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGradientElement);
83 87
84 } // namespace blink 88 } // namespace blink
85 89
86 #endif // SVGGradientElement_h 90 #endif // SVGGradientElement_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGGeometryElement.cpp ('k') | Source/core/svg/SVGGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698