| Index: third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
|
| index 61d0947bff02ed7bd3ab73f70681ebc8ed13f1d4..6cb11d8f9b4916ff758cdec23ea0cad0e74525e9 100644
|
| --- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
|
| @@ -347,10 +347,21 @@ bool CompositorAnimations::canStartAnimationOnCompositor(
|
| return false;
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| - // TODO(wkorman): Consider effect node for opacity.
|
| + // We query paint property tree state below to determine whether the
|
| + // animation is compositable. There is a known lifecycle violation where an
|
| + // animation can be cancelled during style update. See
|
| + // CompositorAnimations::cancelAnimationOnCompositor and
|
| + // http://crbug.com/676456. When this is fixed we would like to enable
|
| + // the DCHECK below.
|
| + // DCHECK(document().lifecycle().state() >=
|
| + // DocumentLifecycle::PrePaintClean);
|
| + const ObjectPaintProperties* paintProperties =
|
| + element.layoutObject()->paintProperties();
|
| const TransformPaintPropertyNode* transformNode =
|
| - element.layoutObject()->paintProperties()->transform();
|
| - return transformNode && transformNode->hasDirectCompositingReasons();
|
| + paintProperties->transform();
|
| + const EffectPaintPropertyNode* effectNode = paintProperties->effect();
|
| + return (transformNode && transformNode->hasDirectCompositingReasons()) ||
|
| + (effectNode && effectNode->hasDirectCompositingReasons());
|
| }
|
|
|
| return element.layoutObject() &&
|
|
|