Diff
Modified: trunk/Source/WebCore/ChangeLog (240799 => 240800)
--- trunk/Source/WebCore/ChangeLog 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/ChangeLog 2019-01-31 19:39:38 UTC (rev 240800)
@@ -1,3 +1,67 @@
+2019-01-31 Antti Koivisto <[email protected]>
+
+ Call the frame main contents layer "rootContentsLayer" consistently.
+ https://bugs.webkit.org/show_bug.cgi?id=194089
+
+ Reviewed by Simon Fraser.
+
+ 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 Keith Rollin <[email protected]>
GCGamepad is deprecated
Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp 2019-01-31 19:39:38 UTC (rev 240800)
@@ -227,7 +227,7 @@
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));
@@ -420,7 +420,7 @@
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);
@@ -445,8 +445,8 @@
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)
@@ -459,8 +459,8 @@
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)
@@ -573,7 +573,7 @@
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);
@@ -584,12 +584,14 @@
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);
}
}
}
Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h 2019-01-31 19:39:38 UTC (rev 240800)
@@ -108,7 +108,7 @@
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;
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2019-01-31 19:39:38 UTC (rev 240800)
@@ -287,10 +287,10 @@
#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;
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2019-01-31 19:39:38 UTC (rev 240800)
@@ -129,7 +129,7 @@
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 @@
GraphicsLayer* scrollLayerForFrameView(FrameView&);
GraphicsLayer* counterScrollingLayerForFrameView(FrameView&);
GraphicsLayer* insetClipLayerForFrameView(FrameView&);
- GraphicsLayer* rootContentLayerForFrameView(FrameView&);
+ GraphicsLayer* rootContentsLayerForFrameView(FrameView&);
GraphicsLayer* contentShadowLayerForFrameView(FrameView&);
GraphicsLayer* headerLayerForFrameView(FrameView&);
GraphicsLayer* footerLayerForFrameView(FrameView&);
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp 2019-01-31 19:39:38 UTC (rev 240800)
@@ -66,6 +66,9 @@
, m_visualViewportEnabled(stateNode.visualViewportEnabled())
, m_asyncFrameOrOverflowScrollingEnabled(stateNode.asyncFrameOrOverflowScrollingEnabled())
{
+ if (hasChangedProperty(RootContentsLayer))
+ setRootContentsLayer(stateNode.rootContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
+
if (hasChangedProperty(CounterScrollingLayer))
setCounterScrollingLayer(stateNode.counterScrollingLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
@@ -100,6 +103,7 @@
setPropertyChangedBit(FrameScaleFactor);
setPropertyChangedBit(EventTrackingRegion);
setPropertyChangedBit(ReasonsForSynchronousScrolling);
+ setPropertyChangedBit(RootContentsLayer);
setPropertyChangedBit(ScrolledContentsLayer);
setPropertyChangedBit(CounterScrollingLayer);
setPropertyChangedBit(InsetClipLayer);
@@ -214,6 +218,15 @@
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)
@@ -318,6 +331,7 @@
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());
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h 2019-01-31 19:39:38 UTC (rev 240800)
@@ -49,6 +49,7 @@
FrameScaleFactor = NumScrollingStateNodeBits,
EventTrackingRegion,
ReasonsForSynchronousScrolling,
+ RootContentsLayer,
ScrolledContentsLayer,
CounterScrollingLayer,
InsetClipLayer,
@@ -100,6 +101,9 @@
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&);
@@ -152,6 +156,7 @@
void setAllPropertiesChanged() override;
+ LayerRepresentation m_rootContentsLayer;
LayerRepresentation m_counterScrollingLayer;
LayerRepresentation m_insetClipLayer;
LayerRepresentation m_contentShadowLayer;
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h 2019-01-31 19:39:38 UTC (rev 240800)
@@ -100,7 +100,7 @@
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;
Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (240799 => 240800)
--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm 2019-01-31 19:39:38 UTC (rev 240800)
@@ -105,8 +105,8 @@
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();
@@ -442,11 +442,11 @@
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) {
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (240799 => 240800)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-01-31 19:39:38 UTC (rev 240800)
@@ -548,9 +548,10 @@
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 @@
// 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 @@
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 @@
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 @@
{
updateCompositingLayers(CompositingUpdateType::AfterLayout);
- if (!m_rootContentLayer)
+ if (!m_rootContentsLayer)
return String();
flushPendingLayerChanges(true);
@@ -1914,7 +1915,7 @@
// 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 @@
{
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::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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
m_overflowControlsHostLayer->addChild(*m_clipLayer);
}
- m_scrollLayer->addChild(*m_rootContentLayer);
+ m_scrollLayer->addChild(*m_rootContentsLayer);
updateScrollLayerClipping();
updateOverflowControlsLayers();
@@ -3484,7 +3485,7 @@
void RenderLayerCompositor::destroyRootLayer()
{
- if (!m_rootContentLayer)
+ if (!m_rootContentsLayer)
return;
detachRootLayer();
@@ -3520,7 +3521,7 @@
GraphicsLayer::unparentAndClear(m_scrollLayer);
}
ASSERT(!m_scrollLayer);
- GraphicsLayer::unparentAndClear(m_rootContentLayer);
+ GraphicsLayer::unparentAndClear(m_rootContentsLayer);
m_layerUpdater = nullptr;
}
@@ -3527,7 +3528,7 @@
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::detachRootLayer()
{
- if (!m_rootContentLayer || m_rootLayerAttachment == RootLayerUnattached)
+ if (!m_rootContentsLayer || m_rootLayerAttachment == RootLayerUnattached)
return;
switch (m_rootLayerAttachment) {
@@ -3573,7 +3574,7 @@
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 @@
return;
Ref<GraphicsLayer> overlayHost = page().pageOverlayController().layerWithDocumentOverlays();
- m_rootContentLayer->addChild(WTFMove(overlayHost));
+ m_rootContentsLayer->addChild(WTFMove(overlayHost));
}
void RenderLayerCompositor::notifyIFramesOfCompositingChange()
@@ -4001,7 +4002,7 @@
}
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;
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (240799 => 240800)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2019-01-31 19:29:27 UTC (rev 240799)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2019-01-31 19:39:38 UTC (rev 240800)
@@ -243,7 +243,7 @@
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:
RenderView& m_renderView;
- RefPtr<GraphicsLayer> m_rootContentLayer;
+ RefPtr<GraphicsLayer> m_rootContentsLayer;
Timer m_updateCompositingLayersTimer;
ChromeClient::CompositingTriggerFlags m_compositingTriggers { static_cast<ChromeClient::CompositingTriggerFlags>(ChromeClient::AllTriggers) };