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

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

Issue 292173009: Web Animations - responsive interpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@0519_MySeparation
Patch Set: applyAndSnapshotAnimatableValue Created 6 years, 7 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/StringKeyframe.cpp
diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp
index 5c310fe006c073c9e8aa19edff0feb59aa4359ce..99091dbb60ce566e81125579f069a08764278913 100644
--- a/Source/core/animation/StringKeyframe.cpp
+++ b/Source/core/animation/StringKeyframe.cpp
@@ -7,6 +7,7 @@
#include "core/animation/css/CSSAnimations.h"
#include "core/animation/interpolation/DefaultStyleInterpolation.h"
+#include "core/animation/interpolation/DeferredLegacyStyleInterpolation.h"
#include "core/animation/interpolation/LegacyStyleInterpolation.h"
#include "core/animation/interpolation/LengthStyleInterpolation.h"
#include "core/css/resolver/StyleResolver.h"
@@ -113,12 +114,15 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe::
break;
}
+ if (DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(*fromCSSValue) || DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(*toCSSValue))
+ return DeferredLegacyStyleInterpolation::create(fromCSSValue, toCSSValue, property);
+
// FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here.
// FIXME: Remove this cache
if (!m_animatableValueCache)
- m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(*element, property, fromCSSValue);
+ m_animatableValueCache = StyleResolver::applyAndSnapshotAnimatableValue(*element, property, *fromCSSValue);
shans 2014/05/26 03:31:01 This is a bad name. Can we go back to createAnimat
Eric Willigers 2014/05/26 06:32:47 Done.
- RefPtrWillBeRawPtr<AnimatableValue> to = StyleResolver::createAnimatableValueSnapshot(*element, property, toCSSValue);
+ RefPtrWillBeRawPtr<AnimatableValue> to = StyleResolver::applyAndSnapshotAnimatableValue(*element, property, *toCSSValue);
toStringPropertySpecificKeyframe(end)->m_animatableValueCache = to;
return LegacyStyleInterpolation::create(m_animatableValueCache.get(), to.release(), property);

Powered by Google App Engine
This is Rietveld 408576698