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

Unified Diff: Source/core/svg/SVGAngle.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/svg/SVGAElement.cpp ('k') | Source/core/svg/SVGAngle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAngle.h
diff --git a/Source/core/svg/SVGAngle.h b/Source/core/svg/SVGAngle.h
index d935d0868972916b7675bf84f94832a9f141827d..86893b1868d76d8c04132751abecd519654f7973 100644
--- a/Source/core/svg/SVGAngle.h
+++ b/Source/core/svg/SVGAngle.h
@@ -24,6 +24,7 @@
#include "core/svg/SVGEnumeration.h"
#include "core/svg/properties/SVGPropertyHelper.h"
+#include "platform/heap/Handle.h"
namespace blink {
@@ -41,24 +42,25 @@ template<> unsigned short getMaxExposedEnumValue<SVGMarkerOrientType>();
class SVGMarkerOrientEnumeration : public SVGEnumeration<SVGMarkerOrientType> {
public:
- static PassRefPtr<SVGMarkerOrientEnumeration> create(SVGAngle* angle)
+ static PassRefPtrWillBeRawPtr<SVGMarkerOrientEnumeration> create(SVGAngle* angle)
{
- return adoptRef(new SVGMarkerOrientEnumeration(angle));
+ return adoptRefWillBeNoop(new SVGMarkerOrientEnumeration(angle));
}
virtual ~SVGMarkerOrientEnumeration();
virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
- virtual void calculateAnimatedValue(SVGAnimationElement*, float, unsigned, PassRefPtr<SVGPropertyBase>, PassRefPtr<SVGPropertyBase>, PassRefPtr<SVGPropertyBase>, SVGElement*) override;
- virtual float calculateDistance(PassRefPtr<SVGPropertyBase>, SVGElement*) override;
+ virtual void calculateAnimatedValue(SVGAnimationElement*, float, unsigned, PassRefPtrWillBeRawPtr<SVGPropertyBase>, PassRefPtrWillBeRawPtr<SVGPropertyBase>, PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
+ virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
+
+ virtual void trace(Visitor*) override;
private:
SVGMarkerOrientEnumeration(SVGAngle*);
virtual void notifyChange() override;
- // FIXME: oilpan: This is kept as raw-ptr to avoid reference cycles. Should be Member in oilpan.
- SVGAngle* m_angle;
+ RawPtrWillBeMember<SVGAngle> m_angle;
};
class SVGAngle : public SVGPropertyHelper<SVGAngle> {
@@ -74,9 +76,9 @@ public:
SVG_ANGLETYPE_TURN = 5
};
- static PassRefPtr<SVGAngle> create()
+ static PassRefPtrWillBeRawPtr<SVGAngle> create()
{
- return adoptRef(new SVGAngle());
+ return adoptRefWillBeNoop(new SVGAngle());
}
virtual ~SVGAngle();
@@ -98,17 +100,19 @@ public:
// SVGPropertyBase:
- PassRefPtr<SVGAngle> clone() const;
+ PassRefPtrWillBeRawPtr<SVGAngle> clone() const;
virtual String valueAsString() const override;
void setValueAsString(const String&, ExceptionState&);
virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
- virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBase> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) override;
- virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement) override;
+ virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) override;
+ virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGElement* contextElement) override;
static AnimatedPropertyType classType() { return AnimatedAngle; }
+ virtual void trace(Visitor*) override;
+
private:
SVGAngle();
SVGAngle(SVGAngleType, float, SVGMarkerOrientType);
@@ -117,12 +121,12 @@ private:
SVGAngleType m_unitType;
float m_valueInSpecifiedUnits;
- RefPtr<SVGMarkerOrientEnumeration> m_orientType;
+ RefPtrWillBeMember<SVGMarkerOrientEnumeration> m_orientType;
};
-inline PassRefPtr<SVGAngle> toSVGAngle(PassRefPtr<SVGPropertyBase> passBase)
+inline PassRefPtrWillBeRawPtr<SVGAngle> toSVGAngle(PassRefPtrWillBeRawPtr<SVGPropertyBase> passBase)
{
- RefPtr<SVGPropertyBase> base = passBase;
+ RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase;
ASSERT(base->type() == SVGAngle::classType());
return static_pointer_cast<SVGAngle>(base.release());
}
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/SVGAngle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698