| Index: third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| index 15ed438bdbf0067c888a378205a5b09b66746596..8296f3ff587fd25e5c674936d09ec31e0cf0597e 100644
|
| --- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
|
| @@ -9,8 +9,6 @@
|
| #include "core/css/CSSCalculationValue.h"
|
| #include "core/css/resolver/StyleBuilder.h"
|
| #include "core/css/resolver/StyleResolverState.h"
|
| -#include "wtf/PtrUtil.h"
|
| -#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -54,16 +52,16 @@ float CSSLengthInterpolationType::effectiveZoom(const ComputedStyle& style) cons
|
| return LengthPropertyFunctions::isZoomedLength(cssProperty()) ? style.effectiveZoom() : 1;
|
| }
|
|
|
| -std::unique_ptr<InterpolableValue> CSSLengthInterpolationType::createInterpolablePixels(double pixels)
|
| +PassOwnPtr<InterpolableValue> CSSLengthInterpolationType::createInterpolablePixels(double pixels)
|
| {
|
| - std::unique_ptr<InterpolableList> interpolableList = createNeutralInterpolableValue();
|
| + OwnPtr<InterpolableList> interpolableList = createNeutralInterpolableValue();
|
| interpolableList->set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(pixels));
|
| return std::move(interpolableList);
|
| }
|
|
|
| InterpolationValue CSSLengthInterpolationType::createInterpolablePercent(double percent)
|
| {
|
| - std::unique_ptr<InterpolableList> interpolableList = createNeutralInterpolableValue();
|
| + OwnPtr<InterpolableList> interpolableList = createNeutralInterpolableValue();
|
| interpolableList->set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(percent));
|
| return InterpolationValue(std::move(interpolableList), CSSLengthNonInterpolableValue::create(true));
|
| }
|
| @@ -74,17 +72,17 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertLength(const Length&
|
| return nullptr;
|
|
|
| PixelsAndPercent pixelsAndPercent = length.getPixelsAndPercent();
|
| - std::unique_ptr<InterpolableList> values = createNeutralInterpolableValue();
|
| + OwnPtr<InterpolableList> values = createNeutralInterpolableValue();
|
| values->set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(pixelsAndPercent.pixels / zoom));
|
| values->set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(pixelsAndPercent.percent));
|
|
|
| return InterpolationValue(std::move(values), CSSLengthNonInterpolableValue::create(length.hasPercent()));
|
| }
|
|
|
| -std::unique_ptr<InterpolableList> CSSLengthInterpolationType::createNeutralInterpolableValue()
|
| +PassOwnPtr<InterpolableList> CSSLengthInterpolationType::createNeutralInterpolableValue()
|
| {
|
| const size_t length = CSSPrimitiveValue::LengthUnitTypeCount;
|
| - std::unique_ptr<InterpolableList> values = InterpolableList::create(length);
|
| + OwnPtr<InterpolableList> values = InterpolableList::create(length);
|
| for (size_t i = 0; i < length; i++)
|
| values->set(i, InterpolableNumber::create(0));
|
| return values;
|
| @@ -104,7 +102,7 @@ bool CSSLengthInterpolationType::nonInterpolableValuesAreCompatible(const NonInt
|
| }
|
|
|
| void CSSLengthInterpolationType::composite(
|
| - std::unique_ptr<InterpolableValue>& underlyingInterpolableValue,
|
| + OwnPtr<InterpolableValue>& underlyingInterpolableValue,
|
| RefPtr<NonInterpolableValue>& underlyingNonInterpolableValue,
|
| double underlyingFraction,
|
| const InterpolableValue& interpolableValue,
|
| @@ -138,7 +136,7 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertCSSValue(const CSSVal
|
| CSSLengthArray lengthArray;
|
| primitiveValue.accumulateLengthArray(lengthArray);
|
|
|
| - std::unique_ptr<InterpolableList> values = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
|
| + OwnPtr<InterpolableList> values = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
|
| for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++)
|
| values->set(i, InterpolableNumber::create(lengthArray.values[i]));
|
|
|
| @@ -148,9 +146,9 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertCSSValue(const CSSVal
|
|
|
| class ParentLengthChecker : public InterpolationType::ConversionChecker {
|
| public:
|
| - static std::unique_ptr<ParentLengthChecker> create(CSSPropertyID property, const Length& length)
|
| + static PassOwnPtr<ParentLengthChecker> create(CSSPropertyID property, const Length& length)
|
| {
|
| - return wrapUnique(new ParentLengthChecker(property, length));
|
| + return adoptPtr(new ParentLengthChecker(property, length));
|
| }
|
|
|
| private:
|
|
|