Source/WebCore:
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Feb 2019 12:48:21 +0000 (12:48 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Feb 2019 12:48:21 +0000 (12:48 +0000)
Rename GraphicsLayer and PlatformCALayer scrolling layer type enum values to be less ambiguous
https://bugs.webkit.org/show_bug.cgi?id=194215

Reviewed by Frédéric Wang.

GraphicsLayer::Type::Scrolling -> GraphicsLayer::Type::ScrollContainer
PlatformCALayer::LayerTypeScrollingLayer -> PlatformCALayer::LayerTypeScrollContainerLayer

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::supportsLayerType):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::supportsLayerType):
(WebCore::GraphicsLayerCA::initialize):
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::operator<<):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::commonInit):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateScrollingLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):

Source/WebKit:
Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
https://bugs.webkit.org/show_bug.cgi?id=194215

Reviewed by Frédéric Wang.

* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::makeNode):
* UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::makeNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240918 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp
Source/WebCore/platform/graphics/ca/PlatformCALayer.h
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm

index 8b802f0..c800a64 100644 (file)
@@ -1,3 +1,30 @@
+2019-02-04  Antti Koivisto  <antti@apple.com>
+
+        Rename GraphicsLayer and PlatformCALayer scrolling layer type enum values to be less ambiguous
+        https://bugs.webkit.org/show_bug.cgi?id=194215
+
+        Reviewed by Frédéric Wang.
+
+        GraphicsLayer::Type::Scrolling -> GraphicsLayer::Type::ScrollContainer
+        PlatformCALayer::LayerTypeScrollingLayer -> PlatformCALayer::LayerTypeScrollContainerLayer
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::supportsLayerType):
+        * platform/graphics/GraphicsLayer.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayer::supportsLayerType):
+        (WebCore::GraphicsLayerCA::initialize):
+        * platform/graphics/ca/PlatformCALayer.cpp:
+        (WebCore::operator<<):
+        * platform/graphics/ca/PlatformCALayer.h:
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
+        (WebCore::PlatformCALayerCocoa::commonInit):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateScrollingLayers):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::ensureRootLayer):
+
 2019-02-03  Antti Koivisto  <antti@apple.com>
 
         [iOS] Tiles not created in large scrollable iframes
