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

Unified Diff: third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp

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/KeyframeEffectModel.cpp
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
index ab4703d3570cf134c0411892dfa8f1915a6bc060..e31edd7770bc43e97a7a47c9f33ff0dde8f0f22b 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
@@ -60,22 +60,14 @@ void KeyframeEffectModelBase::setFrames(KeyframeVector& keyframes)
m_keyframes = keyframes;
m_keyframeGroups = nullptr;
m_interpolationEffect.clear();
- m_lastFraction = std::numeric_limits<double>::quiet_NaN();
+ clearLastFraction();
}
-bool KeyframeEffectModelBase::sample(int iteration, double fraction, double iterationDuration, Vector<RefPtr<Interpolation>>& result) const
+void KeyframeEffectModelBase::sampleImpl(int iteration, double fraction, double iterationDuration, Vector<RefPtr<Interpolation>>& result) const
{
- ASSERT(iteration >= 0);
- ASSERT(!isNull(fraction));
ensureKeyframeGroups();
ensureInterpolationEffectPopulated();
-
- bool changed = iteration != m_lastIteration || fraction != m_lastFraction || iterationDuration != m_lastIterationDuration;
- m_lastIteration = iteration;
- m_lastFraction = fraction;
- m_lastIterationDuration = iterationDuration;
m_interpolationEffect.getActiveInterpolations(fraction, iterationDuration, result);
- return changed;
}
bool KeyframeEffectModelBase::snapshotNeutralCompositorKeyframes(Element& element, const ComputedStyle& oldStyle, const ComputedStyle& newStyle, const ComputedStyle* parentStyle) const
@@ -152,14 +144,6 @@ KeyframeEffectModelBase::KeyframeVector KeyframeEffectModelBase::normalizedKeyfr
return result;
}
-bool KeyframeEffectModelBase::isTransformRelatedEffect() const
-{
- return affects(PropertyHandle(CSSPropertyTransform))
- || affects(PropertyHandle(CSSPropertyRotate))
- || affects(PropertyHandle(CSSPropertyScale))
- || affects(PropertyHandle(CSSPropertyTranslate));
-}
-
void KeyframeEffectModelBase::ensureKeyframeGroups() const
{
if (m_keyframeGroups)

Powered by Google App Engine
This is Rietveld 408576698