Diff
Modified: trunk/Source/WebCore/ChangeLog (245785 => 245786)
--- trunk/Source/WebCore/ChangeLog 2019-05-26 23:16:36 UTC (rev 245785)
+++ trunk/Source/WebCore/ChangeLog 2019-05-27 00:10:44 UTC (rev 245786)
@@ -1,3 +1,25 @@
+2019-05-26 Simon Fraser <[email protected]>
+
+ Add a GraphicsLayer::Type for ScrolledContents
+ https://bugs.webkit.org/show_bug.cgi?id=198257
+
+ Reviewed by Zalan Bujtas.
+
+ This ScrolledContents layer type will be used to choose different tiling behaviors
+ in a future patch.
+
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::supportsLayerType):
+ * platform/graphics/GraphicsLayer.h:
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayer::supportsLayerType):
+ (WebCore::GraphicsLayerCA::initialize):
+ (WebCore::GraphicsLayerCA::adjustCoverageRect const):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateScrollingLayers):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::ensureRootLayer):
+
2019-05-26 John Wilander <[email protected]>
Resource Load Statistics: Downgrade document.referrer to the referrer's eTLD+1 if the page was navigated to with a prevalent resource referrer containing link decoration
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (245785 => 245786)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2019-05-26 23:16:36 UTC (rev 245785)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2019-05-27 00:10:44 UTC (rev 245786)
@@ -79,6 +79,7 @@
case Type::Normal:
case Type::PageTiledBacking:
case Type::ScrollContainer:
+ case Type::ScrolledContents:
return true;
case Type::Shape:
return false;
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (245785 => 245786)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2019-05-26 23:16:36 UTC (rev 245785)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h 2019-05-27 00:10:44 UTC (rev 245786)
@@ -240,6 +240,7 @@
Normal,
PageTiledBacking,
ScrollContainer,
+ ScrolledContents,
Shape
};
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (245785 => 245786)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2019-05-26 23:16:36 UTC (rev 245785)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2019-05-27 00:10:44 UTC (rev 245786)
@@ -304,6 +304,7 @@
case Type::Normal:
case Type::PageTiledBacking:
case Type::ScrollContainer:
+ case Type::ScrolledContents:
return true;
case Type::Shape:
#if PLATFORM(COCOA)
@@ -415,6 +416,7 @@
PlatformCALayer::LayerType platformLayerType;
switch (layerType) {
case Type::Normal:
+ case Type::ScrolledContents:
platformLayerType = PlatformCALayer::LayerType::LayerTypeWebLayer;
break;
case Type::PageTiledBacking:
@@ -1448,6 +1450,7 @@
tiledBacking()->adjustTileCoverageRect(coverageRect, size(), oldVisibleRect, rects.visibleRect, pageScaleFactor() * deviceScaleFactor());
break;
case Type::Normal:
+ case Type::ScrolledContents:
if (m_layer->layerType() == PlatformCALayer::LayerTypeTiledBackingLayer)
coverageRect.unite(adjustTiledLayerVisibleRect(tiledBacking(), oldVisibleRect, rects.visibleRect, m_sizeAtLastCoverageRectUpdate, m_size));
break;
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (245785 => 245786)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-05-26 23:16:36 UTC (rev 245785)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-05-27 00:10:44 UTC (rev 245786)
@@ -1825,7 +1825,7 @@
m_scrollContainerLayer->setMasksToBounds(true);
// Inner layer which renders the content that scrolls.
- m_scrolledContentsLayer = createGraphicsLayer("scrolled contents");
+ m_scrolledContentsLayer = createGraphicsLayer("scrolled contents", GraphicsLayer::Type::ScrolledContents);
m_scrolledContentsLayer->setDrawsContent(true);
m_scrolledContentsLayer->setAnchorPoint({ });
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (245785 => 245786)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-05-26 23:16:36 UTC (rev 245785)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-05-27 00:10:44 UTC (rev 245786)
@@ -3783,7 +3783,7 @@
m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
m_overflowControlsHostLayer->setName("overflow controls host");
- m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
+ m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents);
m_scrolledContentsLayer->setName("scrolled contents");
m_scrolledContentsLayer->setAnchorPoint({ });