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

Unified Diff: third_party/WebKit/Source/core/animation/SVGNumberListInterpolationType.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/SVGNumberListInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/SVGNumberListInterpolationType.cpp b/third_party/WebKit/Source/core/animation/SVGNumberListInterpolationType.cpp
index c3f26cf27a38e5c9780cc1c7ab13ce3798cc6dc0..4eaa1e74d11bda62241e728dfb1c2ca0575dcfda 100644
--- a/third_party/WebKit/Source/core/animation/SVGNumberListInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/SVGNumberListInterpolationType.cpp
@@ -7,7 +7,6 @@
#include "core/animation/InterpolationEnvironment.h"
#include "core/animation/UnderlyingLengthChecker.h"
#include "core/svg/SVGNumberList.h"
-#include <memory>
namespace blink {
@@ -19,7 +18,7 @@ InterpolationValue SVGNumberListInterpolationType::maybeConvertNeutral(const Int
if (underlyingLength == 0)
return nullptr;
- std::unique_ptr<InterpolableList> result = InterpolableList::create(underlyingLength);
+ OwnPtr<InterpolableList> result = InterpolableList::create(underlyingLength);
for (size_t i = 0; i < underlyingLength; i++)
result->set(i, InterpolableNumber::create(0));
return InterpolationValue(std::move(result));
@@ -31,7 +30,7 @@ InterpolationValue SVGNumberListInterpolationType::maybeConvertSVGValue(const SV
return nullptr;
const SVGNumberList& numberList = toSVGNumberList(svgValue);
- std::unique_ptr<InterpolableList> result = InterpolableList::create(numberList.length());
+ OwnPtr<InterpolableList> result = InterpolableList::create(numberList.length());
for (size_t i = 0; i < numberList.length(); i++)
result->set(i, InterpolableNumber::create(numberList.at(i)->value()));
return InterpolationValue(std::move(result));
@@ -46,14 +45,14 @@ PairwiseInterpolationValue SVGNumberListInterpolationType::maybeMergeSingles(Int
return InterpolationType::maybeMergeSingles(std::move(start), std::move(end));
}
-static void padWithZeroes(std::unique_ptr<InterpolableValue>& listPointer, size_t paddedLength)
+static void padWithZeroes(OwnPtr<InterpolableValue>& listPointer, size_t paddedLength)
{
InterpolableList& list = toInterpolableList(*listPointer);
if (list.length() >= paddedLength)
return;
- std::unique_ptr<InterpolableList> result = InterpolableList::create(paddedLength);
+ OwnPtr<InterpolableList> result = InterpolableList::create(paddedLength);
size_t i = 0;
for (; i < list.length(); i++)
result->set(i, std::move(list.getMutable(i)));

Powered by Google App Engine
This is Rietveld 408576698