WebKit Bugzilla
Attachment 360723 Details for
Bug 194089
: Call the frame main contents layer "rootContentsLayer" consistently.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
root-content-layer-rename-6.patch (text/plain), 31.46 KB, created by
Antti Koivisto
on 2019-01-31 06:54:35 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-01-31 06:54:35 PST
Size:
31.46 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 240778) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,67 @@ >+2019-01-31 Antti Koivisto <antti@apple.com> >+ >+ Call the frame main contents layer "rootContentsLayer" consistently. >+ https://bugs.webkit.org/show_bug.cgi?id=194089 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is currently called "rootContentLayer" in the compositor and "scrolledContentsLayer" in the scrolling tree. >+ We want to reserve term "scrolledContentsLayer" to mean the direct child layer of the scroll container layer >+ without any positioning oddities (which this isn't). >+ >+ * page/scrolling/AsyncScrollingCoordinator.cpp: >+ (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange): >+ (WebCore::AsyncScrollingCoordinator::reconcileScrollingState): >+ (WebCore::AsyncScrollingCoordinator::setNodeLayers): >+ >+ Set the rootContentsLayer for frame. It is only used by the Mac frame scrolling code. >+ >+ * page/scrolling/AsyncScrollingCoordinator.h: >+ * page/scrolling/ScrollingCoordinator.cpp: >+ (WebCore::ScrollingCoordinator::rootContentsLayerForFrameView): >+ (WebCore::ScrollingCoordinator::rootContentLayerForFrameView): Deleted. >+ * page/scrolling/ScrollingCoordinator.h: >+ (WebCore::ScrollingCoordinator::setNodeLayers): >+ * page/scrolling/ScrollingStateFrameScrollingNode.cpp: >+ (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): >+ (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): >+ (WebCore::ScrollingStateFrameScrollingNode::setRootContentsLayer): >+ (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const): >+ * page/scrolling/ScrollingStateFrameScrollingNode.h: >+ >+ Introduce rootContentLayer for frames only. >+ >+ * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: >+ * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): >+ (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition): >+ >+ Switch to using rootContentsLayer. >+ >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): >+ (WebCore::RenderLayerCompositor::updateCompositingLayers): >+ (WebCore::RenderLayerCompositor::updateRootContentLayerClipping): >+ (WebCore::RenderLayerCompositor::layerTreeAsText): >+ (WebCore::RenderLayerCompositor::rootGraphicsLayer const): >+ (WebCore::RenderLayerCompositor::updateRootLayerPosition): >+ (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea): >+ (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea): >+ (WebCore::RenderLayerCompositor::updateLayerForHeader): >+ (WebCore::RenderLayerCompositor::updateLayerForFooter): >+ (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): >+ (WebCore::RenderLayerCompositor::ensureRootLayer): >+ (WebCore::RenderLayerCompositor::destroyRootLayer): >+ (WebCore::RenderLayerCompositor::attachRootLayer): >+ (WebCore::RenderLayerCompositor::detachRootLayer): >+ (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged): >+ (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole): >+ >+ Pass rootContentsLayer separately for frames only. >+ Pass null as frame scrolledContentsLayer until these are rearranged (it is not used). >+ >+ * rendering/RenderLayerCompositor.h: >+ > 2019-01-31 Chris Fleizach <cfleizach@apple.com> > > ASSERTION FAILED: cache under WebCore::AXObjectCache::postTextStateChangePlatformNotification >Index: Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >=================================================================== >--- Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (revision 240715) >+++ Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (working copy) >@@ -223,7 +223,7 @@ void AsyncScrollingCoordinator::frameVie > > auto* node = downcast<ScrollingStateFrameScrollingNode>(m_scrollingStateTree->stateNodeForID(frameView.scrollLayerID())); > node->setLayer(scrollLayerForFrameView(frameView)); >- node->setScrolledContentsLayer(rootContentLayerForFrameView(frameView)); >+ node->setRootContentsLayer(rootContentsLayerForFrameView(frameView)); > node->setCounterScrollingLayer(counterScrollingLayerForFrameView(frameView)); > node->setInsetClipLayer(insetClipLayerForFrameView(frameView)); > node->setContentShadowLayer(contentShadowLayerForFrameView(frameView)); >@@ -416,7 +416,7 @@ void AsyncScrollingCoordinator::reconcil > auto* counterScrollingLayer = counterScrollingLayerForFrameView(frameView); > auto* insetClipLayer = insetClipLayerForFrameView(frameView); > auto* contentShadowLayer = contentShadowLayerForFrameView(frameView); >- auto* scrolledContentsLayer = rootContentLayerForFrameView(frameView); >+ auto* rootContentsLayer = rootContentsLayerForFrameView(frameView); > auto* headerLayer = headerLayerForFrameView(frameView); > auto* footerLayer = footerLayerForFrameView(frameView); > >@@ -441,8 +441,8 @@ void AsyncScrollingCoordinator::reconcil > insetClipLayer->setPosition(positionForInsetClipLayer); > if (contentShadowLayer) > contentShadowLayer->setPosition(positionForContentsLayer); >- if (scrolledContentsLayer) >- scrolledContentsLayer->setPosition(positionForContentsLayer); >+ if (rootContentsLayer) >+ rootContentsLayer->setPosition(positionForContentsLayer); > if (headerLayer) > headerLayer->setPosition(positionForHeaderLayer); > if (footerLayer) >@@ -455,8 +455,8 @@ void AsyncScrollingCoordinator::reconcil > insetClipLayer->syncPosition(positionForInsetClipLayer); > if (contentShadowLayer) > contentShadowLayer->syncPosition(positionForContentsLayer); >- if (scrolledContentsLayer) >- scrolledContentsLayer->syncPosition(positionForContentsLayer); >+ if (rootContentsLayer) >+ rootContentsLayer->syncPosition(positionForContentsLayer); > if (headerLayer) > headerLayer->syncPosition(positionForHeaderLayer); > if (footerLayer) >@@ -569,7 +569,7 @@ void AsyncScrollingCoordinator::ensureRo > insertNode(ScrollingNodeType::MainFrame, frameView.scrollLayerID(), 0, 0); > } > >-void AsyncScrollingCoordinator::setNodeLayers(ScrollingNodeID nodeID, GraphicsLayer* layer, GraphicsLayer* scrolledContentsLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer) >+void AsyncScrollingCoordinator::setNodeLayers(ScrollingNodeID nodeID, GraphicsLayer* layer, GraphicsLayer* scrolledContentsLayer, GraphicsLayer* counterScrollingLayer, GraphicsLayer* insetClipLayer, GraphicsLayer* rootContentsLayer) > { > auto* node = m_scrollingStateTree->stateNodeForID(nodeID); > ASSERT(node); >@@ -580,12 +580,14 @@ void AsyncScrollingCoordinator::setNodeL > > if (is<ScrollingStateScrollingNode>(node)) { > auto& scrollingNode = downcast<ScrollingStateScrollingNode>(*node); >+ // FIXME: Currently unused. > scrollingNode.setScrolledContentsLayer(scrolledContentsLayer); >- >+ > if (is<ScrollingStateFrameScrollingNode>(node)) { > auto& frameScrollingNode = downcast<ScrollingStateFrameScrollingNode>(*node); > frameScrollingNode.setInsetClipLayer(insetClipLayer); > frameScrollingNode.setCounterScrollingLayer(counterScrollingLayer); >+ frameScrollingNode.setRootContentsLayer(rootContentsLayer); > } > } > } >Index: Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h >=================================================================== >--- Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (revision 240715) >+++ Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (working copy) >@@ -107,7 +107,7 @@ private: > WEBCORE_EXPORT ScrollingNodeID parentOfNode(ScrollingNodeID) const override; > WEBCORE_EXPORT Vector<ScrollingNodeID> childrenOfNode(ScrollingNodeID) const override; > >- WEBCORE_EXPORT void setNodeLayers(ScrollingNodeID, GraphicsLayer* /*layer*/, GraphicsLayer* /*scrolledContentsLayer*/ = nullptr, GraphicsLayer* /*counterScrollingLayer*/ = nullptr, GraphicsLayer* /*insetClipLayer*/ = nullptr) override; >+ WEBCORE_EXPORT void setNodeLayers(ScrollingNodeID, GraphicsLayer* /*layer*/, GraphicsLayer* /*scrolledContentsLayer*/ = nullptr, GraphicsLayer* /*counterScrollingLayer*/ = nullptr, GraphicsLayer* /*insetClipLayer*/ = nullptr, GraphicsLayer* /*rootContentsLayer*/ = nullptr) override; > WEBCORE_EXPORT void setScrollingNodeGeometry(ScrollingNodeID, const ScrollingGeometry&) override; > WEBCORE_EXPORT void setViewportConstraintedNodeGeometry(ScrollingNodeID, const ViewportConstraints&) override; > >Index: Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >=================================================================== >--- Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (revision 240715) >+++ Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (working copy) >@@ -287,10 +287,10 @@ GraphicsLayer* ScrollingCoordinator::con > #endif > } > >-GraphicsLayer* ScrollingCoordinator::rootContentLayerForFrameView(FrameView& frameView) >+GraphicsLayer* ScrollingCoordinator::rootContentsLayerForFrameView(FrameView& frameView) > { > if (auto* renderView = frameView.frame().contentRenderer()) >- return renderView->compositor().rootContentLayer(); >+ return renderView->compositor().rootContentsLayer(); > return nullptr; > } > >Index: Source/WebCore/page/scrolling/ScrollingCoordinator.h >=================================================================== >--- Source/WebCore/page/scrolling/ScrollingCoordinator.h (revision 240715) >+++ Source/WebCore/page/scrolling/ScrollingCoordinator.h (working copy) >@@ -129,7 +129,7 @@ public: > virtual ScrollingNodeID parentOfNode(ScrollingNodeID) const { return 0; } > virtual Vector<ScrollingNodeID> childrenOfNode(ScrollingNodeID) const { return { }; } > >- virtual void setNodeLayers(ScrollingNodeID, GraphicsLayer* /*layer*/, GraphicsLayer* /*scrolledContentsLayer*/ = nullptr, GraphicsLayer* /*counterScrollingLayer*/ = nullptr, GraphicsLayer* /*insetClipLayer*/ = nullptr) { } >+ virtual void setNodeLayers(ScrollingNodeID, GraphicsLayer* /*layer*/, GraphicsLayer* /*scrolledContentsLayer*/ = nullptr, GraphicsLayer* /*counterScrollingLayer*/ = nullptr, GraphicsLayer* /*insetClipLayer*/ = nullptr, GraphicsLayer* /*rootContentsLayer*/ = nullptr) { } > > struct ScrollingGeometry { > LayoutRect parentRelativeScrollableRect; >@@ -189,7 +189,7 @@ protected: > GraphicsLayer* scrollLayerForFrameView(FrameView&); > GraphicsLayer* counterScrollingLayerForFrameView(FrameView&); > GraphicsLayer* insetClipLayerForFrameView(FrameView&); >- GraphicsLayer* rootContentLayerForFrameView(FrameView&); >+ GraphicsLayer* rootContentsLayerForFrameView(FrameView&); > GraphicsLayer* contentShadowLayerForFrameView(FrameView&); > GraphicsLayer* headerLayerForFrameView(FrameView&); > GraphicsLayer* footerLayerForFrameView(FrameView&); >Index: Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp >=================================================================== >--- Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (revision 240715) >+++ Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (working copy) >@@ -65,6 +65,9 @@ ScrollingStateFrameScrollingNode::Scroll > , m_fixedElementsLayoutRelativeToFrame(stateNode.fixedElementsLayoutRelativeToFrame()) > , m_visualViewportEnabled(stateNode.visualViewportEnabled()) > { >+ if (hasChangedProperty(RootContentsLayer)) >+ setRootContentsLayer(stateNode.rootContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); >+ > if (hasChangedProperty(CounterScrollingLayer)) > setCounterScrollingLayer(stateNode.counterScrollingLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation())); > >@@ -99,6 +102,7 @@ void ScrollingStateFrameScrollingNode::s > setPropertyChangedBit(FrameScaleFactor); > setPropertyChangedBit(EventTrackingRegion); > setPropertyChangedBit(ReasonsForSynchronousScrolling); >+ setPropertyChangedBit(RootContentsLayer); > setPropertyChangedBit(ScrolledContentsLayer); > setPropertyChangedBit(CounterScrollingLayer); > setPropertyChangedBit(InsetClipLayer); >@@ -212,6 +216,15 @@ void ScrollingStateFrameScrollingNode::s > setPropertyChanged(TopContentInset); > } > >+void ScrollingStateFrameScrollingNode::setRootContentsLayer(const LayerRepresentation& layerRepresentation) >+{ >+ if (layerRepresentation == m_rootContentsLayer) >+ return; >+ >+ m_rootContentsLayer = layerRepresentation; >+ setPropertyChanged(RootContentsLayer); >+} >+ > void ScrollingStateFrameScrollingNode::setCounterScrollingLayer(const LayerRepresentation& layerRepresentation) > { > if (layerRepresentation == m_counterScrollingLayer) >@@ -307,6 +320,7 @@ void ScrollingStateFrameScrollingNode::d > ScrollingStateScrollingNode::dumpProperties(ts, behavior); > > if (behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) { >+ ts.dumpProperty("root contents layer ID", m_rootContentsLayer.layerID()); > ts.dumpProperty("counter scrolling layer ID", m_counterScrollingLayer.layerID()); > ts.dumpProperty("inset clip layer ID", m_insetClipLayer.layerID()); > ts.dumpProperty("content shadow layer ID", m_contentShadowLayer.layerID()); >Index: Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h >=================================================================== >--- Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (revision 240715) >+++ Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (working copy) >@@ -49,6 +49,7 @@ public: > FrameScaleFactor = NumScrollingStateNodeBits, > EventTrackingRegion, > ReasonsForSynchronousScrolling, >+ RootContentsLayer, > ScrolledContentsLayer, > CounterScrollingLayer, > InsetClipLayer, >@@ -99,6 +100,9 @@ public: > float topContentInset() const { return m_topContentInset; } > WEBCORE_EXPORT void setTopContentInset(float); > >+ const LayerRepresentation& rootContentsLayer() const { return m_rootContentsLayer; } >+ WEBCORE_EXPORT void setRootContentsLayer(const LayerRepresentation&); >+ > // This is a layer moved in the opposite direction to scrolling, for example for background-attachment:fixed > const LayerRepresentation& counterScrollingLayer() const { return m_counterScrollingLayer; } > WEBCORE_EXPORT void setCounterScrollingLayer(const LayerRepresentation&); >@@ -147,6 +151,7 @@ private: > > void setAllPropertiesChanged() override; > >+ LayerRepresentation m_rootContentsLayer; > LayerRepresentation m_counterScrollingLayer; > LayerRepresentation m_insetClipLayer; > LayerRepresentation m_contentShadowLayer; >Index: Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h >=================================================================== >--- Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h (revision 240715) >+++ Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h (working copy) >@@ -100,7 +100,7 @@ private: > ScrollController m_scrollController; > > RetainPtr<CALayer> m_scrollLayer; >- RetainPtr<CALayer> m_scrolledContentsLayer; >+ RetainPtr<CALayer> m_rootContentsLayer; > RetainPtr<CALayer> m_counterScrollingLayer; > RetainPtr<CALayer> m_insetClipLayer; > RetainPtr<CALayer> m_contentShadowLayer; >Index: Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >=================================================================== >--- Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (revision 240715) >+++ Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (working copy) >@@ -105,8 +105,8 @@ void ScrollingTreeFrameScrollingNodeMac: > if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer)) > m_scrollLayer = scrollingStateNode.layer(); > >- if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) >- m_scrolledContentsLayer = scrollingStateNode.scrolledContentsLayer(); >+ if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::RootContentsLayer)) >+ m_rootContentsLayer = scrollingStateNode.rootContentsLayer(); > > if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) > m_counterScrollingLayer = scrollingStateNode.counterScrollingLayer(); >@@ -439,11 +439,11 @@ void ScrollingTreeFrameScrollingNodeMac: > m_counterScrollingLayer.get().position = fixedPositionRect.location(); > > float topContentInset = this->topContentInset(); >- if (m_insetClipLayer && m_scrolledContentsLayer && topContentInset) { >+ if (m_insetClipLayer && m_rootContentsLayer && topContentInset) { > m_insetClipLayer.get().position = FloatPoint(m_insetClipLayer.get().position.x, FrameView::yPositionForInsetClipLayer(position, topContentInset)); >- m_scrolledContentsLayer.get().position = FrameView::positionForRootContentLayer(position, scrollOrigin(), topContentInset, headerHeight()); >+ m_rootContentsLayer.get().position = FrameView::positionForRootContentLayer(position, scrollOrigin(), topContentInset, headerHeight()); > if (m_contentShadowLayer) >- m_contentShadowLayer.get().position = m_scrolledContentsLayer.get().position; >+ m_contentShadowLayer.get().position = m_rootContentsLayer.get().position; > } > > if (m_headerLayer || m_footerLayer) { >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 240715) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -548,9 +548,10 @@ void RenderLayerCompositor::didChangePla > > if (auto nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling)) { > // FIXME: would be nice to not have to special-case the root. >- if (layer.isRenderViewLayer()) >- scrollingCoordinator->setNodeLayers(nodeID, m_scrollLayer.get(), m_rootContentLayer.get(), fixedRootBackgroundLayer(), clipLayer()); >- else >+ if (layer.isRenderViewLayer()) { >+ // FIXME: Reorganize the layers and pass the scrolledContentsLayer. >+ scrollingCoordinator->setNodeLayers(nodeID, m_scrollLayer.get(), nullptr, fixedRootBackgroundLayer(), clipLayer(), m_rootContentsLayer.get()); >+ } else > scrollingCoordinator->setNodeLayers(nodeID, backing->scrollingLayer(), backing->scrollingContentsLayer()); > } > >@@ -760,8 +761,8 @@ bool RenderLayerCompositor::updateCompos > // composited layers that we didn't hit in our traversal (e.g. because of visibility:hidden). > if (childList.isEmpty() && !needsCompositingForContentOrOverlays()) > destroyRootLayer(); >- else if (m_rootContentLayer) >- m_rootContentLayer->setChildren(WTFMove(childList)); >+ else if (m_rootContentsLayer) >+ m_rootContentsLayer->setChildren(WTFMove(childList)); > } > } > >@@ -784,7 +785,7 @@ bool RenderLayerCompositor::updateCompos > LOG(Compositing, "RenderLayerCompositor::updateCompositingLayers - post"); > showPaintOrderTree(m_renderView.layer()); > LOG(Compositing, "RenderLayerCompositor::updateCompositingLayers - GraphicsLayers post, contentLayersCount %d", m_contentLayersCount); >- showGraphicsLayerTree(m_rootContentLayer.get()); >+ showGraphicsLayerTree(m_rootContentsLayer.get()); > } > #endif > >@@ -1515,7 +1516,7 @@ static RenderLayerModelObject& rendererF > > void RenderLayerCompositor::updateRootContentLayerClipping() > { >- m_rootContentLayer->setMasksToBounds(!m_renderView.settings().backgroundShouldExtendBeyondPage()); >+ m_rootContentsLayer->setMasksToBounds(!m_renderView.settings().backgroundShouldExtendBeyondPage()); > } > > bool RenderLayerCompositor::updateBacking(RenderLayer& layer, RequiresCompositingData& queryData, CompositingChangeRepaint shouldRepaint, BackingRequired backingRequired) >@@ -1889,7 +1890,7 @@ String RenderLayerCompositor::layerTreeA > { > updateCompositingLayers(CompositingUpdateType::AfterLayout); > >- if (!m_rootContentLayer) >+ if (!m_rootContentsLayer) > return String(); > > flushPendingLayerChanges(true); >@@ -1914,7 +1915,7 @@ String RenderLayerCompositor::layerTreeA > > // We skip dumping the scroll and clip layers to keep layerTreeAsText output > // similar between platforms. >- String layerTreeText = m_rootContentLayer->layerTreeAsText(layerTreeBehavior); >+ String layerTreeText = m_rootContentsLayer->layerTreeAsText(layerTreeBehavior); > > // Dump an empty layer tree only if the only composited layer is the main frame's tiled backing, > // so that tests expecting us to drop out of accelerated compositing when there are no layers succeed. >@@ -2011,7 +2012,7 @@ GraphicsLayer* RenderLayerCompositor::ro > { > if (m_overflowControlsHostLayer) > return m_overflowControlsHostLayer.get(); >- return m_rootContentLayer.get(); >+ return m_rootContentsLayer.get(); > } > > void RenderLayerCompositor::setIsInWindow(bool isInWindow) >@@ -2069,18 +2070,18 @@ void RenderLayerCompositor::clearBacking > > void RenderLayerCompositor::updateRootLayerPosition() > { >- if (m_rootContentLayer) { >- m_rootContentLayer->setSize(m_renderView.frameView().contentsSize()); >- m_rootContentLayer->setPosition(m_renderView.frameView().positionForRootContentLayer()); >- m_rootContentLayer->setAnchorPoint(FloatPoint3D()); >+ if (m_rootContentsLayer) { >+ m_rootContentsLayer->setSize(m_renderView.frameView().contentsSize()); >+ m_rootContentsLayer->setPosition(m_renderView.frameView().positionForRootContentLayer()); >+ m_rootContentsLayer->setAnchorPoint(FloatPoint3D()); > } > > updateScrollLayerClipping(); > > #if ENABLE(RUBBER_BANDING) >- if (m_contentShadowLayer && m_rootContentLayer) { >- m_contentShadowLayer->setPosition(m_rootContentLayer->position()); >- m_contentShadowLayer->setSize(m_rootContentLayer->size()); >+ if (m_contentShadowLayer && m_rootContentsLayer) { >+ m_contentShadowLayer->setPosition(m_rootContentsLayer->position()); >+ m_contentShadowLayer->setSize(m_rootContentsLayer->size()); > } > > updateLayerForTopOverhangArea(m_layerForTopOverhangArea != nullptr); >@@ -3119,7 +3120,7 @@ GraphicsLayer* RenderLayerCompositor::up > if (!m_layerForTopOverhangArea) { > m_layerForTopOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_layerForTopOverhangArea->setName("top overhang"); >- m_scrollLayer->addChildBelow(*m_layerForTopOverhangArea, m_rootContentLayer.get()); >+ m_scrollLayer->addChildBelow(*m_layerForTopOverhangArea, m_rootContentsLayer.get()); > } > > return m_layerForTopOverhangArea.get(); >@@ -3138,10 +3139,10 @@ GraphicsLayer* RenderLayerCompositor::up > if (!m_layerForBottomOverhangArea) { > m_layerForBottomOverhangArea = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_layerForBottomOverhangArea->setName("bottom overhang"); >- m_scrollLayer->addChildBelow(*m_layerForBottomOverhangArea, m_rootContentLayer.get()); >+ m_scrollLayer->addChildBelow(*m_layerForBottomOverhangArea, m_rootContentsLayer.get()); > } > >- m_layerForBottomOverhangArea->setPosition(FloatPoint(0, m_rootContentLayer->size().height() + m_renderView.frameView().headerHeight() >+ m_layerForBottomOverhangArea->setPosition(FloatPoint(0, m_rootContentsLayer->size().height() + m_renderView.frameView().headerHeight() > + m_renderView.frameView().footerHeight() + m_renderView.frameView().topContentInset())); > return m_layerForBottomOverhangArea.get(); > } >@@ -3166,7 +3167,7 @@ GraphicsLayer* RenderLayerCompositor::up > if (!m_layerForHeader) { > m_layerForHeader = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_layerForHeader->setName("header"); >- m_scrollLayer->addChildAbove(*m_layerForHeader, m_rootContentLayer.get()); >+ m_scrollLayer->addChildAbove(*m_layerForHeader, m_rootContentsLayer.get()); > m_renderView.frameView().addPaintPendingMilestones(DidFirstFlushForHeaderLayer); > } > >@@ -3203,10 +3204,10 @@ GraphicsLayer* RenderLayerCompositor::up > if (!m_layerForFooter) { > m_layerForFooter = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_layerForFooter->setName("footer"); >- m_scrollLayer->addChildAbove(*m_layerForFooter, m_rootContentLayer.get()); >+ m_scrollLayer->addChildAbove(*m_layerForFooter, m_rootContentsLayer.get()); > } > >- float totalContentHeight = m_rootContentLayer->size().height() + m_renderView.frameView().headerHeight() + m_renderView.frameView().footerHeight(); >+ float totalContentHeight = m_rootContentsLayer->size().height() + m_renderView.frameView().headerHeight() + m_renderView.frameView().footerHeight(); > m_layerForFooter->setPosition(FloatPoint(0, FrameView::yPositionForFooterLayer(m_renderView.frameView().scrollPosition(), > m_renderView.frameView().topContentInset(), totalContentHeight, m_renderView.frameView().footerHeight()))); > m_layerForFooter->setAnchorPoint(FloatPoint3D()); >@@ -3332,12 +3333,12 @@ void RenderLayerCompositor::updateOverfl > if (!m_contentShadowLayer) { > m_contentShadowLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); > m_contentShadowLayer->setName("content shadow"); >- m_contentShadowLayer->setSize(m_rootContentLayer->size()); >- m_contentShadowLayer->setPosition(m_rootContentLayer->position()); >+ m_contentShadowLayer->setSize(m_rootContentsLayer->size()); >+ m_contentShadowLayer->setPosition(m_rootContentsLayer->position()); > m_contentShadowLayer->setAnchorPoint(FloatPoint3D()); > m_contentShadowLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingShadow); > >- m_scrollLayer->addChildBelow(*m_contentShadowLayer, m_rootContentLayer.get()); >+ m_scrollLayer->addChildBelow(*m_contentShadowLayer, m_rootContentsLayer.get()); > } > } else > GraphicsLayer::unparentAndClear(m_contentShadowLayer); >@@ -3408,18 +3409,18 @@ void RenderLayerCompositor::ensureRootLa > if (expectedAttachment == m_rootLayerAttachment) > return; > >- if (!m_rootContentLayer) { >- m_rootContentLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); >- m_rootContentLayer->setName("content root"); >+ if (!m_rootContentsLayer) { >+ m_rootContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); >+ m_rootContentsLayer->setName("content root"); > IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect()); >- m_rootContentLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY())); >- m_rootContentLayer->setPosition(FloatPoint()); >+ m_rootContentsLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY())); >+ m_rootContentsLayer->setPosition(FloatPoint()); > > #if PLATFORM(IOS_FAMILY) > // Page scale is applied above this on iOS, so we'll just say that our root layer applies it. > auto& frame = m_renderView.frameView().frame(); > if (frame.isMainFrame()) >- m_rootContentLayer->setAppliesPageScale(); >+ m_rootContentsLayer->setAppliesPageScale(); > #endif > > // Need to clip to prevent transformed content showing outside this frame >@@ -3457,7 +3458,7 @@ void RenderLayerCompositor::ensureRootLa > m_overflowControlsHostLayer->addChild(*m_clipLayer); > } > >- m_scrollLayer->addChild(*m_rootContentLayer); >+ m_scrollLayer->addChild(*m_rootContentsLayer); > > updateScrollLayerClipping(); > updateOverflowControlsLayers(); >@@ -3484,7 +3485,7 @@ void RenderLayerCompositor::ensureRootLa > > void RenderLayerCompositor::destroyRootLayer() > { >- if (!m_rootContentLayer) >+ if (!m_rootContentsLayer) > return; > > detachRootLayer(); >@@ -3520,14 +3521,14 @@ void RenderLayerCompositor::destroyRootL > GraphicsLayer::unparentAndClear(m_scrollLayer); > } > ASSERT(!m_scrollLayer); >- GraphicsLayer::unparentAndClear(m_rootContentLayer); >+ GraphicsLayer::unparentAndClear(m_rootContentsLayer); > > m_layerUpdater = nullptr; > } > > void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment) > { >- if (!m_rootContentLayer) >+ if (!m_rootContentsLayer) > return; > > LOG(Compositing, "RenderLayerCompositor %p attachRootLayer %d", this, attachment); >@@ -3563,7 +3564,7 @@ void RenderLayerCompositor::attachRootLa > > void RenderLayerCompositor::detachRootLayer() > { >- if (!m_rootContentLayer || m_rootLayerAttachment == RootLayerUnattached) >+ if (!m_rootContentsLayer || m_rootLayerAttachment == RootLayerUnattached) > return; > > switch (m_rootLayerAttachment) { >@@ -3573,7 +3574,7 @@ void RenderLayerCompositor::detachRootLa > if (m_overflowControlsHostLayer) > m_overflowControlsHostLayer->removeFromParent(); > else >- m_rootContentLayer->removeFromParent(); >+ m_rootContentsLayer->removeFromParent(); > > if (auto* ownerElement = m_renderView.document().ownerElement()) > ownerElement->scheduleInvalidateStyleAndLayerComposition(); >@@ -3626,7 +3627,7 @@ void RenderLayerCompositor::rootLayerAtt > return; > > Ref<GraphicsLayer> overlayHost = page().pageOverlayController().layerWithDocumentOverlays(); >- m_rootContentLayer->addChild(WTFMove(overlayHost)); >+ m_rootContentsLayer->addChild(WTFMove(overlayHost)); > } > > void RenderLayerCompositor::notifyIFramesOfCompositingChange() >@@ -4001,7 +4002,7 @@ ScrollingNodeID RenderLayerCompositor::u > } > > if (changes & ScrollingNodeChangeFlags::Layer) >- scrollingCoordinator->setNodeLayers(newNodeID, m_scrollLayer.get(), m_rootContentLayer.get(), fixedRootBackgroundLayer(), clipLayer()); >+ scrollingCoordinator->setNodeLayers(newNodeID, m_scrollLayer.get(), nullptr, fixedRootBackgroundLayer(), clipLayer(), m_rootContentsLayer.get()); > > if (changes & ScrollingNodeChangeFlags::LayerGeometry) { > ScrollingCoordinator::ScrollingGeometry scrollingGeometry; >Index: Source/WebCore/rendering/RenderLayerCompositor.h >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.h (revision 240715) >+++ Source/WebCore/rendering/RenderLayerCompositor.h (working copy) >@@ -243,7 +243,7 @@ public: > > GraphicsLayer* scrollLayer() const { return m_scrollLayer.get(); } > GraphicsLayer* clipLayer() const { return m_clipLayer.get(); } >- GraphicsLayer* rootContentLayer() const { return m_rootContentLayer.get(); } >+ GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); } > > GraphicsLayer* layerForClipping() const { return m_clipLayer ? m_clipLayer.get() : m_scrollLayer.get(); } > >@@ -534,7 +534,7 @@ private: > > private: > RenderView& m_renderView; >- RefPtr<GraphicsLayer> m_rootContentLayer; >+ RefPtr<GraphicsLayer> m_rootContentsLayer; > Timer m_updateCompositingLayersTimer; > > ChromeClient::CompositingTriggerFlags m_compositingTriggers { static_cast<ChromeClient::CompositingTriggerFlags>(ChromeClient::AllTriggers) };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194089
:
360721
|
360722
| 360723