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

Unified Diff: Source/core/animation/ListStyleInterpolation.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
« no previous file with comments | « Source/core/animation/ListSVGInterpolation.h ('k') | Source/core/animation/ListStyleInterpolationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ListStyleInterpolation.h
diff --git a/Source/core/animation/ListStyleInterpolation.h b/Source/core/animation/ListStyleInterpolation.h
index 014883274edd8d1894a8ba004c629d8b0dd47d3a..351455b44822e99ccf876b0dd8beb570850b70f3 100644
--- a/Source/core/animation/ListStyleInterpolation.h
+++ b/Source/core/animation/ListStyleInterpolation.h
@@ -15,7 +15,7 @@ namespace blink {
template<typename InterpolationType, typename NonInterpolableData>
class ListStyleInterpolationImpl : public StyleInterpolation {
public:
- static PassRefPtrWillBeRawPtr<ListStyleInterpolationImpl<InterpolationType, NonInterpolableData>> maybeCreateFromList(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range = RangeAll)
+ static ListStyleInterpolationImpl<InterpolationType, NonInterpolableData>* maybeCreateFromList(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range = RangeAll)
{
if (start.isValueList() && end.isValueList() && toCSSValueList(start).length() == toCSSValueList(end).length()) {
const CSSValueList& startList = toCSSValueList(start);
@@ -29,21 +29,21 @@ public:
Vector<typename InterpolationType::NonInterpolableType> startNonInterpolableData;
- OwnPtrWillBeRawPtr<InterpolableValue> startValue = listToInterpolableValue(start, &startNonInterpolableData);
- OwnPtrWillBeRawPtr<InterpolableValue> endValue = listToInterpolableValue(end);
+ InterpolableValue* startValue = listToInterpolableValue(start, &startNonInterpolableData);
+ InterpolableValue* endValue = listToInterpolableValue(end);
- return adoptRefWillBeNoop(new ListStyleInterpolationImpl<InterpolationType, NonInterpolableData>(startValue.release(), endValue.release(), id, startNonInterpolableData, range));
+ return new ListStyleInterpolationImpl<InterpolationType, NonInterpolableData>(startValue, endValue, id, startNonInterpolableData, range);
}
return nullptr;
}
void apply(StyleResolverState& state) const override
{
- StyleBuilder::applyProperty(m_id, state, interpolableValueToList(m_cachedValue.get(), m_nonInterpolableData, m_range).get());
+ StyleBuilder::applyProperty(m_id, state, interpolableValueToList(m_cachedValue, m_nonInterpolableData, m_range).get());
}
private:
- ListStyleInterpolationImpl(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id,
+ ListStyleInterpolationImpl(InterpolableValue* start, InterpolableValue* end, CSSPropertyID id,
Vector<typename InterpolationType::NonInterpolableType> nonInterpolableData, InterpolationRange range = RangeAll)
: StyleInterpolation(start, end, id)
, m_range(range)
@@ -55,19 +55,19 @@ private:
Vector<typename InterpolationType::NonInterpolableType> m_nonInterpolableData;
- static PassOwnPtrWillBeRawPtr<InterpolableValue> listToInterpolableValue(const CSSValue& value, Vector<typename InterpolationType::NonInterpolableType>* nonInterpolableData = nullptr)
+ static InterpolableValue* listToInterpolableValue(const CSSValue& value, Vector<typename InterpolationType::NonInterpolableType>* nonInterpolableData = nullptr)
{
const CSSValueList& listValue = toCSSValueList(value);
if (nonInterpolableData)
nonInterpolableData->reserveCapacity(listValue.length());
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(listValue.length());
+ InterpolableList* result = InterpolableList::create(listValue.length());
typename InterpolationType::NonInterpolableType elementData = typename InterpolationType::NonInterpolableType();
for (size_t i = 0; i < listValue.length(); i++) {
result->set(i, InterpolationType::toInterpolableValue(*listValue.item(i), elementData));
if (nonInterpolableData)
nonInterpolableData->append(elementData);
}
- return result.release();
+ return result;
}
static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToList(InterpolableValue* value, const Vector<typename InterpolationType::NonInterpolableType>& nonInterpolableData, InterpolationRange range = RangeAll)
@@ -88,7 +88,7 @@ private:
template<typename InterpolationType>
class ListStyleInterpolationImpl<InterpolationType, void> : public StyleInterpolation {
public:
- static PassRefPtrWillBeRawPtr<ListStyleInterpolationImpl<InterpolationType, void>> maybeCreateFromList(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range = RangeAll)
+ static ListStyleInterpolationImpl<InterpolationType, void>* maybeCreateFromList(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range = RangeAll)
{
if (!start.isValueList() || !end.isValueList())
return nullptr;
@@ -104,24 +104,24 @@ public:
if (!InterpolationType::canCreateFrom(*value))
return nullptr;
}
- return adoptRefWillBeNoop(new ListStyleInterpolationImpl<InterpolationType, void>(listToInterpolableValue(start), listToInterpolableValue(end), id, range));
+ return new ListStyleInterpolationImpl<InterpolationType, void>(listToInterpolableValue(start), listToInterpolableValue(end), id, range);
}
private:
- ListStyleInterpolationImpl(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, InterpolationRange range = RangeAll)
+ ListStyleInterpolationImpl(InterpolableValue* start, InterpolableValue* end, CSSPropertyID id, InterpolationRange range = RangeAll)
: StyleInterpolation(start, end, id), m_range(range)
{
}
InterpolationRange m_range;
- static PassOwnPtrWillBeRawPtr<InterpolableValue> listToInterpolableValue(const CSSValue& value)
+ static InterpolableValue* listToInterpolableValue(const CSSValue& value)
{
const CSSValueList& listValue = toCSSValueList(value);
- OwnPtrWillBeRawPtr<InterpolableList> result = InterpolableList::create(listValue.length());
+ InterpolableList* result = InterpolableList::create(listValue.length());
for (size_t i = 0; i < listValue.length(); i++)
result->set(i, InterpolationType::toInterpolableValue(*listValue.item(i)));
- return result.release();
+ return result;
}
static PassRefPtrWillBeRawPtr<CSSValue> interpolableValueToList(InterpolableValue* value, InterpolationRange range = RangeAll)
@@ -136,7 +136,7 @@ private:
void apply(StyleResolverState& state) const override
{
- StyleBuilder::applyProperty(m_id, state, interpolableValueToList(m_cachedValue.get(), m_range).get());
+ StyleBuilder::applyProperty(m_id, state, interpolableValueToList(m_cachedValue, m_range).get());
}
friend class ListStyleInterpolationTest;
@@ -146,7 +146,7 @@ private:
template<typename InterpolationType>
class ListStyleInterpolation {
public:
- static PassRefPtrWillBeRawPtr<ListStyleInterpolationImpl<InterpolationType, typename InterpolationType::NonInterpolableType>> maybeCreateFromList(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range = RangeAll)
+ static ListStyleInterpolationImpl<InterpolationType, typename InterpolationType::NonInterpolableType>* maybeCreateFromList(const CSSValue& start, const CSSValue& end, CSSPropertyID id, InterpolationRange range = RangeAll)
{
return ListStyleInterpolationImpl<InterpolationType, typename InterpolationType::NonInterpolableType>::maybeCreateFromList(start, end, id, range);
}
« no previous file with comments | « Source/core/animation/ListSVGInterpolation.h ('k') | Source/core/animation/ListStyleInterpolationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698