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

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

Issue 851633002: Animation: Add template for ListStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add else to shadowToInterpolableValue Created 5 years, 11 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/LengthStyleInterpolation.cpp
diff --git a/Source/core/animation/LengthStyleInterpolation.cpp b/Source/core/animation/LengthStyleInterpolation.cpp
index 27794a6609a7cffab5c244cb32d71943dbf7c182..effaf43168f31f34598aba819483a4db8969647f 100644
--- a/Source/core/animation/LengthStyleInterpolation.cpp
+++ b/Source/core/animation/LengthStyleInterpolation.cpp
@@ -24,7 +24,7 @@ bool LengthStyleInterpolation::canCreateFrom(const CSSValue& value)
return value.isCalcValue();
}
-PassOwnPtrWillBeRawPtr<InterpolableValue> LengthStyleInterpolation::lengthToInterpolableValue(const CSSValue& value)
+PassOwnPtrWillBeRawPtr<InterpolableValue> LengthStyleInterpolation::toInterpolableValue(const CSSValue& value)
{
ASSERT(canCreateFrom(value));
OwnPtrWillBeRawPtr<InterpolableList> listOfValuesAndTypes = InterpolableList::create(2);
@@ -81,9 +81,9 @@ static PassRefPtrWillBeRawPtr<CSSCalcExpressionNode> constructCalcExpression(Pas
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> LengthStyleInterpolation::interpolableValueToLength(const InterpolableValue* value, InterpolationRange range)
+PassRefPtrWillBeRawPtr<CSSPrimitiveValue> LengthStyleInterpolation::fromInterpolableValue(const InterpolableValue& value, InterpolationRange range)
{
- const InterpolableList* listOfValuesAndTypes = toInterpolableList(value);
+ const InterpolableList* listOfValuesAndTypes = toInterpolableList(&value);
const InterpolableList* listOfValues = toInterpolableList(listOfValuesAndTypes->get(0));
const InterpolableList* listOfTypes = toInterpolableList(listOfValuesAndTypes->get(1));
unsigned unitTypeCount = 0;
@@ -117,7 +117,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> LengthStyleInterpolation::interpolable
void LengthStyleInterpolation::apply(StyleResolverState& state) const
{
- StyleBuilder::applyProperty(m_id, state, interpolableValueToLength(m_cachedValue.get(), m_range).get());
+ StyleBuilder::applyProperty(m_id, state, fromInterpolableValue(*m_cachedValue.get(), m_range).get());
}
void LengthStyleInterpolation::trace(Visitor* visitor)
« no previous file with comments | « Source/core/animation/LengthStyleInterpolation.h ('k') | Source/core/animation/LengthStyleInterpolationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698