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

Unified Diff: Source/core/animation/LengthInterpolationType.cpp

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/LengthInterpolationType.cpp
diff --git a/Source/core/animation/LengthInterpolationType.cpp b/Source/core/animation/LengthInterpolationType.cpp
index b623ac3d8eb0c4c100cd96d4a65a2e85e9d3177d..ce2e969626f53e0b7e950044c4cebb8687dd75e9 100644
--- a/Source/core/animation/LengthInterpolationType.cpp
+++ b/Source/core/animation/LengthInterpolationType.cpp
@@ -16,29 +16,29 @@ LengthInterpolationType::LengthInterpolationType(CSSPropertyID property)
, m_valueRange(LengthPropertyFunctions::valueRange(property))
{ }
-static PassOwnPtrWillBeRawPtr<InterpolableList> createNeutralValue()
+static InterpolableList* createNeutralValue()
{
- OwnPtrWillBeRawPtr<InterpolableList> listOfValuesAndTypes = InterpolableList::create(2);
+ InterpolableList* listOfValuesAndTypes = InterpolableList::create(2);
const size_t length = CSSPrimitiveValue::LengthUnitTypeCount;
- OwnPtrWillBeRawPtr<InterpolableList> listOfValues = InterpolableList::create(length);
+ InterpolableList* listOfValues = InterpolableList::create(length);
// TODO(alancutter): Use a NonInterpolableValue to represent the list of types.
- OwnPtrWillBeRawPtr<InterpolableList> listOfTypes = InterpolableList::create(length);
+ InterpolableList* listOfTypes = InterpolableList::create(length);
for (size_t i = 0; i < length; i++) {
listOfValues->set(i, InterpolableNumber::create(0));
listOfTypes->set(i, InterpolableNumber::create(0));
}
- listOfValuesAndTypes->set(0, listOfValues.release());
- listOfValuesAndTypes->set(1, listOfTypes.release());
- return listOfValuesAndTypes.release();
+ listOfValuesAndTypes->set(0, listOfValues);
+ listOfValuesAndTypes->set(1, listOfTypes);
+ return listOfValuesAndTypes;
}
-PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvertLength(const Length& length, float zoom) const
+InterpolationValue* LengthInterpolationType::maybeConvertLength(const Length& length, float zoom) const
{
if (!length.isSpecified())
return nullptr;
PixelsAndPercent pixelsAndPercent = length.pixelsAndPercent();
- OwnPtrWillBeRawPtr<InterpolableList> valuesAndTypes = createNeutralValue();
+ InterpolableList* valuesAndTypes = createNeutralValue();
InterpolableList& values = toInterpolableList(*valuesAndTypes->get(0));
values.set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(pixelsAndPercent.pixels / zoom));
@@ -48,14 +48,14 @@ PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvert
types.set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(1));
types.set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(1));
- return InterpolationValue::create(*this, valuesAndTypes.release());
+ return InterpolationValue::create(*this, valuesAndTypes);
}
class ParentLengthChecker : public InterpolationType::ConversionChecker {
public:
- static PassOwnPtrWillBeRawPtr<ParentLengthChecker> create(CSSPropertyID property, const Length& length)
+ static ParentLengthChecker* create(CSSPropertyID property, const Length& length)
{
- return adoptPtrWillBeNoop(new ParentLengthChecker(property, length));
+ return new ParentLengthChecker(property, length);
}
private:
@@ -81,12 +81,12 @@ private:
const Length m_length;
};
-PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvertNeutral() const
+InterpolationValue* LengthInterpolationType::maybeConvertNeutral() const
{
return InterpolationValue::create(*this, createNeutralValue());
}
-PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvertInitial() const
+InterpolationValue* LengthInterpolationType::maybeConvertInitial() const
{
Length initialLength;
if (!LengthPropertyFunctions::getInitialLength(m_property, initialLength))
@@ -94,7 +94,7 @@ PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvert
return maybeConvertLength(initialLength, 1);
}
-PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvertInherit(const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
+InterpolationValue* LengthInterpolationType::maybeConvertInherit(const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
{
if (!state || !state->parentStyle())
return nullptr;
@@ -105,16 +105,16 @@ PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvert
return maybeConvertLength(inheritedLength, state->parentStyle()->effectiveZoom());
}
-PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
+InterpolationValue* LengthInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
{
if (!value.isPrimitiveValue())
return nullptr;
const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
- OwnPtrWillBeRawPtr<InterpolableList> listOfValuesAndTypes = InterpolableList::create(2);
- OwnPtrWillBeRawPtr<InterpolableList> listOfValues = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
- OwnPtrWillBeRawPtr<InterpolableList> listOfTypes = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
+ InterpolableList* listOfValuesAndTypes = InterpolableList::create(2);
+ InterpolableList* listOfValues = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
+ InterpolableList* listOfTypes = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
CSSLengthArray arrayOfValues;
CSSLengthTypeArray arrayOfTypes;
@@ -140,13 +140,13 @@ PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvert
listOfTypes->set(i, InterpolableNumber::create(arrayOfTypes.get(i)));
}
- listOfValuesAndTypes->set(0, listOfValues.release());
- listOfValuesAndTypes->set(1, listOfTypes.release());
+ listOfValuesAndTypes->set(0, listOfValues);
+ listOfValuesAndTypes->set(1, listOfTypes);
- return InterpolationValue::create(*this, listOfValuesAndTypes.release());
+ return InterpolationValue::create(*this, listOfValuesAndTypes);
}
-PassOwnPtrWillBeRawPtr<InterpolationValue> LengthInterpolationType::maybeConvertUnderlyingValue(const StyleResolverState& state) const
+InterpolationValue* LengthInterpolationType::maybeConvertUnderlyingValue(const StyleResolverState& state) const
{
Length underlyingLength;
if (!LengthPropertyFunctions::getLength(m_property, *state.style(), underlyingLength))
« no previous file with comments | « Source/core/animation/LengthInterpolationType.h ('k') | Source/core/animation/LengthPairStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698