Add foundation for removing AnimatableValues from StyleInterpolation
This is the initial patch for upgrading StyleInterpolations away from
relying on AnimatableValues for non-trivial keyframe values like "inherit"
and breaking free from the dependency on StyleResolver when constructing
animations.
This design is also intended to support additive animations in the near future.
This change implements the DefaultAnimationType which covers animation of
all non-interpolable properties in element.animate().
BUG=450238, 437696
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197705
4 years, 11 months ago
(2015-05-25 06:36:04 UTC)
#6
Eric Willigers
https://codereview.chromium.org/1153943003/diff/220001/Source/core/animation/AnimationValue.h File Source/core/animation/AnimationValue.h (right): https://codereview.chromium.org/1153943003/diff/220001/Source/core/animation/AnimationValue.h#newcode24 Source/core/animation/AnimationValue.h:24: : type(nullptr) Can these initializations be indented. Also for ...
4 years, 11 months ago
(2015-05-27 04:26:35 UTC)
#7
Thanks for the quick review. https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/AnimationType.h File Source/core/animation/AnimationType.h (right): https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/AnimationType.h#newcode33 Source/core/animation/AnimationType.h:33: return false; On 2015/05/28 ...
4 years, 11 months ago
(2015-06-01 07:35:29 UTC)
#15
Thanks for the quick review.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/AnimationType.h (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/AnimationType.h:33: return false;
On 2015/05/28 05:48:13, shans wrote:
> Shouldn't the default implementation of this attempt two single conversions?
Yes. DefaultAnimationType does not make use of it at the moment so I left it out
of this patch.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/AnimationValue.h (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/AnimationValue.h:47: interpolableValue =
other.interpolableValue ? other.interpolableValue->clone() : nullptr;
On 2015/05/28 05:48:13, shans wrote:
> Are AnimationValues mutable? I can't think of a strong reason why the
> interpolableValue would be mutated (as opposed to maybe just replaced
depending
> on implementation details).
They are mutable as a consequence of InterpolableValues being mutable.
InterpolableValue::interpolate() mutates its InterpolableValue out parameter.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/AnimationValue.h:58: void consume(AnimationValue& other)
On 2015/05/28 05:48:13, shans wrote:
> what is consume?
Renamed to swap() to match Vector::swap() and added comment.
Once Oilpan lands this can be removed as InterpolableValues will cease to be
OwnPtr'd.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/InterpolationInvalidators.h (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InterpolationInvalidators.h:14: class
InterpolationInvalidators : public
RefCountedWillBeGarbageCollectedFinalized<InterpolationInvalidators> {
On 2015/05/28 05:48:13, shans wrote:
> This needs either documentation, better names, or (preferably) both.
ConversionInvalidator is probably more accurate since these objects indicate
when an AnimationType's conversion becomes invalid as a result of a change in
the environment.
Renamed and added comment.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InterpolationInvalidators.h:23: static void
chain(RefPtrWillBeRawPtr<InterpolationInvalidators>& prefix,
PassRefPtrWillBeRawPtr<InterpolationInvalidators> suffix)
On 2015/05/28 at 00:34:48, Eric Willigers wrote:
> It would be nice to have a unit test that uses chain, chainIsInvalid.
Done.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InterpolationInvalidators.h:42: void
chainWith(PassRefPtrWillBeRawPtr<InterpolationInvalidators> suffix)
On 2015/05/28 05:48:13, shans wrote:
> Maybe use a Vector instead? This seems rather heavy-weight.
This is actually designed to be lightweight in the common case as you can use a
nullptr to mean a conversion is never invalid. Using vectors will force us to
allocate every time.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/InvalidatableStyleInterpolation.cpp (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:26:
ASSERT_UNUSED(m_type, result.type == &m_type);
On 2015/05/28 05:48:14, shans wrote:
> This doesn't need to be ASSERT_UNUSED.
This used to be ASSERT but it failed to compile in release.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:27:
ASSERT(result.nonInterpolableValue == m_nonInterpolableValue);
On 2015/05/28 05:48:14, shans wrote:
> These probably aren't needed here. We can assert these properties up-front and
> when the values are changed.
This assertion is to check that nothing's messed with
InvalidatableStyleInterpolation::m_cachedValue unexpectedly since the pairwise
conversion. Putting the assertion at the conversion isn't semantically
equivalent.
I may be mistaking where you meant for the assertion to be, can you elaborate?
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:73: if
(!std::isnan(m_lastFraction) && isBeforeFlip(fraction) ==
isBeforeFlip(m_lastFraction))
On 2015/05/28 05:48:14, shans wrote:
> isBeforeFlip is a more obscure name than < 0.5...
Inlined isBeforeFlip().
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:125: if
(animationType->maybeConvertPairwise(*m_startKeyframe, *m_endKeyframe, state,
invalidators, startInterpolableValue, endInterpolableValue,
nonInterpolableValue)) {
On 2015/05/28 05:48:13, shans wrote:
> This is quite messy, and strongly suggests that maybeConvertPairwise should
> return the PairwiseConversionCache directly.
Something I decided when making the AnimationType interface is to avoid having
them return a pointer to themselves redundantly. Doing it the suggested way
avoids having so many out parameters but would mean PairwiseConversionCache and
ConversionCache get exposed outside of InvalidatableStyleInterpolation.
I opted for the former for its semantic purity at the cost of messy function
signatures. It doesn't seem right to be required to say "animationType = this"
in every AnimationType subclass (assuming maybeConvertSingle() is updated to
match the convention).
WDYT is better?
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/NonInterpolableValue.h (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/NonInterpolableValue.h:22: #define
DECLARE_NON_INTERPOLABLE_VALUE_TYPE() \
On 2015/05/28 05:48:14, shans wrote:
> This requires a very clear documented statement of intent and typical usage.
Done.
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/StringKeyframe.cpp (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/StringKeyframe.cpp:156: const Vector<const
AnimationType*>* applicableTypesForProperty(CSSPropertyID property)
On 2015/05/28 05:48:14, shans wrote:
> This can be deferred until we support anything that isAnimatableProperty.
This code serves the AnimationTypes as per property singleton objects in line
with the overall design. This will allow different Interpolations to determine
whether they can composite together or not by sharing the same AnimationType
object between them.
Unfortunately it can't be replaced with something simple like
if (!isAnimatableProperty(property))
return InvalidatableStyleInterpolation::create(...);
because this is missing an owner of the AnimationType object. Adding one would
bring us back to the code that's currently here or something equally lengthy
that goes against the memory model that AnimationTypes have been designed for.
4 years, 11 months ago
(2015-06-01 23:47:54 UTC)
#16
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
File Source/core/animation/InvalidatableStyleInterpolation.cpp (right):
https://codereview.chromium.org/1153943003/diff/270001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:125: if
(animationType->maybeConvertPairwise(*m_startKeyframe, *m_endKeyframe, state,
invalidators, startInterpolableValue, endInterpolableValue,
nonInterpolableValue)) {
On 2015/06/01 07:35:29, alancutter wrote:
> On 2015/05/28 05:48:13, shans wrote:
> > This is quite messy, and strongly suggests that maybeConvertPairwise should
> > return the PairwiseConversionCache directly.
>
> Something I decided when making the AnimationType interface is to avoid having
> them return a pointer to themselves redundantly. Doing it the suggested way
> avoids having so many out parameters but would mean PairwiseConversionCache
and
> ConversionCache get exposed outside of InvalidatableStyleInterpolation.
>
> I opted for the former for its semantic purity at the cost of messy function
> signatures. It doesn't seem right to be required to say "animationType = this"
> in every AnimationType subclass (assuming maybeConvertSingle() is updated to
> match the convention).
>
> WDYT is better?
On second thought I can just define a return struct for these conversion
functions. It'll be a bit ugly at first due to the OwnPtrs but once Oilpan lands
the ugliness will go away.
alancutter (OOO until 2018)
Refactored patch based on review. PTAL. maybeConvertPairwise() no longer takes a ghastly list of out ...
4 years, 11 months ago
(2015-06-02 07:48:41 UTC)
#17
Refactored patch based on review. PTAL.
maybeConvertPairwise() no longer takes a ghastly list of out parameters, instead
returns a PairwiseAnimationConversion object. Similarly for maybeConvertSingle()
which returns an AnimationConversionHalf.
These objects replace InvalidatableStyleInterpolation::ConversionCache and live
in AnimationConversion.h.
With these changes AnimationValue::swap/consume() is no longer necessary.
shans
So the new way of doing things is: StringKeyframe is tasked with creating Interpolations. It ...
4 years, 11 months ago
(2015-06-04 00:15:16 UTC)
#18
So the new way of doing things is:
StringKeyframe is tasked with creating Interpolations. It uses
StringKeyframe::applicableTypesForProperty(CSSPropertyID) to retrieve the
AnimationTypes that are valid for the given propertyID.
An AnimationType is:
* a type reference
* a handle via which conversion to AnimationConversionHalf /
PairwiseAnimationConversion objects can be performed.
* a handle via which application of an InterpolableValue/NonInterpolableValue
into a StyleResolverState can be performed.
InvalidatableStyleInterpolation (eventually just 'StyleInterpolation') is
responsible for building itself around the list of AnimationTypes for a given
CSSPropertyID. It's important that ISI has the full list of AnimationTypes
because it may need to switch internal representations in the future (e.g.
because of additive animation).
The "fast path" for ISI is that it caches a pairwise conversion, hopefully
forever. But PairwiseAnimationConversions have a list of Invalidators that
can be used to retire the conversion when it's no longer appropriate. The
invalidator list is installed based on what the particular ISI might be
sensitive to (is it additive? Could changes in underlying value type cause
a need to rebuild the conversion?).
Questions not addressed by this patch:
--------------------------------------
* when/where is validateCache called?
* can validateCache ever fail? It seems that it can, because m_cachedConversion
can be empty. But interpolations can't ever fail. What do?
* Why is the default fallback partially built into
InvalidatableStyleInterpolation via convertSingleKeyframe? Shouldn't the
DefaultAnimationType deal with this?
Naming
------
PairwiseAnimationConversion: this is actually the interpolation primitive now.
PrimitiveInterpolation? PrimitiveStyleInterpolation?
AnimationConversionHalf: Does this need to have independent existence outside of
DefaultAnimationType? Currently it's also used by
InvalidatableStyleInterpolation (but
here seems to be duplicating what DefaultAnimationType does) and by
maybeConvertSingle in
AnimationType (but this is only called by InvalidatableStyleInterpolation). If
it
doesn't, then we can come up with a much simpler name.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/AnimationConversion.h (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/AnimationConversion.h:92: struct AnimationConversionHalf :
public NoBaseWillBeGarbageCollectedFinalized<AnimationConversionHalf> {
Not sure about this name.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/AnimationValue.h (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/AnimationValue.h:39: void copy(const AnimationValue&
other)
Should this not just be a copy constructor?
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/InvalidatableStyleInterpolation.cpp (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:22:
maybeCachePairwiseConversion(nullptr);
should be doing the convertSingleKeyframe fallback in validateCache here too?
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:46:
m_cachedValue.clear();
Is this right? I thought we always needed a way to interpolate.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:54: result->type =
animationType;
This isn't the right way to do this! result was *just generated* by
animationType - put the type setting code into maybeConvertSingle instead.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/animatable/AnimatableValueKeyframe.cpp (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/animatable/AnimatableValueKeyframe.cpp:71:
PassRefPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe>
AnimatableValueKeyframe::PropertySpecificKeyframe::neutralKeyframe(double
offset, PassRefPtr<TimingFunction> easing) const
Can you provide a high-level justification of why PSKs need to be refcounted
rather than owned now?
dstockwell
Could you add some class level comments for the new types? It would help in ...
4 years, 10 months ago
(2015-06-10 00:52:45 UTC)
#19
Could you add some class level comments for the new types? It would help in
understanding.
alancutter (OOO until 2018)
On 2015/06/04 at 00:15:16, shans wrote: > Questions not addressed by this patch: > -------------------------------------- ...
4 years, 10 months ago
(2015-06-11 04:15:13 UTC)
#20
On 2015/06/04 at 00:15:16, shans wrote:
> Questions not addressed by this patch:
> --------------------------------------
> * when/where is validateCache called?
It's called in InvalidatableStyleInterpolation::apply().
> * can validateCache ever fail? It seems that it can, because
m_cachedConversion
> can be empty. But interpolations can't ever fail. What do?
It should never fail, removed cache check in apply().
> * Why is the default fallback partially built into
> InvalidatableStyleInterpolation via convertSingleKeyframe? Shouldn't the
> DefaultAnimationType deal with this?
DefaultAnimationType has been renamed to CSSValueAnimationType to be more clear.
A 50% flip can be between any AnimationType as we will still want to composite
correctly with these values in the near future.
The flip interpolation behaviour is represented by FlipInterpolationConversion
and decided upon by InvalidatableStyleInterpolation when all its animationTypes
fail to make a pairwise conversion.
>
> Naming
> ------
>
> PairwiseAnimationConversion: this is actually the interpolation primitive now.
> PrimitiveInterpolation? PrimitiveStyleInterpolation?
Done. Used InterpolationPrimitve instead as the *Interpolation namespace has
come to mean a subclass of Interpolation.
It might make sense to eventually merge InvalidatableStyleInterpolation with
InterpolationRecord and rename InterpolationPrimitive as Interpolation, WDYT?
> AnimationConversionHalf: Does this need to have independent existence outside
of
> DefaultAnimationType? Currently it's also used by
InvalidatableStyleInterpolation (but
> here seems to be duplicating what DefaultAnimationType does) and by
maybeConvertSingle in
> AnimationType (but this is only called by InvalidatableStyleInterpolation). If
it
> doesn't, then we can come up with a much simpler name.
Quite correct, it doesn't need to be defined separately. Moved into
FlipInterpolationPrimitive and renamed to Side.
As discussed before DefaultAnimationType was a bad name and has been renamed to
CSSValueAnimationType, it never was intended to represent the 50% flip
behaviour.
On 2015/06/10 at 00:52:45, dstockwell wrote:
> Could you add some class level comments for the new types? It would help in
understanding.
Done.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/AnimationConversion.h (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/AnimationConversion.h:92: struct AnimationConversionHalf :
public NoBaseWillBeGarbageCollectedFinalized<AnimationConversionHalf> {
On 2015/06/04 at 00:15:15, shans wrote:
> Not sure about this name.
Renamed:
AnimationConversion -> InterpolationPrimitive
PairwiseAnimationConversion -> PairwiseInterpolationPrimitive
DefaultAnimationConversion -> FlipInterpolationPrimitive
Moved AnimationConversionHalf to inside FlipInterpolationPrimitive (since its
sole purpose is to make passing data into the constructor cleaner) and renamed
as Side.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/AnimationValue.h (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/AnimationValue.h:39: void copy(const AnimationValue&
other)
On 2015/06/04 at 00:15:15, shans wrote:
> Should this not just be a copy constructor?
This is used in "result.copy((fraction < 0.5) ? m_start : m_end)" in
FlipInterpolationPrimitive::interpolate() which would use a copy assignment
rather than a copy constructor. I think copy() is more clear in the caller code
than overloaded operator=.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/InvalidatableStyleInterpolation.cpp (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:22:
maybeCachePairwiseConversion(nullptr);
On 2015/06/04 at 00:15:15, shans wrote:
> should be doing the convertSingleKeyframe fallback in validateCache here too?
If pairwise conversion fails here we hold off until we have a StyleResolverState
to try again. We only fall back to flipping between keyframes if we absolutely
can't do a pairwise conversion.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:46:
m_cachedValue.clear();
On 2015/06/04 at 00:15:15, shans wrote:
> Is this right? I thought we always needed a way to interpolate.
interpolate() may be called prior to apply(). Some conversions depend on the
environment provided by apply() and cannot be created beforehand.
Looking at this again it's not necessary to clear the cached value, removed the
else branch.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:54: result->type =
animationType;
On 2015/06/04 at 00:15:15, shans wrote:
> This isn't the right way to do this! result was *just generated* by
animationType - put the type setting code into maybeConvertSingle instead.
Done.
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
File Source/core/animation/animatable/AnimatableValueKeyframe.cpp (right):
https://codereview.chromium.org/1153943003/diff/350001/Source/core/animation/...
Source/core/animation/animatable/AnimatableValueKeyframe.cpp:71:
PassRefPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe>
AnimatableValueKeyframe::PropertySpecificKeyframe::neutralKeyframe(double
offset, PassRefPtr<TimingFunction> easing) const
On 2015/06/04 at 00:15:15, shans wrote:
> Can you provide a high-level justification of why PSKs need to be refcounted
rather than owned now?
Reconsidering this I think there should be no reason why the lifetime of
PropertySpecificKeyframes (m_keyframeGroups) shouldn't outlive the lifetime of
Interpolations (m_interpolationEffect). Removed this part of the patch and
changed m_start/endKeyframe into references on InvalidatableStyleInterpolation,
this removes a lot of noise from the patch. :)
alancutter (OOO until 2018)
Separated Invalidators from InterpolationPrimitive. It's possible for a pairwise conversion's decision to return nullptr to ...
4 years, 10 months ago
(2015-06-19 00:56:18 UTC)
#21
Separated Invalidators from InterpolationPrimitive.
It's possible for a pairwise conversion's decision to return nullptr to be
invalidated by a change in the environment. Example: Length will fail to
pairwise convert "inherit -> 100px" with an inherited value of auto but this
changes when the inherited value becomes 0px.
With Invalidators being separate from InterpolationPrimitives it no longer made
sense to define them together. Renamed Invalidator to ConversionInvalidator and
moved the definition into AnimationType. InvalidatableStyleInterpolation now
stores ConversionInvalidators along side its cached conversion.
PTAL.
shans
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/AnimationType.h File Source/core/animation/AnimationType.h (right): https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/AnimationType.h#newcode18 Source/core/animation/AnimationType.h:18: // A singleton class that provides functions for: We ...
4 years, 10 months ago
(2015-06-22 11:43:22 UTC)
#22
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/AnimationType.h File Source/core/animation/AnimationType.h (right): https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/AnimationType.h#newcode18 Source/core/animation/AnimationType.h:18: // A singleton class that provides functions for: On ...
4 years, 10 months ago
(2015-06-23 05:05:33 UTC)
#23
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
File Source/core/animation/AnimationType.h (right):
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/AnimationType.h:18: // A singleton class that provides
functions for:
On 2015/06/22 at 11:43:21, shans wrote:
> We already know this is a class which provides functions, no need to tell us
again.
Done.
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/AnimationType.h:20: // - Applying interpolation compatible
representations of values to a StyleResolverState.
On 2015/06/22 at 11:43:21, shans wrote:
> Reference the functions that do these two things.
Done.
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/AnimationType.h:45: }
On 2015/06/22 at 11:43:21, shans wrote:
> nit: it's probably better just to result->type = this; in each subclass.
Adding an impl method seems really heavyweight in comparison.
Done.
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
File Source/core/animation/InterpolationPrimitive.h (right):
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/InterpolationPrimitive.h:19: class InterpolationPrimitive
: public NoBaseWillBeGarbageCollectedFinalized<InterpolationPrimitive> {
On 2015/06/22 at 11:43:21, shans wrote:
> This isn't a primitive used in interpolation, this is a primitive type of
> interpolation. Use PrimitiveInterpolation. Reasoning that all *Interpolations
> are so far subclasses of Interpolation is invalid as:
> (1) we made that rule up, and not deliberately.
> (2) we're setting out to remove all other subclasses of Interpolation.
Done.
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
File Source/core/animation/InvalidatableStyleInterpolation.cpp (right):
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:43:
m_cachedConversion->interpolate(fraction, m_cachedValue);
On 2015/06/22 at 11:43:21, shans wrote:
> comment inline that interpolation is deferred to validateCache if
> m_cachedConversion is null.
Done.
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:76:
m_cachedConversion->interpolate(m_currentFraction, m_cachedValue);
On 2015/06/22 at 11:43:21, shans wrote:
> It's slightly weird to see interpolate called inside ensureValidCache.
>
> Maybe ensureInterpolation?
We may have already interpolated, this also checks whether it's still valid
given the latest style environment. Renamed to ensureValidInterpolation().
https://codereview.chromium.org/1153943003/diff/430001/Source/core/animation/...
Source/core/animation/InvalidatableStyleInterpolation.cpp:77: }
On 2015/06/22 at 11:43:22, shans wrote:
> Is this method going to blow out as we have more PrimitiveInterpolation types?
We will not be adding more PrimitiveInterpolation types, either we interpolate
smoothly or we flip between two AnimationValues.
dstockwell
lgtm > covers animation of all non-interpolable properties in element.animate() But not for display, animation ...
4 years, 10 months ago
(2015-06-23 06:49:46 UTC)
#24
Issue 1153943003: Add foundation for removing AnimatableValues from StyleInterpolation
(Closed)
Created 4 years, 11 months ago by alancutter (OOO until 2018)
Modified 4 years, 10 months ago
Reviewers: dstockwell, Eric Willigers, shans, Timothy Loh
Base URL: svn://svn.chromium.org/blink/trunk
Comments: 75