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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/CSSImageSliceInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSImageSliceInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSImageSliceInterpolationType.cpp
index 76890c033f61c1bb2ec3c05fd92c954236772011..1a6aff641e8f9a5ee739154b5fbb367b333e9d1f 100644
--- a/third_party/WebKit/Source/core/animation/CSSImageSliceInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSImageSliceInterpolationType.cpp
@@ -8,6 +8,8 @@
#include "core/animation/ImageSlicePropertyFunctions.h"
#include "core/css/CSSBorderImageSliceValue.h"
#include "core/css/resolver/StyleResolverState.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -82,9 +84,9 @@ namespace {
class UnderlyingSliceTypesChecker : public InterpolationType::ConversionChecker {
public:
- static PassOwnPtr<UnderlyingSliceTypesChecker> create(const SliceTypes& underlyingTypes)
+ static std::unique_ptr<UnderlyingSliceTypesChecker> create(const SliceTypes& underlyingTypes)
{
- return adoptPtr(new UnderlyingSliceTypesChecker(underlyingTypes));
+ return wrapUnique(new UnderlyingSliceTypesChecker(underlyingTypes));
}
static SliceTypes getUnderlyingSliceTypes(const InterpolationValue& underlying)
@@ -107,9 +109,9 @@ private:
class InheritedSliceTypesChecker : public InterpolationType::ConversionChecker {
public:
- static PassOwnPtr<InheritedSliceTypesChecker> create(CSSPropertyID property, const SliceTypes& inheritedTypes)
+ static std::unique_ptr<InheritedSliceTypesChecker> create(CSSPropertyID property, const SliceTypes& inheritedTypes)
{
- return adoptPtr(new InheritedSliceTypesChecker(property, inheritedTypes));
+ return wrapUnique(new InheritedSliceTypesChecker(property, inheritedTypes));
}
private:
@@ -129,7 +131,7 @@ private:
InterpolationValue convertImageSlice(const ImageSlice& slice, double zoom)
{
- OwnPtr<InterpolableList> list = InterpolableList::create(SideIndexCount);
+ std::unique_ptr<InterpolableList> list = InterpolableList::create(SideIndexCount);
const Length* sides[SideIndexCount] = {};
sides[SideTop] = &slice.slices.top();
sides[SideRight] = &slice.slices.right();
@@ -176,7 +178,7 @@ InterpolationValue CSSImageSliceInterpolationType::maybeConvertValue(const CSSVa
return nullptr;
const CSSBorderImageSliceValue& slice = toCSSBorderImageSliceValue(value);
- OwnPtr<InterpolableList> list = InterpolableList::create(SideIndexCount);
+ std::unique_ptr<InterpolableList> list = InterpolableList::create(SideIndexCount);
const CSSPrimitiveValue* sides[SideIndexCount];
sides[SideTop] = slice.slices().top();
sides[SideRight] = slice.slices().right();

Powered by Google App Engine
This is Rietveld 408576698