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

Unified Diff: Source/core/svg/LinearGradientAttributes.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp ('k') | Source/core/svg/PatternAttributes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/LinearGradientAttributes.h
diff --git a/Source/core/svg/LinearGradientAttributes.h b/Source/core/svg/LinearGradientAttributes.h
index 084f2d318706dda08823a309bf23f9802ec14b7a..4aafd012ce352939881f11865c1b4512f7507344 100644
--- a/Source/core/svg/LinearGradientAttributes.h
+++ b/Source/core/svg/LinearGradientAttributes.h
@@ -21,9 +21,13 @@
#define LinearGradientAttributes_h
#include "core/svg/GradientAttributes.h"
+#include "platform/heap/Handle.h"
namespace blink {
+
struct LinearGradientAttributes : GradientAttributes {
+ DISALLOW_ALLOCATION();
+public:
LinearGradientAttributes()
: m_x1(SVGLength::create(LengthModeWidth))
, m_y1(SVGLength::create(LengthModeWidth))
@@ -42,22 +46,30 @@ struct LinearGradientAttributes : GradientAttributes {
SVGLength* x2() const { return m_x2.get(); }
SVGLength* y2() const { return m_y2.get(); }
- void setX1(PassRefPtr<SVGLength> value) { m_x1 = value; m_x1Set = true; }
- void setY1(PassRefPtr<SVGLength> value) { m_y1 = value; m_y1Set = true; }
- void setX2(PassRefPtr<SVGLength> value) { m_x2 = value; m_x2Set = true; }
- void setY2(PassRefPtr<SVGLength> value) { m_y2 = value; m_y2Set = true; }
+ void setX1(PassRefPtrWillBeRawPtr<SVGLength> value) { m_x1 = value; m_x1Set = true; }
+ void setY1(PassRefPtrWillBeRawPtr<SVGLength> value) { m_y1 = value; m_y1Set = true; }
+ void setX2(PassRefPtrWillBeRawPtr<SVGLength> value) { m_x2 = value; m_x2Set = true; }
+ void setY2(PassRefPtrWillBeRawPtr<SVGLength> value) { m_y2 = value; m_y2Set = true; }
bool hasX1() const { return m_x1Set; }
bool hasY1() const { return m_y1Set; }
bool hasX2() const { return m_x2Set; }
bool hasY2() const { return m_y2Set; }
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(m_x1);
+ visitor->trace(m_y1);
+ visitor->trace(m_x2);
+ visitor->trace(m_y2);
+ }
+
private:
// Properties
- RefPtr<SVGLength> m_x1;
- RefPtr<SVGLength> m_y1;
- RefPtr<SVGLength> m_x2;
- RefPtr<SVGLength> m_y2;
+ RefPtrWillBeMember<SVGLength> m_x1;
+ RefPtrWillBeMember<SVGLength> m_y1;
+ RefPtrWillBeMember<SVGLength> m_x2;
+ RefPtrWillBeMember<SVGLength> m_y2;
// Property states
bool m_x1Set : 1;
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp ('k') | Source/core/svg/PatternAttributes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698