| Index: third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
|
| index 898dd59dc0e8a49c7ae8b5b2e70d3073e5875f1a..f3d3a359b35b63f92eac5c40ac125495492a558c 100644
|
| --- a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
|
| @@ -7,6 +7,8 @@
|
| #include "core/animation/CSSLengthInterpolationType.h"
|
| #include "core/css/CSSQuadValue.h"
|
| #include "core/css/resolver/StyleResolverState.h"
|
| +#include "wtf/PtrUtil.h"
|
| +#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -63,9 +65,9 @@ static ClipAutos getClipAutos(const ComputedStyle& style)
|
|
|
| class ParentAutosChecker : public InterpolationType::ConversionChecker {
|
| public:
|
| - static PassOwnPtr<ParentAutosChecker> create(const ClipAutos& parentAutos)
|
| + static std::unique_ptr<ParentAutosChecker> create(const ClipAutos& parentAutos)
|
| {
|
| - return adoptPtr(new ParentAutosChecker(parentAutos));
|
| + return wrapUnique(new ParentAutosChecker(parentAutos));
|
| }
|
|
|
| private:
|
| @@ -111,9 +113,9 @@ class UnderlyingAutosChecker : public InterpolationType::ConversionChecker {
|
| public:
|
| ~UnderlyingAutosChecker() final {}
|
|
|
| - static PassOwnPtr<UnderlyingAutosChecker> create(const ClipAutos& underlyingAutos)
|
| + static std::unique_ptr<UnderlyingAutosChecker> create(const ClipAutos& underlyingAutos)
|
| {
|
| - return adoptPtr(new UnderlyingAutosChecker(underlyingAutos));
|
| + return wrapUnique(new UnderlyingAutosChecker(underlyingAutos));
|
| }
|
|
|
| static ClipAutos getUnderlyingAutos(const InterpolationValue& underlying)
|
| @@ -144,7 +146,7 @@ enum ClipComponentIndex {
|
| ClipComponentIndexCount,
|
| };
|
|
|
| -static PassOwnPtr<InterpolableValue> convertClipComponent(const Length& length, double zoom)
|
| +static std::unique_ptr<InterpolableValue> convertClipComponent(const Length& length, double zoom)
|
| {
|
| if (length.isAuto())
|
| return InterpolableList::create(0);
|
| @@ -153,7 +155,7 @@ static PassOwnPtr<InterpolableValue> convertClipComponent(const Length& length,
|
|
|
| static InterpolationValue createClipValue(const LengthBox& clip, double zoom)
|
| {
|
| - OwnPtr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
|
| + std::unique_ptr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
|
| list->set(ClipTop, convertClipComponent(clip.top(), zoom));
|
| list->set(ClipRight, convertClipComponent(clip.right(), zoom));
|
| list->set(ClipBottom, convertClipComponent(clip.bottom(), zoom));
|
| @@ -194,7 +196,7 @@ static bool isCSSAuto(const CSSPrimitiveValue& value)
|
| return value.getValueID() == CSSValueAuto;
|
| }
|
|
|
| -static PassOwnPtr<InterpolableValue> convertClipComponent(const CSSPrimitiveValue& length)
|
| +static std::unique_ptr<InterpolableValue> convertClipComponent(const CSSPrimitiveValue& length)
|
| {
|
| if (isCSSAuto(length))
|
| return InterpolableList::create(0);
|
| @@ -206,7 +208,7 @@ InterpolationValue CSSClipInterpolationType::maybeConvertValue(const CSSValue& v
|
| if (!value.isQuadValue())
|
| return nullptr;
|
| const CSSQuadValue& quad = toCSSQuadValue(value);
|
| - OwnPtr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
|
| + std::unique_ptr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
|
| list->set(ClipTop, convertClipComponent(*quad.top()));
|
| list->set(ClipRight, convertClipComponent(*quad.right()));
|
| list->set(ClipBottom, convertClipComponent(*quad.bottom()));
|
|
|