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

Unified Diff: Source/core/css/CSSCalculationValue.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: Fix second accumulateLength method 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
« no previous file with comments | « Source/core/css/CSSCalculationValue.h ('k') | Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCalculationValue.cpp
diff --git a/Source/core/css/CSSCalculationValue.cpp b/Source/core/css/CSSCalculationValue.cpp
index eb12edea330e731aff99fb838edb5c4eee9fd8c7..ee683dd8d74bbe9ffda7c4c6f04e732259ac7155 100644
--- a/Source/core/css/CSSCalculationValue.cpp
+++ b/Source/core/css/CSSCalculationValue.cpp
@@ -253,10 +253,10 @@ public:
return 0;
}
- virtual void accumulateLengthArray(CSSLengthArray& lengthArray, double multiplier) const override
+ virtual void accumulateLengthArray(CSSLengthArray& lengthArray, CSSLengthTypeArray& lengthTypeArray, double multiplier) const override
{
ASSERT(category() != CalcNumber);
- m_value->accumulateLengthArray(lengthArray, multiplier);
+ m_value->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier);
}
virtual bool equals(const CSSCalcExpressionNode& other) const override
@@ -449,27 +449,27 @@ public:
return evaluate(leftValue, rightValue);
}
- virtual void accumulateLengthArray(CSSLengthArray& lengthArray, double multiplier) const override
+ virtual void accumulateLengthArray(CSSLengthArray& lengthArray, CSSLengthTypeArray& lengthTypeArray, double multiplier) const override
{
switch (m_operator) {
case CalcAdd:
- m_leftSide->accumulateLengthArray(lengthArray, multiplier);
- m_rightSide->accumulateLengthArray(lengthArray, multiplier);
+ m_leftSide->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier);
+ m_rightSide->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier);
break;
case CalcSubtract:
- m_leftSide->accumulateLengthArray(lengthArray, multiplier);
- m_rightSide->accumulateLengthArray(lengthArray, -multiplier);
+ m_leftSide->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier);
+ m_rightSide->accumulateLengthArray(lengthArray, lengthTypeArray, -multiplier);
break;
case CalcMultiply:
ASSERT((m_leftSide->category() == CalcNumber) != (m_rightSide->category() == CalcNumber));
if (m_leftSide->category() == CalcNumber)
- m_rightSide->accumulateLengthArray(lengthArray, multiplier * m_leftSide->doubleValue());
+ m_rightSide->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier * m_leftSide->doubleValue());
else
- m_leftSide->accumulateLengthArray(lengthArray, multiplier * m_rightSide->doubleValue());
+ m_leftSide->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier * m_rightSide->doubleValue());
break;
case CalcDivide:
ASSERT(m_rightSide->category() == CalcNumber);
- m_leftSide->accumulateLengthArray(lengthArray, multiplier / m_rightSide->doubleValue());
+ m_leftSide->accumulateLengthArray(lengthArray, lengthTypeArray, multiplier / m_rightSide->doubleValue());
break;
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/css/CSSCalculationValue.h ('k') | Source/core/css/CSSPrimitiveValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698