void AsyncScrollingCoordinator::frameViewRootLayerDidChange(FrameView& frameView) { ASSERT(isMainThread()); ASSERT(m_page); if (!coordinatesScrollingForFrameView(frameView)) return; // FIXME: In some navigation scenarios, the FrameView has no RenderView or that RenderView has not been composited. // This needs cleaning up: https://bugs.webkit.org/show_bug.cgi?id=132724 if (!frameView.scrollLayerID()) return; // If the root layer does not have a ScrollingStateNode, then we should create one. ensureRootStateNodeForFrameView(frameView); ASSERT(m_scrollingStateTree->rootStateNode()); ScrollingCoordinator::frameViewRootLayerDidChange(frameView); ScrollingStateFrameScrollingNode* node = downcast<ScrollingStateFrameScrollingNode>(m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID())); node->setLayer(scrollLayerForFrameView(frameView)); node->setScrolledContentsLayer(rootContentLayerForFrameView(frameView)); node->setCounterScrollingLayer(counterScrollingLayerForFrameView(frameView)); node->setInsetClipLayer(insetClipLayerForFrameView(frameView)); node->setContentShadowLayer(contentShadowLayerForFrameView(frameView)); node->setHeaderLayer(headerLayerForFrameView(frameView)); node->setFooterLayer(footerLayerForFrameView(frameView)); node->setScrollBehaviorForFixedElements(frameView.scrollBehaviorForFixedElements()); }
void AsyncScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView) { ASSERT(isMainThread()); ASSERT(m_page); if (!coordinatesScrollingForFrameView(frameView)) return; // If the root layer does not have a ScrollingStateNode, then we should create one. ensureRootStateNodeForFrameView(frameView); ASSERT(m_scrollingStateTree->rootStateNode()); ScrollingCoordinator::frameViewRootLayerDidChange(frameView); ScrollingStateScrollingNode* node = toScrollingStateScrollingNode(m_scrollingStateTree->stateNodeForID(frameView->scrollLayerID())); setScrollLayerForNode(scrollLayerForFrameView(frameView), node); setCounterScrollingLayerForNode(counterScrollingLayerForFrameView(frameView), node); setHeaderLayerForNode(headerLayerForFrameView(frameView), node); setFooterLayerForNode(footerLayerForFrameView(frameView), node); setScrollBehaviorForFixedElementsForNode(frameView->scrollBehaviorForFixedElements(), node); }