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

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

Issue 1248093002: Move interpolated Length unit types out of InterpolableValue into NonInterpolableValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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/InvalidatableStyleInterpolation.cpp
diff --git a/Source/core/animation/InvalidatableStyleInterpolation.cpp b/Source/core/animation/InvalidatableStyleInterpolation.cpp
index a036febb3441751d8240c954f430abec19523580..82eeac6da9af29426356cee524bc98590239d15e 100644
--- a/Source/core/animation/InvalidatableStyleInterpolation.cpp
+++ b/Source/core/animation/InvalidatableStyleInterpolation.cpp
@@ -126,13 +126,14 @@ void InvalidatableStyleInterpolation::apply(StyleResolverState& state) const
ensureValidInterpolation(state, underlyingValue.get());
if (!m_cachedValue)
return;
- const InterpolableValue* appliedInterpolableValue = &m_cachedValue->interpolableValue();
+ const InterpolationValue* appliedValue = m_cachedValue.get();
if (underlyingValue && m_cachedValue->type() == underlyingValue->type()) {
+ appliedValue = underlyingValue.get();
double underlyingFraction = m_cachedConversion->interpolateUnderlyingFraction(m_startKeyframe.underlyingFraction(), m_endKeyframe.underlyingFraction(), m_currentFraction);
underlyingValue->interpolableValue().scaleAndAdd(underlyingFraction, m_cachedValue->interpolableValue());
- appliedInterpolableValue = &underlyingValue->interpolableValue();
+ underlyingValue->setNonInterpolableValue(m_cachedValue->type().mergeNonInterpolableValues(underlyingValue->nonInterpolableValue(), m_cachedValue->nonInterpolableValue()));
dstockwell 2015/08/31 06:44:26 It seems odd to modify the underlying value. Shoul
alancutter (OOO until 2018) 2015/09/01 00:26:00 Done.
}
- m_cachedValue->type().apply(*appliedInterpolableValue, m_cachedValue->nonInterpolableValue(), state);
+ appliedValue->type().apply(appliedValue->interpolableValue(), appliedValue->nonInterpolableValue(), state);
setFlagIfInheritUsed(state);
}

Powered by Google App Engine
This is Rietveld 408576698