| Index: third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp b/third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp
|
| index c69d7ecfcaea163eb07f5d2446dde5817f23ab6d..206964f221f0d03a49e1f2ea52ef3f1bcb2d5474 100644
|
| --- a/third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/PathInterpolationFunctions.cpp
|
| @@ -12,6 +12,8 @@
|
| #include "core/svg/SVGPathByteStreamBuilder.h"
|
| #include "core/svg/SVGPathByteStreamSource.h"
|
| #include "core/svg/SVGPathParser.h"
|
| +#include "wtf/PtrUtil.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -51,7 +53,7 @@ InterpolationValue PathInterpolationFunctions::convertValue(const SVGPathByteStr
|
| SVGPathByteStreamSource pathSource(byteStream);
|
| size_t length = 0;
|
| PathCoordinates currentCoordinates;
|
| - Vector<OwnPtr<InterpolableValue>> interpolablePathSegs;
|
| + Vector<std::unique_ptr<InterpolableValue>> interpolablePathSegs;
|
| Vector<SVGPathSegType> pathSegTypes;
|
|
|
| while (pathSource.hasMoreData()) {
|
| @@ -61,11 +63,11 @@ InterpolationValue PathInterpolationFunctions::convertValue(const SVGPathByteStr
|
| length++;
|
| }
|
|
|
| - OwnPtr<InterpolableList> pathArgs = InterpolableList::create(length);
|
| + std::unique_ptr<InterpolableList> pathArgs = InterpolableList::create(length);
|
| for (size_t i = 0; i < interpolablePathSegs.size(); i++)
|
| pathArgs->set(i, std::move(interpolablePathSegs[i]));
|
|
|
| - OwnPtr<InterpolableList> result = InterpolableList::create(PathComponentIndexCount);
|
| + std::unique_ptr<InterpolableList> result = InterpolableList::create(PathComponentIndexCount);
|
| result->set(PathArgsIndex, std::move(pathArgs));
|
| result->set(PathNeutralIndex, InterpolableNumber::create(0));
|
|
|
| @@ -77,7 +79,7 @@ InterpolationValue PathInterpolationFunctions::convertValue(const StylePath* sty
|
| if (stylePath)
|
| return convertValue(stylePath->byteStream());
|
|
|
| - OwnPtr<SVGPathByteStream> emptyPath = SVGPathByteStream::create();
|
| + std::unique_ptr<SVGPathByteStream> emptyPath = SVGPathByteStream::create();
|
| return convertValue(*emptyPath);
|
| }
|
|
|
| @@ -85,9 +87,9 @@ class UnderlyingPathSegTypesChecker : public InterpolationType::ConversionChecke
|
| public:
|
| ~UnderlyingPathSegTypesChecker() final {}
|
|
|
| - static PassOwnPtr<UnderlyingPathSegTypesChecker> create(const InterpolationValue& underlying)
|
| + static std::unique_ptr<UnderlyingPathSegTypesChecker> create(const InterpolationValue& underlying)
|
| {
|
| - return adoptPtr(new UnderlyingPathSegTypesChecker(getPathSegTypes(underlying)));
|
| + return wrapUnique(new UnderlyingPathSegTypesChecker(getPathSegTypes(underlying)));
|
| }
|
|
|
| private:
|
| @@ -111,7 +113,7 @@ private:
|
| InterpolationValue PathInterpolationFunctions::maybeConvertNeutral(const InterpolationValue& underlying, InterpolationType::ConversionCheckers& conversionCheckers)
|
| {
|
| conversionCheckers.append(UnderlyingPathSegTypesChecker::create(underlying));
|
| - OwnPtr<InterpolableList> result = InterpolableList::create(PathComponentIndexCount);
|
| + std::unique_ptr<InterpolableList> result = InterpolableList::create(PathComponentIndexCount);
|
| result->set(PathArgsIndex, toInterpolableList(*underlying.interpolableValue).get(PathArgsIndex)->cloneAndZero());
|
| result->set(PathNeutralIndex, InterpolableNumber::create(1));
|
| return InterpolationValue(std::move(result), underlying.nonInterpolableValue.get());
|
| @@ -157,9 +159,9 @@ void PathInterpolationFunctions::composite(UnderlyingValueOwner& underlyingValue
|
| underlyingValueOwner.mutableValue().nonInterpolableValue = value.nonInterpolableValue.get();
|
| }
|
|
|
| -PassOwnPtr<SVGPathByteStream> PathInterpolationFunctions::appliedValue(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableValue)
|
| +std::unique_ptr<SVGPathByteStream> PathInterpolationFunctions::appliedValue(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableValue)
|
| {
|
| - OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
|
| + std::unique_ptr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
|
| InterpolatedSVGPathSource source(
|
| toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIndex)),
|
| toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes());
|
|
|