Chromium Code Reviews| Index: Source/core/animation/CompositorAnimations.cpp |
| diff --git a/Source/core/animation/CompositorAnimations.cpp b/Source/core/animation/CompositorAnimations.cpp |
| index fb26b5784814040ede48647c98335ef5168361ed..d2b2185f73c1fad167dd223dc26bd724237063f0 100644 |
| --- a/Source/core/animation/CompositorAnimations.cpp |
| +++ b/Source/core/animation/CompositorAnimations.cpp |
| @@ -72,6 +72,10 @@ void getKeyframeValuesForProperty(const KeyframeEffectModelBase* effect, CSSProp |
| } |
| +CSSPropertyID CompositorAnimations::CompositableProperties[3] = { |
| + CSSPropertyOpacity, CSSPropertyTransform, CSSPropertyWebkitFilter |
| +}; |
| + |
| bool CompositorAnimations::getAnimatedBoundingBox(FloatBox& box, const AnimationEffect& effect, double minValue, double maxValue) const |
| { |
| const KeyframeEffectModelBase& keyframeEffect = toKeyframeEffectModelBase(effect); |
| @@ -147,7 +151,8 @@ bool CompositorAnimations::isCandidateForAnimationOnCompositor(const Timing& tim |
| ASSERT(keyframes.size() >= 2); |
| for (const auto& keyframe : keyframes) { |
| // FIXME: Determine candidacy based on the CSSValue instead of a snapshot AnimatableValue. |
| - if (keyframe->composite() != AnimationEffect::CompositeReplace || !keyframe->getAnimatableValue()) |
| + bool isNeutralKeyframe = keyframe->isStringPropertySpecificKeyframe() && !toStringPropertySpecificKeyframe(keyframe.get())->value() && keyframe->composite() == AnimationEffect::CompositeAdd; |
| + if ((keyframe->composite() != AnimationEffect::CompositeReplace && !isNeutralKeyframe) || !keyframe->getAnimatableValue()) |
|
dstockwell
2015/02/05 23:04:52
When can getAnimatableValue() return null here?
shend
2015/02/06 03:16:25
Since we're using StringKeyframes, initially the a
|
| return false; |
| switch (property) { |