index 885cd2e..e23ef03 100644 (file)
@@ -78,7 +78,7 @@ bool GraphicsLayer::supportsLayerType(Type type)
     switch (type) {
     case Type::Normal:
     case Type::PageTiledBacking:
-    case Type::Scrolling:
+    case Type::ScrollContainer:
         return true;
     case Type::Shape:
         return false;
index cd793a1..e8e241a 100644 (file)
@@ -237,7 +237,7 @@ public:
     enum class Type : uint8_t {
         Normal,
         PageTiledBacking,
-        Scrolling,
+        ScrollContainer,
         Shape
     };
 
index 97788fa..1818683 100644 (file)
@@ -300,7 +300,7 @@ bool GraphicsLayer::supportsLayerType(Type type)
     switch (type) {
     case Type::Normal:
     case Type::PageTiledBacking:
-    case Type::Scrolling:
+    case Type::ScrollContainer:
         return true;
     case Type::Shape:
 #if PLATFORM(COCOA)
@@ -417,8 +417,8 @@ void GraphicsLayerCA::initialize(Type layerType)
     case Type::PageTiledBacking:
         platformLayerType = PlatformCALayer::LayerType::LayerTypePageTiledBackingLayer;
         break;
-    case Type::Scrolling:
-        platformLayerType = PlatformCALayer::LayerType::LayerTypeScrollingLayer;
+    case Type::ScrollContainer:
+        platformLayerType = PlatformCALayer::LayerType::LayerTypeScrollContainerLayer;
         break;
     case Type::Shape:
         platformLayerType = PlatformCALayer::LayerType::LayerTypeShapeLayer;
index 40b4ce7..7a91900 100644 (file)
@@ -228,8 +228,8 @@ TextStream& operator<<(TextStream& ts, PlatformCALayer::LayerType layerType)
     case PlatformCALayer::LayerTypeShapeLayer:
         ts << "shape-layer";
         break;
-    case PlatformCALayer::LayerTypeScrollingLayer:
-        ts << "scrolling-layer";
+    case PlatformCALayer::LayerTypeScrollContainerLayer:
+        ts << "scroll-container-layer";
         break;
     case PlatformCALayer::LayerTypeCustom:
         ts << "custom-layer";
index 111868a..2b06149 100644 (file)
@@ -75,7 +75,7 @@ public:
         LayerTypeShapeLayer,
         LayerTypeLightSystemBackdropLayer,
         LayerTypeDarkSystemBackdropLayer,
-        LayerTypeScrollingLayer,
+        LayerTypeScrollContainerLayer,
         LayerTypeEditableImageLayer,
         LayerTypeCustom,
     };
index f15eba5..52afc12 100644 (file)
@@ -230,8 +230,8 @@ PlatformCALayerCocoa::PlatformCALayerCocoa(LayerType layerType, PlatformCALayerC
     case LayerTypeRootLayer:
         layerClass = [CALayer class];
         break;
-    case LayerTypeScrollingLayer:
-        // Scrolling layers only have special behavior with PlatformCALayerRemote.
+    case LayerTypeScrollContainerLayer:
+        // Scroll container layers only have special behavior with PlatformCALayerRemote.
         // fallthrough
     case LayerTypeEditableImageLayer:
     case LayerTypeWebLayer:
@@ -306,7 +306,7 @@ void PlatformCALayerCocoa::commonInit()
     [m_layer setValue:[NSValue valueWithPointer:this] forKey:platformCALayerPointer];
     
     // Clear all the implicit animations on the CALayer
-    if (m_layerType == LayerTypeAVPlayerLayer || m_layerType == LayerTypeContentsProvidedLayer || m_layerType == LayerTypeScrollingLayer || m_layerType == LayerTypeCustom)
+    if (m_layerType == LayerTypeAVPlayerLayer || m_layerType == LayerTypeContentsProvidedLayer || m_layerType == LayerTypeScrollContainerLayer || m_layerType == LayerTypeCustom)
         [m_layer web_disableAllActions];
     else
         [m_layer setDelegate:[WebActionDisablingCALayerDelegate shared]];
index 669472a..eeb4c54 100644 (file)
@@ -778,7 +778,7 @@ static void printLayer(StringBuilder& builder, const PlatformCALayer* layer, int
     case PlatformCALayer::LayerTypeShapeLayer: layerTypeName = "shape-layer"; break;
     case PlatformCALayer::LayerTypeLightSystemBackdropLayer: layerTypeName = "light-system-backdrop-layer"; break;
     case PlatformCALayer::LayerTypeDarkSystemBackdropLayer: layerTypeName = "dark-system-backdrop-layer"; break;
-    case PlatformCALayer::LayerTypeScrollingLayer: layerTypeName = "scrolling-layer"; break;
+    case PlatformCALayer::LayerTypeScrollContainerLayer: layerTypeName = "scroll-container-layer"; break;
     case PlatformCALayer::LayerTypeCustom: layerTypeName = "custom-layer"; break;
     }
 
index eb3bb3b..5c345fe 100644 (file)
@@ -1743,7 +1743,7 @@ bool RenderLayerBacking::updateScrollingLayers(bool needsScrollingLayers)
 
     if (!m_scrollContainerLayer) {
         // Outer layer which corresponds with the scroll view.
-        m_scrollContainerLayer = createGraphicsLayer("scrolling container", GraphicsLayer::Type::Scrolling);
+        m_scrollContainerLayer = createGraphicsLayer("scroll container", GraphicsLayer::Type::ScrollContainer);
         m_scrollContainerLayer->setDrawsContent(false);
         m_scrollContainerLayer->setMasksToBounds(true);
 
index 70b9e3e..82f9e58 100644 (file)
@@ -3441,14 +3441,14 @@ void RenderLayerCompositor::ensureRootLayer()
             m_overflowControlsHostLayer->setName("overflow controls host");
 
             m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
-            m_scrolledContentsLayer->setName("scrolled contents layer");
+            m_scrolledContentsLayer->setName("scrolled contents");
             m_scrolledContentsLayer->setAnchorPoint({ });
 
 #if PLATFORM(IOS_FAMILY)
             if (m_renderView.settings().asyncFrameScrollingEnabled()) {
-                m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::Scrolling);
+                m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
 
-                m_scrollContainerLayer->setName("scroll containers layer");
+                m_scrollContainerLayer->setName("scroll container");
                 m_scrollContainerLayer->setMasksToBounds(true);
                 m_scrollContainerLayer->setAnchorPoint({ });
 
index 62e3438..87c7991 100644 (file)
@@ -1,3 +1,17 @@
+2019-02-04  Antti Koivisto  <antti@apple.com>
+
+        Rename GraphicsLayer and PlatformCALayer type enum values to match "scroll container layer" convention
+        https://bugs.webkit.org/show_bug.cgi?id=194215
+
+        Reviewed by Frédéric Wang.
+
+        * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+        (WebKit::RemoteLayerBackingStore::drawInContext):
+        * UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
+        (WebKit::RemoteLayerTreeHost::makeNode):
+        * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
+        (WebKit::RemoteLayerTreeHost::makeNode):
+
 2019-02-03  Antti Koivisto  <antti@apple.com>
 
         [iOS] Tiles not created in large scrollable iframes
index 5c494cd..0eba0d0 100644 (file)
@@ -368,7 +368,7 @@ void RemoteLayerBackingStore::drawInContext(WebCore::GraphicsContext& context, C
     case WebCore::PlatformCALayer::LayerTypeAVPlayerLayer:
     case WebCore::PlatformCALayer::LayerTypeContentsProvidedLayer:
     case WebCore::PlatformCALayer::LayerTypeShapeLayer:
-    case WebCore::PlatformCALayer::LayerTypeScrollingLayer:
+    case WebCore::PlatformCALayer::LayerTypeScrollContainerLayer:
     case WebCore::PlatformCALayer::LayerTypeEditableImageLayer:
     case WebCore::PlatformCALayer::LayerTypeCustom:
         ASSERT_NOT_REACHED();
index efa9b89..0d73871 100644 (file)
@@ -260,7 +260,7 @@ std::unique_ptr<RemoteLayerTreeNode> RemoteLayerTreeHost::makeNode(const RemoteL
     case PlatformCALayer::LayerTypeTiledBackingLayer:
     case PlatformCALayer::LayerTypePageTiledBackingLayer:
     case PlatformCALayer::LayerTypeTiledBackingTileLayer:
-    case PlatformCALayer::LayerTypeScrollingLayer:
+    case PlatformCALayer::LayerTypeScrollContainerLayer:
     case PlatformCALayer::LayerTypeEditableImageLayer:
         return RemoteLayerTreeNode::createWithPlainLayer(properties.layerID);
 
index c1fca2b..629a9c6 100644 (file)
@@ -108,7 +108,7 @@ std::unique_ptr<RemoteLayerTreeNode> RemoteLayerTreeHost::makeNode(const RemoteL
     case PlatformCALayer::LayerTypeShapeLayer:
         return makeAdoptingView([[WKShapeView alloc] init]);
 
-    case PlatformCALayer::LayerTypeScrollingLayer:
+    case PlatformCALayer::LayerTypeScrollContainerLayer:
         if (!m_isDebugLayerTreeHost)
             return makeAdoptingView([[WKChildScrollView alloc] init]);
         // The debug indicator parents views under layers, which can cause crashes with UIScrollView.