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

Unified Diff: third_party/WebKit/Source/core/animation/CSSClipInterpolationType.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/CSSClipInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
index f3d3a359b35b63f92eac5c40ac125495492a558c..898dd59dc0e8a49c7ae8b5b2e70d3073e5875f1a 100644
--- a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
@@ -7,8 +7,6 @@
#include "core/animation/CSSLengthInterpolationType.h"
#include "core/css/CSSQuadValue.h"
#include "core/css/resolver/StyleResolverState.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -65,9 +63,9 @@ static ClipAutos getClipAutos(const ComputedStyle& style)
class ParentAutosChecker : public InterpolationType::ConversionChecker {
public:
- static std::unique_ptr<ParentAutosChecker> create(const ClipAutos& parentAutos)
+ static PassOwnPtr<ParentAutosChecker> create(const ClipAutos& parentAutos)
{
- return wrapUnique(new ParentAutosChecker(parentAutos));
+ return adoptPtr(new ParentAutosChecker(parentAutos));
}
private:
@@ -113,9 +111,9 @@ class UnderlyingAutosChecker : public InterpolationType::ConversionChecker {
public:
~UnderlyingAutosChecker() final {}
- static std::unique_ptr<UnderlyingAutosChecker> create(const ClipAutos& underlyingAutos)
+ static PassOwnPtr<UnderlyingAutosChecker> create(const ClipAutos& underlyingAutos)
{
- return wrapUnique(new UnderlyingAutosChecker(underlyingAutos));
+ return adoptPtr(new UnderlyingAutosChecker(underlyingAutos));
}
static ClipAutos getUnderlyingAutos(const InterpolationValue& underlying)
@@ -146,7 +144,7 @@ enum ClipComponentIndex {
ClipComponentIndexCount,
};
-static std::unique_ptr<InterpolableValue> convertClipComponent(const Length& length, double zoom)
+static PassOwnPtr<InterpolableValue> convertClipComponent(const Length& length, double zoom)
{
if (length.isAuto())
return InterpolableList::create(0);
@@ -155,7 +153,7 @@ static std::unique_ptr<InterpolableValue> convertClipComponent(const Length& len
static InterpolationValue createClipValue(const LengthBox& clip, double zoom)
{
- std::unique_ptr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
+ OwnPtr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
list->set(ClipTop, convertClipComponent(clip.top(), zoom));
list->set(ClipRight, convertClipComponent(clip.right(), zoom));
list->set(ClipBottom, convertClipComponent(clip.bottom(), zoom));
@@ -196,7 +194,7 @@ static bool isCSSAuto(const CSSPrimitiveValue& value)
return value.getValueID() == CSSValueAuto;
}
-static std::unique_ptr<InterpolableValue> convertClipComponent(const CSSPrimitiveValue& length)
+static PassOwnPtr<InterpolableValue> convertClipComponent(const CSSPrimitiveValue& length)
{
if (isCSSAuto(length))
return InterpolableList::create(0);
@@ -208,7 +206,7 @@ InterpolationValue CSSClipInterpolationType::maybeConvertValue(const CSSValue& v
if (!value.isQuadValue())
return nullptr;
const CSSQuadValue& quad = toCSSQuadValue(value);
- std::unique_ptr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
+ OwnPtr<InterpolableList> list = InterpolableList::create(ClipComponentIndexCount);
list->set(ClipTop, convertClipComponent(*quad.top()));
list->set(ClipRight, convertClipComponent(*quad.right()));
list->set(ClipBottom, convertClipComponent(*quad.bottom()));

Powered by Google App Engine
This is Rietveld 408576698