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

Unified Diff: third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.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/CSSFilterListInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
index 7ddefa2aaee829fe17fece6efee5f3c94342148e..7e28a0ee73a5433f369dd4b15e73cbccbfad6d7b 100644
--- a/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSFilterListInterpolationType.cpp
@@ -9,6 +9,8 @@
#include "core/animation/ListInterpolationFunctions.h"
#include "core/css/CSSValueList.h"
#include "core/css/resolver/StyleResolverState.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -16,9 +18,9 @@ namespace {
class UnderlyingFilterListChecker : public InterpolationType::ConversionChecker {
public:
- static PassOwnPtr<UnderlyingFilterListChecker> create(PassRefPtr<NonInterpolableList> nonInterpolableList)
+ static std::unique_ptr<UnderlyingFilterListChecker> create(PassRefPtr<NonInterpolableList> nonInterpolableList)
{
- return adoptPtr(new UnderlyingFilterListChecker(nonInterpolableList));
+ return wrapUnique(new UnderlyingFilterListChecker(nonInterpolableList));
}
bool isValid(const InterpolationEnvironment&, const InterpolationValue& underlying) const final
@@ -43,9 +45,9 @@ private:
class InheritedFilterListChecker : public InterpolationType::ConversionChecker {
public:
- static PassOwnPtr<InheritedFilterListChecker> create(CSSPropertyID property, const FilterOperations& filterOperations)
+ static std::unique_ptr<InheritedFilterListChecker> create(CSSPropertyID property, const FilterOperations& filterOperations)
{
- return adoptPtr(new InheritedFilterListChecker(property, filterOperations));
+ return wrapUnique(new InheritedFilterListChecker(property, filterOperations));
}
bool isValid(const InterpolationEnvironment& environment, const InterpolationValue&) const final
@@ -67,7 +69,7 @@ private:
InterpolationValue convertFilterList(const FilterOperations& filterOperations, double zoom)
{
size_t length = filterOperations.size();
- OwnPtr<InterpolableList> interpolableList = InterpolableList::create(length);
+ std::unique_ptr<InterpolableList> interpolableList = InterpolableList::create(length);
Vector<RefPtr<NonInterpolableValue>> nonInterpolableValues(length);
for (size_t i = 0; i < length; i++) {
InterpolationValue filterResult = FilterInterpolationFunctions::maybeConvertFilter(*filterOperations.operations()[i], zoom);
@@ -111,7 +113,7 @@ InterpolationValue CSSFilterListInterpolationType::maybeConvertValue(const CSSVa
const CSSValueList& list = toCSSValueList(value);
size_t length = list.length();
- OwnPtr<InterpolableList> interpolableList = InterpolableList::create(length);
+ std::unique_ptr<InterpolableList> interpolableList = InterpolableList::create(length);
Vector<RefPtr<NonInterpolableValue>> nonInterpolableValues(length);
for (size_t i = 0; i < length; i++) {
InterpolationValue itemResult = FilterInterpolationFunctions::maybeConvertCSSFilter(list.item(i));
@@ -151,7 +153,7 @@ PairwiseInterpolationValue CSSFilterListInterpolationType::maybeMergeSingles(Int
size_t longerLength = toNonInterpolableList(*longer.nonInterpolableValue).length();
InterpolableList& shorterInterpolableList = toInterpolableList(*shorter.interpolableValue);
const NonInterpolableList& longerNonInterpolableList = toNonInterpolableList(*longer.nonInterpolableValue);
- OwnPtr<InterpolableList> extendedInterpolableList = InterpolableList::create(longerLength);
+ std::unique_ptr<InterpolableList> extendedInterpolableList = InterpolableList::create(longerLength);
for (size_t i = 0; i < longerLength; i++) {
if (i < shorterLength)
extendedInterpolableList->set(i, std::move(shorterInterpolableList.getMutable(i)));
@@ -188,7 +190,7 @@ void CSSFilterListInterpolationType::composite(UnderlyingValueOwner& underlyingV
if (length <= underlyingLength)
return;
- OwnPtr<InterpolableList> extendedInterpolableList = InterpolableList::create(length);
+ std::unique_ptr<InterpolableList> extendedInterpolableList = InterpolableList::create(length);
for (size_t i = 0; i < length; i++) {
if (i < underlyingLength)
extendedInterpolableList->set(i, std::move(underlyingInterpolableList.getMutable(i)));

Powered by Google App Engine
This is Rietveld 408576698