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

Unified Diff: Source/core/svg/SVGAngle.cpp

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/SVGAngle.h ('k') | Source/core/svg/SVGAngle.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAngle.cpp
diff --git a/Source/core/svg/SVGAngle.cpp b/Source/core/svg/SVGAngle.cpp
index 13da95b2256ad8626ee0400c070b6ef98798074b..0b06b1c7b7288f9c07d91201c0a76dc20487b295 100644
--- a/Source/core/svg/SVGAngle.cpp
+++ b/Source/core/svg/SVGAngle.cpp
@@ -58,6 +58,12 @@ SVGMarkerOrientEnumeration::~SVGMarkerOrientEnumeration()
{
}
+void SVGMarkerOrientEnumeration::trace(Visitor* visitor)
+{
+ visitor->trace(m_angle);
+ SVGEnumeration<SVGMarkerOrientType>::trace(visitor);
+}
+
void SVGMarkerOrientEnumeration::notifyChange()
{
ASSERT(m_angle);
@@ -70,13 +76,13 @@ void SVGMarkerOrientEnumeration::add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SV
ASSERT_NOT_REACHED();
}
-void SVGMarkerOrientEnumeration::calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBase> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement)
+void SVGMarkerOrientEnumeration::calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement)
{
// SVGMarkerOrientEnumeration is only animated via SVGAngle
ASSERT_NOT_REACHED();
}
-float SVGMarkerOrientEnumeration::calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement)
+float SVGMarkerOrientEnumeration::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGElement* contextElement)
{
// SVGMarkerOrientEnumeration is only animated via SVGAngle
ASSERT_NOT_REACHED();
@@ -102,9 +108,15 @@ SVGAngle::~SVGAngle()
{
}
-PassRefPtr<SVGAngle> SVGAngle::clone() const
+void SVGAngle::trace(Visitor* visitor)
+{
+ visitor->trace(m_orientType);
+ SVGPropertyHelper<SVGAngle>::trace(visitor);
+}
+
+PassRefPtrWillBeRawPtr<SVGAngle> SVGAngle::clone() const
{
- return adoptRef(new SVGAngle(m_unitType, m_valueInSpecifiedUnits, m_orientType->enumValue()));
+ return adoptRefWillBeNoop(new SVGAngle(m_unitType, m_valueInSpecifiedUnits, m_orientType->enumValue()));
}
float SVGAngle::value() const
@@ -362,7 +374,7 @@ void SVGAngle::convertToSpecifiedUnits(SVGAngleType unitType, ExceptionState& ex
void SVGAngle::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
{
- RefPtr<SVGAngle> otherAngle = toSVGAngle(other);
+ RefPtrWillBeRawPtr<SVGAngle> otherAngle = toSVGAngle(other);
// Only respect by animations, if from and by are both specified in angles (and not eg. 'auto').
if (orientType()->enumValue() != SVGMarkerOrientAngle || otherAngle->orientType()->enumValue() != SVGMarkerOrientAngle)
@@ -380,13 +392,13 @@ void SVGAngle::assign(const SVGAngle& other)
m_orientType->setEnumValue(otherOrientType);
}
-void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBase> to, PassRefPtr<SVGPropertyBase> toAtEndOfDuration, SVGElement*)
+void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuration, SVGElement*)
{
ASSERT(animationElement);
bool isToAnimation = animationElement->animationMode() == ToAnimation;
- RefPtr<SVGAngle> fromAngle = isToAnimation ? this : toSVGAngle(from);
- RefPtr<SVGAngle> toAngle = toSVGAngle(to);
+ RefPtrWillBeRawPtr<SVGAngle> fromAngle = isToAnimation ? PassRefPtrWillBeRawPtr<SVGAngle>(this) : toSVGAngle(from);
+ RefPtrWillBeRawPtr<SVGAngle> toAngle = toSVGAngle(to);
SVGMarkerOrientType fromOrientType = fromAngle->orientType()->enumValue();
SVGMarkerOrientType toOrientType = toAngle->orientType()->enumValue();
@@ -407,7 +419,7 @@ void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, flo
case SVGMarkerOrientAngle:
{
float animatedValue = value();
- RefPtr<SVGAngle> toAtEndOfDurationAngle = toSVGAngle(toAtEndOfDuration);
+ RefPtrWillBeRawPtr<SVGAngle> toAtEndOfDurationAngle = toSVGAngle(toAtEndOfDuration);
animationElement->animateAdditiveNumber(percentage, repeatCount, fromAngle->value(), toAngle->value(), toAtEndOfDurationAngle->value(), animatedValue);
orientType()->setEnumValue(SVGMarkerOrientAngle);
@@ -423,7 +435,7 @@ void SVGAngle::calculateAnimatedValue(SVGAnimationElement* animationElement, flo
}
}
-float SVGAngle::calculateDistance(PassRefPtr<SVGPropertyBase> other, SVGElement*)
+float SVGAngle::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
{
return fabsf(value() - toSVGAngle(other)->value());
}
« no previous file with comments | « Source/core/svg/SVGAngle.h ('k') | Source/core/svg/SVGAngle.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698