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

Unified Diff: Source/core/svg/SVGLength.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/SVGLength.h ('k') | Source/core/svg/SVGLength.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLength.cpp
diff --git a/Source/core/svg/SVGLength.cpp b/Source/core/svg/SVGLength.cpp
index 5145b70671bf55823b54196caabc6435f15a27e2..3c928704dc21593d6dd2cd672f1f622760e1dea7 100644
--- a/Source/core/svg/SVGLength.cpp
+++ b/Source/core/svg/SVGLength.cpp
@@ -130,14 +130,14 @@ SVGLength::SVGLength(const SVGLength& o)
{
}
-PassRefPtr<SVGLength> SVGLength::clone() const
+PassRefPtrWillBeRawPtr<SVGLength> SVGLength::clone() const
{
- return adoptRef(new SVGLength(*this));
+ return adoptRefWillBeNoop(new SVGLength(*this));
}
-PassRefPtr<SVGPropertyBase> SVGLength::cloneForAnimation(const String& value) const
+PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGLength::cloneForAnimation(const String& value) const
{
- RefPtr<SVGLength> length = create();
+ RefPtrWillBeRawPtr<SVGLength> length = create();
length->m_unitMode = m_unitMode;
length->m_unitType = m_unitType;
@@ -262,7 +262,7 @@ void SVGLength::convertToSpecifiedUnits(SVGLengthType type, const SVGLengthConte
m_unitType = originalType;
}
-PassRefPtr<SVGLength> SVGLength::fromCSSPrimitiveValue(CSSPrimitiveValue* value)
+PassRefPtrWillBeRawPtr<SVGLength> SVGLength::fromCSSPrimitiveValue(CSSPrimitiveValue* value)
{
ASSERT(value);
@@ -301,14 +301,14 @@ PassRefPtr<SVGLength> SVGLength::fromCSSPrimitiveValue(CSSPrimitiveValue* value)
break;
};
- RefPtr<SVGLength> length = SVGLength::create();
+ RefPtrWillBeRawPtr<SVGLength> length = SVGLength::create();
length->newValueSpecifiedUnits(svgType, value->getFloatValue());
return length.release();
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(PassRefPtr<SVGLength> passLength)
+PassRefPtrWillBeRawPtr<CSSPrimitiveValue> SVGLength::toCSSPrimitiveValue(PassRefPtrWillBeRawPtr<SVGLength> passLength)
{
- RefPtr<SVGLength> length = passLength;
+ RefPtrWillBeRawPtr<SVGLength> length = passLength;
CSSPrimitiveValue::UnitType cssType = CSSPrimitiveValue::CSS_UNKNOWN;
switch (length->unitType()) {
@@ -386,9 +386,9 @@ SVGLengthMode SVGLength::lengthModeForAnimatedLengthAttribute(const QualifiedNam
return LengthModeOther;
}
-PassRefPtr<SVGLength> SVGLength::blend(PassRefPtr<SVGLength> passFrom, float progress) const
+PassRefPtrWillBeRawPtr<SVGLength> SVGLength::blend(PassRefPtrWillBeRawPtr<SVGLength> passFrom, float progress) const
{
- RefPtr<SVGLength> from = passFrom;
+ RefPtrWillBeRawPtr<SVGLength> from = passFrom;
SVGLengthType toType = unitType();
SVGLengthType fromType = from->unitType();
@@ -400,7 +400,7 @@ PassRefPtr<SVGLength> SVGLength::blend(PassRefPtr<SVGLength> passFrom, float pro
|| (!from->isZero() && !isZero() && (fromType == LengthTypeEMS || fromType == LengthTypeEXS) && fromType != toType))
return clone();
- RefPtr<SVGLength> length = create();
+ RefPtrWillBeRawPtr<SVGLength> length = create();
if (fromType == LengthTypePercentage || toType == LengthTypePercentage) {
float fromPercent = from->valueAsPercentage() * 100;
@@ -444,11 +444,11 @@ void SVGLength::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement* c
setValue(value(lengthContext) + toSVGLength(other)->value(lengthContext), lengthContext, ASSERT_NO_EXCEPTION);
}
-void SVGLength::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> fromValue, PassRefPtr<SVGPropertyBase> toValue, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement)
+void SVGLength::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement)
{
- RefPtr<SVGLength> fromLength = toSVGLength(fromValue);
- RefPtr<SVGLength> toLength = toSVGLength(toValue);
- RefPtr<SVGLength> toAtEndOfDurationLength = toSVGLength(toAtEndOfDurationValue);
+ RefPtrWillBeRawPtr<SVGLength> fromLength = toSVGLength(fromValue);
+ RefPtrWillBeRawPtr<SVGLength> toLength = toSVGLength(toValue);
+ RefPtrWillBeRawPtr<SVGLength> toAtEndOfDurationLength = toSVGLength(toAtEndOfDurationValue);
SVGLengthContext lengthContext(contextElement);
float animatedNumber = value(lengthContext, IGNORE_EXCEPTION);
@@ -459,10 +459,10 @@ void SVGLength::calculateAnimatedValue(SVGAnimationElement* animationElement, fl
setValue(animatedNumber, lengthContext, ASSERT_NO_EXCEPTION);
}
-float SVGLength::calculateDistance(PassRefPtr<SVGPropertyBase> toValue, SVGElement* contextElement)
+float SVGLength::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, SVGElement* contextElement)
{
SVGLengthContext lengthContext(contextElement);
- RefPtr<SVGLength> toLength = toSVGLength(toValue);
+ RefPtrWillBeRawPtr<SVGLength> toLength = toSVGLength(toValue);
return fabsf(toLength->value(lengthContext, IGNORE_EXCEPTION) - value(lengthContext, IGNORE_EXCEPTION));
}
« no previous file with comments | « Source/core/svg/SVGLength.h ('k') | Source/core/svg/SVGLength.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698