Index: Source/core/animation/PathSVGInterpolation.cpp |
diff --git a/Source/core/animation/PathSVGInterpolation.cpp b/Source/core/animation/PathSVGInterpolation.cpp |
index a39f4f76d13633d363056de8878673328504e797..4a10b8057c0d175367fa48d0da1b2e1b0902a9e2 100644 |
--- a/Source/core/animation/PathSVGInterpolation.cpp |
+++ b/Source/core/animation/PathSVGInterpolation.cpp |
@@ -47,7 +47,7 @@ bool isAbsolutePathSegType(const SVGPathSeg& item) |
return isAbsolutePathSegType(static_cast<SVGPathSegType>(item.pathSegType())); |
} |
-PassOwnPtrWillBeRawPtr<InterpolableNumber> controlToInterpolableValue(double value, bool isAbsolute, double currentValue) |
+InterpolableNumber* controlToInterpolableValue(double value, bool isAbsolute, double currentValue) |
{ |
if (isAbsolute) |
return InterpolableNumber::create(value); |
@@ -63,7 +63,7 @@ double controlFromInterpolableValue(const InterpolableValue* number, bool isAbso |
return value - currentValue; |
} |
-PassOwnPtrWillBeRawPtr<InterpolableNumber> specifiedToInterpolableValue(double value, bool isAbsolute, double& currentValue) |
+InterpolableNumber* specifiedToInterpolableValue(double value, bool isAbsolute, double& currentValue) |
{ |
if (isAbsolute) |
currentValue = value; |
@@ -82,7 +82,7 @@ double specifiedFromInterpolableValue(const InterpolableValue* number, bool isAb |
return currentValue - previousValue; |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegClosePathToInterpolableValue(const SVGPathSeg& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegClosePathToInterpolableValue(const SVGPathSeg& item, SubPathCoordinates& coordinates) |
{ |
coordinates.currentX = coordinates.initialX; |
coordinates.currentY = coordinates.initialY; |
@@ -99,10 +99,10 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegClosePathFromInterpolableValue(const I |
return SVGPathSegClosePath::create(element); |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegSingleCoordinateToInterpolableValue(const SVGPathSegSingleCoordinate& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegSingleCoordinateToInterpolableValue(const SVGPathSegSingleCoordinate& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(2); |
+ InterpolableList* result = InterpolableList::create(2); |
result->set(0, specifiedToInterpolableValue(item.x(), isAbsolute, coordinates.currentX)); |
result->set(1, specifiedToInterpolableValue(item.y(), isAbsolute, coordinates.currentY)); |
@@ -112,7 +112,7 @@ PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegSingleCoordinateToInterpolableV |
coordinates.initialY = coordinates.currentY; |
} |
- return result.release(); |
+ return result; |
} |
PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegSingleCoordinateFromInterpolableValue(const InterpolableValue& value, SVGPathSegType segType, SubPathCoordinates& coordinates, SVGPathElement* element) |
@@ -147,17 +147,17 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegSingleCoordinateFromInterpolableValue( |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegCurvetoCubicToInterpolableValue(const SVGPathSegCurvetoCubic& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegCurvetoCubicToInterpolableValue(const SVGPathSegCurvetoCubic& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(6); |
+ InterpolableList* result = InterpolableList::create(6); |
result->set(0, controlToInterpolableValue(item.x1(), isAbsolute, coordinates.currentX)); |
result->set(1, controlToInterpolableValue(item.y1(), isAbsolute, coordinates.currentY)); |
result->set(2, controlToInterpolableValue(item.x2(), isAbsolute, coordinates.currentX)); |
result->set(3, controlToInterpolableValue(item.y2(), isAbsolute, coordinates.currentY)); |
result->set(4, specifiedToInterpolableValue(item.x(), isAbsolute, coordinates.currentX)); |
result->set(5, specifiedToInterpolableValue(item.y(), isAbsolute, coordinates.currentY)); |
- return result.release(); |
+ return result; |
} |
PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegCurvetoCubicFromInterpolableValue(const InterpolableValue& value, SVGPathSegType segType, SubPathCoordinates& coordinates, SVGPathElement* element) |
@@ -182,15 +182,15 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegCurvetoCubicFromInterpolableValue(cons |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegCurvetoQuadraticToInterpolableValue(const SVGPathSegCurvetoQuadratic& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegCurvetoQuadraticToInterpolableValue(const SVGPathSegCurvetoQuadratic& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(4); |
+ InterpolableList* result = InterpolableList::create(4); |
result->set(0, controlToInterpolableValue(item.x1(), isAbsolute, coordinates.currentX)); |
result->set(1, controlToInterpolableValue(item.y1(), isAbsolute, coordinates.currentY)); |
result->set(2, specifiedToInterpolableValue(item.x(), isAbsolute, coordinates.currentX)); |
result->set(3, specifiedToInterpolableValue(item.y(), isAbsolute, coordinates.currentY)); |
- return result.release(); |
+ return result; |
} |
PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegCurvetoQuadraticFromInterpolableValue(const InterpolableValue& value, SVGPathSegType segType, SubPathCoordinates& coordinates, SVGPathElement* element) |
@@ -212,10 +212,10 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegCurvetoQuadraticFromInterpolableValue( |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegArcToInterpolableValue(const SVGPathSegArc& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegArcToInterpolableValue(const SVGPathSegArc& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(7); |
+ InterpolableList* result = InterpolableList::create(7); |
result->set(0, specifiedToInterpolableValue(item.x(), isAbsolute, coordinates.currentX)); |
result->set(1, specifiedToInterpolableValue(item.y(), isAbsolute, coordinates.currentY)); |
result->set(2, InterpolableNumber::create(item.r1())); |
@@ -223,7 +223,7 @@ PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegArcToInterpolableValue(const SV |
result->set(4, InterpolableNumber::create(item.angle())); |
result->set(5, InterpolableBool::create(item.largeArcFlag())); |
result->set(6, InterpolableBool::create(item.sweepFlag())); |
- return result.release(); |
+ return result; |
} |
PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegArcFromInterpolableValue(const InterpolableValue& value, SVGPathSegType segType, SubPathCoordinates& coordinates, SVGPathElement* element) |
@@ -248,7 +248,7 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegArcFromInterpolableValue(const Interpo |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegLinetoHorizontalToInterpolableValue(const SVGPathSegLinetoHorizontal& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegLinetoHorizontalToInterpolableValue(const SVGPathSegLinetoHorizontal& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
return specifiedToInterpolableValue(item.x(), isAbsolute, coordinates.currentX); |
@@ -270,7 +270,7 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegLinetoHorizontalFromInterpolableValue( |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegLinetoVerticalToInterpolableValue(const SVGPathSegLinetoVertical& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegLinetoVerticalToInterpolableValue(const SVGPathSegLinetoVertical& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
return specifiedToInterpolableValue(item.y(), isAbsolute, coordinates.currentY); |
@@ -292,15 +292,15 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegLinetoVerticalFromInterpolableValue(co |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegCurvetoCubicSmoothToInterpolableValue(const SVGPathSegCurvetoCubicSmooth& item, SubPathCoordinates& coordinates) |
+InterpolableValue* pathSegCurvetoCubicSmoothToInterpolableValue(const SVGPathSegCurvetoCubicSmooth& item, SubPathCoordinates& coordinates) |
{ |
bool isAbsolute = isAbsolutePathSegType(item); |
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(4); |
+ InterpolableList* result = InterpolableList::create(4); |
result->set(0, controlToInterpolableValue(item.x2(), isAbsolute, coordinates.currentX)); |
result->set(1, controlToInterpolableValue(item.y2(), isAbsolute, coordinates.currentY)); |
result->set(2, specifiedToInterpolableValue(item.x(), isAbsolute, coordinates.currentX)); |
result->set(3, specifiedToInterpolableValue(item.y(), isAbsolute, coordinates.currentY)); |
- return result.release(); |
+ return result; |
} |
PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegCurvetoCubicSmoothFromInterpolableValue(const InterpolableValue& value, SVGPathSegType segType, SubPathCoordinates& coordinates, SVGPathElement* element) |
@@ -322,7 +322,7 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegCurvetoCubicSmoothFromInterpolableValu |
} |
} |
-PassOwnPtrWillBeRawPtr<InterpolableValue> pathSegToInterpolableValue(const SVGPathSeg& item, SubPathCoordinates& coordinates, SVGPathSegType* ptrSegType) |
+InterpolableValue* pathSegToInterpolableValue(const SVGPathSeg& item, SubPathCoordinates& coordinates, SVGPathSegType* ptrSegType) |
{ |
SVGPathSegType segType = static_cast<SVGPathSegType>(item.pathSegType()); |
@@ -419,7 +419,7 @@ PassRefPtrWillBeRawPtr<SVGPathSeg> pathSegFromInterpolableValue(const Interpolab |
} // namespace |
-PassRefPtrWillBeRawPtr<PathSVGInterpolation> PathSVGInterpolation::maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute) |
+PathSVGInterpolation* PathSVGInterpolation::maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute) |
{ |
ASSERT(start->type() == SVGPathSegList::classType()); |
ASSERT(end->type() == SVGPathSegList::classType()); |
@@ -431,8 +431,8 @@ PassRefPtrWillBeRawPtr<PathSVGInterpolation> PathSVGInterpolation::maybeCreate(S |
return nullptr; |
Vector<SVGPathSegType> pathSegTypes(length); |
- OwnPtrWillBeRawPtr<InterpolableList> startValue = InterpolableList::create(length); |
- OwnPtrWillBeRawPtr<InterpolableList> endValue = InterpolableList::create(length); |
+ InterpolableList* startValue = InterpolableList::create(length); |
+ InterpolableList* endValue = InterpolableList::create(length); |
SubPathCoordinates startCoordinates; |
SubPathCoordinates endCoordinates; |
for (size_t i = 0; i < length; i++) { |
@@ -444,7 +444,7 @@ PassRefPtrWillBeRawPtr<PathSVGInterpolation> PathSVGInterpolation::maybeCreate(S |
endValue->set(i, pathSegToInterpolableValue(*endList->at(i), endCoordinates, &pathSegTypes.at(i))); |
} |
- return adoptRefWillBeNoop(new PathSVGInterpolation(startValue.release(), endValue.release(), attribute, pathSegTypes)); |
+ return new PathSVGInterpolation(startValue, endValue, attribute, pathSegTypes); |
} |
PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::fromInterpolableValue(const InterpolableValue& value, const Vector<SVGPathSegType>& pathSegTypes, SVGPathElement* element) |