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

Unified Diff: third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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
Index: third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
diff --git a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
index 7f1b47cf075b3b69e3ec055e37f57e78165e52df..816d5806da3fbf5560bd010ae84792a7c8f6b77a 100644
--- a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
+++ b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp
@@ -7,7 +7,6 @@
#include "core/animation/InterpolationEnvironment.h"
#include "core/animation/StringKeyframe.h"
#include "core/css/resolver/StyleResolverState.h"
-#include <memory>
namespace blink {
@@ -25,7 +24,7 @@ void InvalidatableInterpolation::interpolate(int, double fraction)
// We defer the interpolation to ensureValidInterpolation() if m_cachedPairConversion is null.
}
-std::unique_ptr<PairwisePrimitiveInterpolation> InvalidatableInterpolation::maybeConvertPairwise(const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlyingValueOwner) const
+PassOwnPtr<PairwisePrimitiveInterpolation> InvalidatableInterpolation::maybeConvertPairwise(const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlyingValueOwner) const
{
ASSERT(m_currentFraction != 0 && m_currentFraction != 1);
for (const auto& interpolationType : m_interpolationTypes) {
@@ -44,7 +43,7 @@ std::unique_ptr<PairwisePrimitiveInterpolation> InvalidatableInterpolation::mayb
return nullptr;
}
-std::unique_ptr<TypedInterpolationValue> InvalidatableInterpolation::convertSingleKeyframe(const PropertySpecificKeyframe& keyframe, const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlyingValueOwner) const
+PassOwnPtr<TypedInterpolationValue> InvalidatableInterpolation::convertSingleKeyframe(const PropertySpecificKeyframe& keyframe, const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlyingValueOwner) const
{
if (keyframe.isNeutral() && !underlyingValueOwner)
return nullptr;
@@ -69,7 +68,7 @@ void InvalidatableInterpolation::addConversionCheckers(const InterpolationType&
}
}
-std::unique_ptr<TypedInterpolationValue> InvalidatableInterpolation::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
+PassOwnPtr<TypedInterpolationValue> InvalidatableInterpolation::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
for (const auto& interpolationType : m_interpolationTypes) {
InterpolationValue result = interpolationType->maybeConvertUnderlyingValue(environment);
@@ -126,7 +125,7 @@ const TypedInterpolationValue* InvalidatableInterpolation::ensureValidInterpolat
} else if (m_currentFraction == 1) {
m_cachedValue = convertSingleKeyframe(*m_endKeyframe, environment, underlyingValueOwner);
} else {
- std::unique_ptr<PairwisePrimitiveInterpolation> pairwiseConversion = maybeConvertPairwise(environment, underlyingValueOwner);
+ OwnPtr<PairwisePrimitiveInterpolation> pairwiseConversion = maybeConvertPairwise(environment, underlyingValueOwner);
if (pairwiseConversion) {
m_cachedValue = pairwiseConversion->initialValue();
m_cachedPairConversion = std::move(pairwiseConversion);

Powered by Google App Engine
This is Rietveld 408576698