Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| index 3f2989fa7c51c0b6cdee51c7037f4a815a8b0db6..58a1ff7a906827e2aca5ae432dd0daef1d512b24 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp |
| @@ -27,6 +27,7 @@ |
| #include "core/animation/AnimationTimeline.h" |
| #include "core/animation/DocumentAnimations.h" |
| +#include "core/animation/ElementAnimations.h" |
| #include "core/dom/DOMNodeIds.h" |
| #include "core/dom/Fullscreen.h" |
| #include "core/editing/FrameSelection.h" |
| @@ -457,6 +458,14 @@ void PaintLayerCompositor::updateIfNeeded() |
| InspectorInstrumentation::layerTreeDidChange(m_layoutView.frame()); |
| } |
| +static void restartAnimationOnCompositor(const LayoutObject& layoutObject) |
| +{ |
| + Node* node = layoutObject.node(); |
| + ElementAnimations* elementAnimations = (node && node->isElementNode()) ? toElement(node)->elementAnimations() : nullptr; |
| + if (elementAnimations) |
| + elementAnimations->restartAnimationOnCompositor(); |
| +} |
| + |
| bool PaintLayerCompositor::allocateOrClearCompositedLayerMapping(PaintLayer* layer, const CompositingStateTransitionType compositedLayerUpdate) |
| { |
| bool compositedLayerMappingChanged = false; |
| @@ -483,7 +492,9 @@ bool PaintLayerCompositor::allocateOrClearCompositedLayerMapping(PaintLayer* lay |
| layer->ensureCompositedLayerMapping(); |
| compositedLayerMappingChanged = true; |
| - // At this time, the ScrollingCooridnator only supports the top-level frame. |
| + restartAnimationOnCompositor(*layer->layoutObject()); |
|
chrishtr
2016/05/28 21:18:22
One thing I'd like to understand: in the scenario
ajuma
2016/05/29 00:49:28
Having a transform animation is a direct compositi
|
| + |
| + // At this time, the ScrollingCoordinator only supports the top-level frame. |
| if (layer->isRootLayer() && m_layoutView.frame()->isLocalRoot()) { |
| if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) |
| scrollingCoordinator->frameViewRootLayerDidChange(m_layoutView.frameView()); |