| Index: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
|
| diff --git a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
|
| index 40d54d195235ad770ccf7cc918ac93e09bea87de..89ce0492592df9f1bb6956f9ecfcfd652fcdec43 100644
|
| --- a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
|
| +++ b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
|
| @@ -27,6 +27,7 @@
|
|
|
| #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
|
|
|
| +#include "core/animation/AnimationTimeline.h"
|
| #include "core/animation/DocumentAnimations.h"
|
| #include "core/dom/DOMNodeIds.h"
|
| #include "core/dom/Fullscreen.h"
|
| @@ -717,12 +718,14 @@ void DeprecatedPaintLayerCompositor::setIsInWindow(bool isInWindow)
|
| return;
|
|
|
| RootLayerAttachment attachment = m_layoutView.frame()->isLocalRoot() ? RootLayerAttachedViaChromeClient : RootLayerAttachedViaEnclosingFrame;
|
| + attachCompositorTimeline();
|
| attachRootLayer(attachment);
|
| } else {
|
| if (m_rootLayerAttachment == RootLayerUnattached)
|
| return;
|
|
|
| detachRootLayer();
|
| + detachCompositorTimeline();
|
| }
|
| }
|
|
|
| @@ -1000,9 +1003,12 @@ void DeprecatedPaintLayerCompositor::ensureRootLayer()
|
| }
|
|
|
| // Check to see if we have to change the attachment
|
| - if (m_rootLayerAttachment != RootLayerUnattached)
|
| + if (m_rootLayerAttachment != RootLayerUnattached) {
|
| detachRootLayer();
|
| + detachCompositorTimeline();
|
| + }
|
|
|
| + attachCompositorTimeline();
|
| attachRootLayer(expectedAttachment);
|
| }
|
|
|
| @@ -1114,6 +1120,30 @@ void DeprecatedPaintLayerCompositor::updateRootLayerAttachment()
|
| ensureRootLayer();
|
| }
|
|
|
| +void DeprecatedPaintLayerCompositor::attachCompositorTimeline()
|
| +{
|
| + LocalFrame& frame = m_layoutView.frameView()->frame();
|
| + Page* page = frame.page();
|
| + if (!page)
|
| + return;
|
| +
|
| + WebCompositorAnimationTimeline* compositorTimeline = frame.document() ? frame.document()->timeline().compositorTimeline() : nullptr;
|
| + if (compositorTimeline)
|
| + page->chrome().client().attachCompositorAnimationTimeline(compositorTimeline, &frame);
|
| +}
|
| +
|
| +void DeprecatedPaintLayerCompositor::detachCompositorTimeline()
|
| +{
|
| + LocalFrame& frame = m_layoutView.frameView()->frame();
|
| + Page* page = frame.page();
|
| + if (!page)
|
| + return;
|
| +
|
| + WebCompositorAnimationTimeline* compositorTimeline = frame.document() ? frame.document()->timeline().compositorTimeline() : nullptr;
|
| + if (compositorTimeline)
|
| + page->chrome().client().detachCompositorAnimationTimeline(compositorTimeline, &frame);
|
| +}
|
| +
|
| ScrollingCoordinator* DeprecatedPaintLayerCompositor::scrollingCoordinator() const
|
| {
|
| if (Page* page = this->page())
|
|
|