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

Unified Diff: Source/core/animation/ListSVGInterpolation.h

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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: Source/core/animation/ListSVGInterpolation.h
diff --git a/Source/core/animation/ListSVGInterpolation.h b/Source/core/animation/ListSVGInterpolation.h
index ad22950462a201bca6a4abb91b9a0b7651ff8b9b..12b295cd5bd80e29a92ac4fe4638cba45a27506d 100644
--- a/Source/core/animation/ListSVGInterpolation.h
+++ b/Source/core/animation/ListSVGInterpolation.h
@@ -17,7 +17,7 @@ public:
typedef typename InterpolationType::ListType ListType;
typedef typename InterpolationType::ListType::ItemPropertyType ItemPropertyType;
- static PassRefPtrWillBeRawPtr<ListSVGInterpolationImpl<InterpolationType, NonInterpolableType>> maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
+ static ListSVGInterpolationImpl<InterpolationType, NonInterpolableType>* maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
{
ASSERT(start->type() == ListType::classType());
ASSERT(end->type() == ListType::classType());
@@ -35,18 +35,18 @@ public:
}
Vector<NonInterpolableType> nonInterpolableData(length);
- OwnPtrWillBeRawPtr<InterpolableList> startValue = InterpolableList::create(length);
- OwnPtrWillBeRawPtr<InterpolableList> endValue = InterpolableList::create(length);
+ InterpolableList* startValue = InterpolableList::create(length);
+ InterpolableList* endValue = InterpolableList::create(length);
for (size_t i = 0; i < length; i++) {
startValue->set(i, InterpolationType::toInterpolableValue(startList->at(i), attribute.get(), &nonInterpolableData.at(i)));
endValue->set(i, InterpolationType::toInterpolableValue(endList->at(i), attribute.get(), nullptr));
}
- return adoptRefWillBeNoop(new ListSVGInterpolationImpl<InterpolationType, NonInterpolableType>(startValue.release(), endValue.release(), attribute, nonInterpolableData));
+ return new ListSVGInterpolationImpl<InterpolationType, NonInterpolableType>(startValue, endValue, attribute, nonInterpolableData);
}
private:
- ListSVGInterpolationImpl(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute, Vector<NonInterpolableType> nonInterpolableData)
+ ListSVGInterpolationImpl(InterpolableValue* start, InterpolableValue* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute, Vector<NonInterpolableType> nonInterpolableData)
: SVGInterpolation(start, end, attribute)
{
m_nonInterpolableData.swap(nonInterpolableData);
@@ -74,7 +74,7 @@ class ListSVGInterpolationImpl<InterpolationType, void> : public SVGInterpolatio
public:
typedef typename InterpolationType::ListType ListType;
- static PassRefPtrWillBeRawPtr<ListSVGInterpolationImpl<InterpolationType, void>> maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
+ static ListSVGInterpolationImpl<InterpolationType, void>* maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
{
ASSERT(start->type() == ListType::classType());
ASSERT(end->type() == ListType::classType());
@@ -84,7 +84,7 @@ public:
if (startList->length() != endList->length())
return nullptr;
- return adoptRefWillBeNoop(new ListSVGInterpolationImpl<InterpolationType, void>(toInterpolableValue(startList), toInterpolableValue(endList), attribute));
+ return new ListSVGInterpolationImpl<InterpolationType, void>(toInterpolableValue(startList), toInterpolableValue(endList), attribute);
}
DEFINE_INLINE_VIRTUAL_TRACE()
@@ -93,18 +93,18 @@ public:
}
private:
- ListSVGInterpolationImpl(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
+ ListSVGInterpolationImpl(InterpolableValue* start, InterpolableValue* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
: SVGInterpolation(start, end, attribute)
{
}
- static PassOwnPtrWillBeRawPtr<InterpolableValue> toInterpolableValue(ListType* listValue)
+ static InterpolableValue* toInterpolableValue(ListType* listValue)
{
size_t length = listValue->length();
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(length);
+ InterpolableList* result = InterpolableList::create(length);
for (size_t i = 0; i < length; i++)
result->set(i, InterpolationType::toInterpolableValue(listValue->at(i)));
- return result.release();
+ return result;
}
static PassRefPtrWillBeRawPtr<ListType> fromInterpolableValue(const InterpolableValue& value)
@@ -126,7 +126,7 @@ private:
template<typename InterpolationType>
class ListSVGInterpolation {
public:
- static PassRefPtrWillBeRawPtr<ListSVGInterpolationImpl<InterpolationType, typename InterpolationType::NonInterpolableType>> maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
+ static ListSVGInterpolationImpl<InterpolationType, typename InterpolationType::NonInterpolableType>* maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
{
return ListSVGInterpolationImpl<InterpolationType, typename InterpolationType::NonInterpolableType>::maybeCreate(start, end, attribute);
}
« no previous file with comments | « Source/core/animation/LengthStyleInterpolationTest.cpp ('k') | Source/core/animation/ListStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698