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

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

Issue 2236193002: WIP: Implement CSS transitions on top of InterpolationTypes instead of AnimatableValues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_environmentStyle
Patch Set: Created 4 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: third_party/WebKit/Source/core/animation/InterpolationType.h
diff --git a/third_party/WebKit/Source/core/animation/InterpolationType.h b/third_party/WebKit/Source/core/animation/InterpolationType.h
index f5f65bfd9066adf8ac1dcddb0e7a5adad8b1e6dd..5ebd1f2582b42ecb435957f2d45c7ed1f2d3b175 100644
--- a/third_party/WebKit/Source/core/animation/InterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/InterpolationType.h
@@ -60,14 +60,24 @@ public:
return maybeMergeSingles(std::move(start), std::move(end));
}
+ virtual PairwiseInterpolationValue maybeMergeSingles(InterpolationValue&& start, InterpolationValue&& end) const
+ {
+ DCHECK(!start.nonInterpolableValue);
+ DCHECK(!end.nonInterpolableValue);
+ return PairwiseInterpolationValue(
+ std::move(start.interpolableValue),
+ std::move(end.interpolableValue),
+ nullptr);
+ }
+
virtual InterpolationValue maybeConvertSingle(const PropertySpecificKeyframe&, const InterpolationEnvironment&, const InterpolationValue& underlying, ConversionCheckers&) const = 0;
virtual InterpolationValue maybeConvertUnderlyingValue(const InterpolationEnvironment&) const = 0;
virtual void composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
- ASSERT(!underlyingValueOwner.value().nonInterpolableValue);
- ASSERT(!value.nonInterpolableValue);
+ DCHECK(!underlyingValueOwner.value().nonInterpolableValue);
+ DCHECK(!value.nonInterpolableValue);
underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
}
@@ -82,16 +92,6 @@ protected:
: m_property(property)
{ }
- virtual PairwiseInterpolationValue maybeMergeSingles(InterpolationValue&& start, InterpolationValue&& end) const
- {
- ASSERT(!start.nonInterpolableValue);
- ASSERT(!end.nonInterpolableValue);
- return PairwiseInterpolationValue(
- std::move(start.interpolableValue),
- std::move(end.interpolableValue),
- nullptr);
- }
-
const PropertyHandle m_property;
};

Powered by Google App Engine
This is Rietveld 408576698