Remove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Jan 2014 05:42:27 +0000 (05:42 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Jan 2014 05:42:27 +0000 (05:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127981

Reviewed by Andreas Kling.

setLayerIsContainerForFixedPositionLayers() was only used by Chromium and Blackberry,
so remove it.

This allows the removal of RenderLayerBacking::registerScrollingLayers(),
moving the single useful line of code to the caller.

* page/scrolling/ScrollingCoordinator.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):

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

Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp

index 78d1bf6..78e38e2 100644 (file)
@@ -1,5 +1,25 @@
 2014-01-30  Simon Fraser  <simon.fraser@apple.com>
 
+        Remove ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers() which is no longer used
+        https://bugs.webkit.org/show_bug.cgi?id=127981
+
+        Reviewed by Andreas Kling.
+
+        setLayerIsContainerForFixedPositionLayers() was only used by Chromium and Blackberry,
+        so remove it.
+        
+        This allows the removal of RenderLayerBacking::registerScrollingLayers(),
+        moving the single useful line of code to the caller.
+
+        * page/scrolling/ScrollingCoordinator.h:
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+        * rendering/RenderLayerBacking.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::ensureRootLayer):
+
+2014-01-30  Simon Fraser  <simon.fraser@apple.com>
+
         Some fixed position elements disappear in WK2 on iOS
         https://bugs.webkit.org/show_bug.cgi?id=127977
 
index 9247ba3..bdc46fc 100644 (file)
@@ -172,7 +172,6 @@ public:
     virtual void willDestroyScrollableArea(ScrollableArea*) { }
     virtual void scrollableAreaScrollLayerDidChange(ScrollableArea*) { }
     virtual void scrollableAreaScrollbarLayerDidChange(ScrollableArea*, ScrollbarOrientation) { }
-    virtual void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool) { }
 
     static String synchronousScrollingReasonsAsText(SynchronousScrollingReasons);
     String synchronousScrollingReasonsAsText() const;
index 379acc4..e8c25bb 100644 (file)
@@ -958,7 +958,8 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
 
     updateDrawsContent(isSimpleContainer);
     updateAfterWidgetResize();
-    registerScrollingLayers();
+
+    compositor().updateViewportConstraintStatus(m_owningLayer);
 }
 
 void RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread(IntRect& ancestorCompositingBounds, const RenderLayer* compositingAncestor) const
@@ -1017,29 +1018,6 @@ void RenderLayerBacking::updateDirectlyCompositedContents(bool isSimpleContainer
     updateDirectlyCompositedBackgroundImage(isSimpleContainer, didUpdateContentsRect);
 }
 
-void RenderLayerBacking::registerScrollingLayers()
-{
-#if PLATFORM(IOS)
-    compositor().updateViewportConstraintStatus(m_owningLayer);
-#else
-    // Register fixed position layers and their containers with the scrolling coordinator.
-    ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(m_owningLayer);
-    if (!scrollingCoordinator)
-        return;
-
-    compositor().updateViewportConstraintStatus(m_owningLayer);
-
-    if (!scrollingCoordinator->supportsFixedPositionLayers())
-        return;
-
-    // Page scale is applied as a transform on the root render view layer. Because the scroll
-    // layer is further up in the hierarchy, we need to avoid marking the root render view
-    // layer as a container.
-    bool isContainer = m_owningLayer.hasTransform() && !m_owningLayer.isRootLayer();
-    scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(childForSuperlayers(), isContainer);
-#endif
-}
-
 void RenderLayerBacking::updateInternalHierarchy()
 {
     // m_foregroundLayer has to be inserted in the correct order with child layers,
index 4fe3d6a..987f920 100644 (file)
@@ -233,7 +233,6 @@ private:
     bool requiresScrollCornerLayer() const;
     bool updateScrollingLayers(bool scrollingLayers);
     void updateDrawsContent(bool isSimpleContainer);
-    void registerScrollingLayers();
     
     void updateRootLayerConfiguration();
 
index 3552e98..f4b523f 100644 (file)
@@ -3117,9 +3117,6 @@ void RenderLayerCompositor::ensureRootLayer()
 #ifndef NDEBUG
             m_scrollLayer->setName("frame scrolling");
 #endif
-            if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
-                scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_scrollLayer.get(), true);
-
             // Hook them up
             m_overflowControlsHostLayer->addChild(m_clipLayer.get());
             m_clipLayer->addChild(m_scrollLayer.get());