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

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

Issue 851693007: Prepare for responsive CSS animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 10 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/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) {

Powered by Google App Engine
This is Rietveld 408576698