| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index dff9ec6cdf05317ec33675b3d62167066f24030e..3a64c6c5290a0d1137c5f125ccef4d75e90585b5 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -569,11 +569,30 @@ ScrollingCoordinator* FrameView::scrollingCoordinator() const {
|
| }
|
|
|
| CompositorAnimationHost* FrameView::compositorAnimationHost() const {
|
| + // When m_animationHost is not nullptr, this is the FrameView for an OOPIF.
|
| + if (m_animationHost)
|
| + return m_animationHost.get();
|
| +
|
| + if (m_frame->localFrameRoot() != m_frame)
|
| + return m_frame->localFrameRoot()->view()->compositorAnimationHost();
|
| +
|
| + if (!m_frame->isMainFrame())
|
| + return nullptr;
|
| +
|
| ScrollingCoordinator* c = scrollingCoordinator();
|
| return c ? c->compositorAnimationHost() : nullptr;
|
| }
|
|
|
| CompositorAnimationTimeline* FrameView::compositorAnimationTimeline() const {
|
| + if (m_animationTimeline)
|
| + return m_animationTimeline.get();
|
| +
|
| + if (m_frame->localFrameRoot() != m_frame)
|
| + return m_frame->localFrameRoot()->view()->compositorAnimationTimeline();
|
| +
|
| + if (!m_frame->isMainFrame())
|
| + return nullptr;
|
| +
|
| ScrollingCoordinator* c = scrollingCoordinator();
|
| return c ? c->compositorAnimationTimeline() : nullptr;
|
| }
|
| @@ -4992,4 +5011,14 @@ void FrameView::applyTransformForTopFrameSpace(TransformState& transformState) {
|
| LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y()));
|
| }
|
|
|
| +void FrameView::setAnimationTimeline(
|
| + std::unique_ptr<CompositorAnimationTimeline> timeline) {
|
| + m_animationTimeline = std::move(timeline);
|
| +}
|
| +
|
| +void FrameView::setAnimationHost(
|
| + std::unique_ptr<CompositorAnimationHost> host) {
|
| + m_animationHost = std::move(host);
|
| +}
|
| +
|
| } // namespace blink
|
|
|