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

Unified Diff: third_party/WebKit/Source/core/animation/ListInterpolationFunctions.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/ListInterpolationFunctions.cpp
diff --git a/third_party/WebKit/Source/core/animation/ListInterpolationFunctions.cpp b/third_party/WebKit/Source/core/animation/ListInterpolationFunctions.cpp
index 20566719aaeef4a9e9aa927d9aa1295ef05e8f44..32c42ff1de95f1317b6945da0197c1c64ba7c21f 100644
--- a/third_party/WebKit/Source/core/animation/ListInterpolationFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/ListInterpolationFunctions.cpp
@@ -7,7 +7,6 @@
#include "core/animation/UnderlyingValueOwner.h"
#include "core/css/CSSValueList.h"
#include "wtf/MathExtras.h"
-#include <memory>
namespace blink {
@@ -54,7 +53,7 @@ PairwiseInterpolationValue ListInterpolationFunctions::maybeMergeSingles(Interpo
}
if (startLength == 0) {
- std::unique_ptr<InterpolableValue> startInterpolableValue = end.interpolableValue->cloneAndZero();
+ OwnPtr<InterpolableValue> startInterpolableValue = end.interpolableValue->cloneAndZero();
return PairwiseInterpolationValue(
std::move(startInterpolableValue),
std::move(end.interpolableValue),
@@ -62,7 +61,7 @@ PairwiseInterpolationValue ListInterpolationFunctions::maybeMergeSingles(Interpo
}
if (endLength == 0) {
- std::unique_ptr<InterpolableValue> endInterpolableValue = start.interpolableValue->cloneAndZero();
+ OwnPtr<InterpolableValue> endInterpolableValue = start.interpolableValue->cloneAndZero();
return PairwiseInterpolationValue(
std::move(start.interpolableValue),
std::move(endInterpolableValue),
@@ -70,8 +69,8 @@ PairwiseInterpolationValue ListInterpolationFunctions::maybeMergeSingles(Interpo
}
size_t finalLength = lowestCommonMultiple(startLength, endLength);
- std::unique_ptr<InterpolableList> resultStartInterpolableList = InterpolableList::create(finalLength);
- std::unique_ptr<InterpolableList> resultEndInterpolableList = InterpolableList::create(finalLength);
+ OwnPtr<InterpolableList> resultStartInterpolableList = InterpolableList::create(finalLength);
+ OwnPtr<InterpolableList> resultEndInterpolableList = InterpolableList::create(finalLength);
Vector<RefPtr<NonInterpolableValue>> resultNonInterpolableValues(finalLength);
InterpolableList& startInterpolableList = toInterpolableList(*start.interpolableValue);
@@ -105,7 +104,7 @@ static void repeatToLength(InterpolationValue& value, size_t length)
if (currentLength == length)
return;
ASSERT(currentLength < length);
- std::unique_ptr<InterpolableList> newInterpolableList = InterpolableList::create(length);
+ OwnPtr<InterpolableList> newInterpolableList = InterpolableList::create(length);
Vector<RefPtr<NonInterpolableValue>> newNonInterpolableValues(length);
for (size_t i = length; i-- > 0;) {
newInterpolableList->set(i, i < currentLength ? std::move(interpolableList.getMutable(i)) : interpolableList.get(i % currentLength)->clone());

Powered by Google App Engine
This is Rietveld 408576698