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

Unified Diff: Source/core/animation/InterpolationType.h

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/InterpolationType.h
diff --git a/Source/core/animation/InterpolationType.h b/Source/core/animation/InterpolationType.h
index b32232d5f5d09eeec32fa15a382579b7021a4e96..906ef9f9bb95768b39d4bbfcf60b742789c0c8b2 100644
--- a/Source/core/animation/InterpolationType.h
+++ b/Source/core/animation/InterpolationType.h
@@ -39,7 +39,11 @@ public:
OwnPtrWillBeRawPtr<InterpolationValue> endValue = maybeConvertSingle(endKeyframe, state, conversionCheckers);
if (!endValue)
return nullptr;
- return PairwisePrimitiveInterpolation::create(*this, startValue->m_interpolableValue.release(), endValue->m_interpolableValue.release(), startValue->m_nonInterpolableValue.release());
+ return PairwisePrimitiveInterpolation::create(
+ *this,
+ startValue->m_interpolableValue.release(),
+ endValue->m_interpolableValue.release(),
+ mergeNonInterpolableValues(startValue->nonInterpolableValue(), endValue->nonInterpolableValue()));
}
virtual PassOwnPtrWillBeRawPtr<InterpolationValue> maybeConvertSingle(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState* state, ConversionCheckers& conversionCheckers) const
@@ -56,9 +60,15 @@ public:
virtual PassOwnPtrWillBeRawPtr<InterpolationValue> maybeConvertUnderlyingValue(const StyleResolverState&) const = 0;
+ virtual PassRefPtrWillBeRawPtr<NonInterpolableValue> mergeNonInterpolableValues(const NonInterpolableValue* a, const NonInterpolableValue* b) const
dstockwell 2015/08/31 06:44:26 comment, what does it mean to merge these?
alancutter (OOO until 2018) 2015/09/01 00:26:00 Added comment. Changed default implementation to a
+ {
+ // Remove const for ref counting.
+ return const_cast<NonInterpolableValue*>(b);
+ }
+
virtual void apply(const InterpolableValue&, const NonInterpolableValue*, StyleResolverState&) const = 0;
- // Implement reference equality checking via pointer equality checking as these are singletons
+ // Implement reference equality checking via pointer equality checking as these are singletons.
bool operator==(const InterpolationType& other) const { return this == &other; }
bool operator!=(const InterpolationType& other) const { return this != &other; }

Powered by Google App Engine
This is Rietveld 408576698