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

Unified Diff: Source/core/css/CSSPrimitiveValue.cpp

Issue 813233002: Animation: Fix loss of type information when interpolating value of 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Attempt no2 at fixing linux oilpan errors Created 6 years 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/css/CSSPrimitiveValue.cpp
diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
index d374c542df1dcf1ec4d9f15b0f90cdf07b99f96c..39b26e8b34239d168045e0b774e9bfa1545e6e97 100644
--- a/Source/core/css/CSSPrimitiveValue.cpp
+++ b/Source/core/css/CSSPrimitiveValue.cpp
@@ -665,18 +665,20 @@ double CSSPrimitiveValue::computeLengthDouble(const CSSToLengthConversionData& c
return result * conversionData.zoom();
}
-void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, double multiplier) const
+void CSSPrimitiveValue::accumulateLengthArray(CSSLengthArray& lengthArray, CSSLengthTypeArray& lengthTypeArray, double multiplier) const
{
ASSERT(lengthArray.size() == LengthUnitTypeCount);
if (m_primitiveUnitType == CSS_CALC) {
- cssCalcValue()->accumulateLengthArray(lengthArray, multiplier);
+ cssCalcValue()->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier);
return;
}
LengthUnitType lengthType;
- if (unitTypeToLengthUnitType(static_cast<UnitType>(m_primitiveUnitType), lengthType))
+ if (unitTypeToLengthUnitType(static_cast<UnitType>(m_primitiveUnitType), lengthType)) {
lengthArray.at(lengthType) += m_value.num * conversionToCanonicalUnitsScaleFactor(static_cast<UnitType>(m_primitiveUnitType)) * multiplier;
+ lengthTypeArray.set(lengthType);
+ }
}
double CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(UnitType unitType)

Powered by Google App Engine
This is Rietveld 408576698