Title: [262833] trunk
Revision
262833
Author
[email protected]
Date
2020-06-09 20:44:18 -0700 (Tue, 09 Jun 2020)

Log Message

Minor overflow layers cleanup
https://bugs.webkit.org/show_bug.cgi?id=213002

Reviewed by Zalan Bujtas.

Source/WebCore:

Now that we parent scrollbar and scroll corner layers into the overflowControlsContainer
layer, we no need to parent these layers in RenderLayerCompositor::updateBackingAndHierarchy().

Also rename overflowControlsHostLayerBox to overflowControlsHostLayerRect to avoid
ambiguity with RenderBox.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDebugIndicators):
(WebCore::overflowControlsHostLayerRect):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::overflowControlsHostLayerBox): Deleted.
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

LayoutTests:

New results now now that the scrollbar layers aren't reparented.

* compositing/overflow/overflow-scrollbar-layer-positions-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (262832 => 262833)


--- trunk/LayoutTests/ChangeLog	2020-06-10 02:16:41 UTC (rev 262832)
+++ trunk/LayoutTests/ChangeLog	2020-06-10 03:44:18 UTC (rev 262833)
@@ -1,3 +1,14 @@
+2020-06-09  Simon Fraser  <[email protected]>
+
+        Minor overflow layers cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=213002
+
+        Reviewed by Zalan Bujtas.
+
+        New results now now that the scrollbar layers aren't reparented.
+
+        * compositing/overflow/overflow-scrollbar-layer-positions-expected.txt:
+
 2020-06-09  Javier Fernandez  <[email protected]>
 
         [GTK] Unreviewed test gardening

Modified: trunk/LayoutTests/compositing/overflow/overflow-scrollbar-layer-positions-expected.txt (262832 => 262833)


--- trunk/LayoutTests/compositing/overflow/overflow-scrollbar-layer-positions-expected.txt	2020-06-10 02:16:41 UTC (rev 262832)
+++ trunk/LayoutTests/compositing/overflow/overflow-scrollbar-layer-positions-expected.txt	2020-06-10 03:44:18 UTC (rev 262833)
@@ -14,9 +14,15 @@
           (drawsContent 1)
           (children 1
             (GraphicsLayer
-              (position 185.00 0.00)
-              (bounds 15.00 200.00)
-              (drawsContent 1)
+              (position 22.00 22.00)
+              (bounds 200.00 200.00)
+              (children 1
+                (GraphicsLayer
+                  (position 185.00 0.00)
+                  (bounds 15.00 200.00)
+                  (drawsContent 1)
+                )
+              )
             )
           )
         )

Modified: trunk/Source/WebCore/ChangeLog (262832 => 262833)


--- trunk/Source/WebCore/ChangeLog	2020-06-10 02:16:41 UTC (rev 262832)
+++ trunk/Source/WebCore/ChangeLog	2020-06-10 03:44:18 UTC (rev 262833)
@@ -1,3 +1,25 @@
+2020-06-09  Simon Fraser  <[email protected]>
+
+        Minor overflow layers cleanup
+        https://bugs.webkit.org/show_bug.cgi?id=213002
+
+        Reviewed by Zalan Bujtas.
+
+        Now that we parent scrollbar and scroll corner layers into the overflowControlsContainer
+        layer, we no need to parent these layers in RenderLayerCompositor::updateBackingAndHierarchy().
+
+        Also rename overflowControlsHostLayerBox to overflowControlsHostLayerRect to avoid
+        ambiguity with RenderBox.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateDebugIndicators):
+        (WebCore::overflowControlsHostLayerRect):
+        (WebCore::RenderLayerBacking::updateGeometry):
+        (WebCore::overflowControlsHostLayerBox): Deleted.
+        * rendering/RenderLayerBacking.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
+
 2020-06-09  Mark Lam  <[email protected]>
 
         Disambiguate the OverridesGetPropertyNames structure flag

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (262832 => 262833)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2020-06-10 02:16:41 UTC (rev 262832)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2020-06-10 03:44:18 UTC (rev 262833)
@@ -472,7 +472,10 @@
     
     if (m_contentsContainmentLayer)
         m_contentsContainmentLayer->setShowDebugBorder(showBorder);
-    
+
+    if (m_childContainmentLayer)
+        m_childContainmentLayer->setShowDebugBorder(showBorder);
+
     if (m_backgroundLayer) {
         m_backgroundLayer->setShowDebugBorder(showBorder);
         m_backgroundLayer->setShowRepaintCounter(showRepaintCounter);
@@ -612,7 +615,7 @@
     return result;
 }
 
-static LayoutRect overflowControlsHostLayerBox(const RenderBox& renderBox)
+static LayoutRect overflowControlsHostLayerRect(const RenderBox& renderBox)
 {
     return renderBox.paddingBoxRectIncludingScrollbar();
 }
@@ -1413,7 +1416,7 @@
     }
 
     if (m_overflowControlsContainer) {
-        LayoutRect overflowControlsBox = overflowControlsHostLayerBox(downcast<RenderBox>(renderer()));
+        LayoutRect overflowControlsBox = overflowControlsHostLayerRect(downcast<RenderBox>(renderer()));
         LayoutSize boxOffsetFromGraphicsLayer = toLayoutSize(overflowControlsBox.location()) + rendererOffset.fromPrimaryGraphicsLayer();
         SnappedRectInfo snappedBoxInfo = snappedGraphicsLayer(boxOffsetFromGraphicsLayer, overflowControlsBox.size(), deviceScaleFactor);
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (262832 => 262833)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.h	2020-06-10 02:16:41 UTC (rev 262832)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h	2020-06-10 03:44:18 UTC (rev 262833)
@@ -167,7 +167,7 @@
     // This returns false for other layers, and when the document layer actually needs to paint into its backing store
     // for some reason.
     bool paintsIntoWindow() const;
-    
+
     // Returns true for a composited layer that has no backing store of its own, so
     // paints into some ancestor layer.
     bool paintsIntoCompositedAncestor() const { return !m_requiresOwnBackingStore; }
@@ -265,6 +265,7 @@
     GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); }
     GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); }
     GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); }
+    GraphicsLayer* overflowControlsContainer() const { return m_overflowControlsContainer.get(); }
 
     bool canCompositeFilters() const { return m_canCompositeFilters; }
 #if ENABLE(FILTERS_LEVEL_2)

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (262832 => 262833)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2020-06-10 02:16:41 UTC (rev 262832)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2020-06-10 03:44:18 UTC (rev 262833)
@@ -1360,14 +1360,8 @@
             // If the layer has a clipping layer the overflow controls layers will be siblings of the clipping layer.
             // Otherwise, the overflow control layers are normal children.
             if (!layerBacking->hasClippingLayer() && !layerBacking->hasScrollingLayer()) {
-                if (auto* overflowControlLayer = layerBacking->layerForHorizontalScrollbar())
+                if (auto* overflowControlLayer = layerBacking->overflowControlsContainer())
                     layerBacking->parentForSublayers()->addChild(*overflowControlLayer);
-
-                if (auto* overflowControlLayer = layerBacking->layerForVerticalScrollbar())
-                    layerBacking->parentForSublayers()->addChild(*overflowControlLayer);
-
-                if (auto* overflowControlLayer = layerBacking->layerForScrollCorner())
-                    layerBacking->parentForSublayers()->addChild(*overflowControlLayer);
             }
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to