Title: [163176] trunk/Source/WebCore
Revision
163176
Author
[email protected]
Date
2014-01-31 10:25:34 -0800 (Fri, 31 Jan 2014)

Log Message

Make iOS fixed layer registration more like OS X
https://bugs.webkit.org/show_bug.cgi?id=127983

Reviewed by Antti Koivisto.

Remove some #if PLATFORM(IOS) in the code related to registering
viewport-constrained layers. The code behaves correctly now in WK1
and WK2 based on the presence of a ScrollingCoordinator.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::nearestScrollingCoordinatorAncestor):
(WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
(WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (163175 => 163176)


--- trunk/Source/WebCore/ChangeLog	2014-01-31 17:43:04 UTC (rev 163175)
+++ trunk/Source/WebCore/ChangeLog	2014-01-31 18:25:34 UTC (rev 163176)
@@ -1,3 +1,20 @@
+2014-01-30  Simon Fraser  <[email protected]>
+
+        Make iOS fixed layer registration more like OS X
+        https://bugs.webkit.org/show_bug.cgi?id=127983
+
+        Reviewed by Antti Koivisto.
+
+        Remove some #if PLATFORM(IOS) in the code related to registering
+        viewport-constrained layers. The code behaves correctly now in WK1
+        and WK2 based on the presence of a ScrollingCoordinator.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+        (WebCore::nearestScrollingCoordinatorAncestor):
+        (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
+        (WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer):
+
 2014-01-31  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r163165.

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (163175 => 163176)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2014-01-31 17:43:04 UTC (rev 163175)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2014-01-31 18:25:34 UTC (rev 163176)
@@ -437,11 +437,12 @@
     ChromeClient* client = this->chromeClient();
     if (client && isFlushRoot)
         client->didFlushCompositingLayers();
-#else
+#endif
+
     for (auto it = m_viewportConstrainedLayersNeedingUpdate.begin(), end = m_viewportConstrainedLayersNeedingUpdate.end(); it != end; ++it)
         registerOrUpdateViewportConstrainedLayer(**it);
+
     m_viewportConstrainedLayersNeedingUpdate.clear();
-#endif
     startLayerFlushTimerIfNeeded();
 }
 
@@ -3428,7 +3429,6 @@
     return constraints;
 }
 
-#if !PLATFORM(IOS)
 static RenderLayerBacking* nearestScrollingCoordinatorAncestor(RenderLayer& layer)
 {
     RenderLayer* ancestor = layer.parent();
@@ -3442,14 +3442,9 @@
 
     return nullptr;
 }
-#endif
 
 void RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer(RenderLayer& layer)
 {
-#if PLATFORM(IOS)
-    UNUSED_PARAM(layer);
-    // On iOS, we batch-update viewport-constrained layers in updateCustomLayersAfterFlush().
-#else
     // FIXME: We should support sticky position here! And we should eventuall support fixed/sticky elements
     // that are inside non-main frames once we get non-main frames scrolling with the ScrollingCoordinator.
     if (m_renderView.document().ownerElement())
@@ -3483,19 +3478,14 @@
         scrollingCoordinator->updateViewportConstrainedNode(nodeID, computeStickyViewportConstraints(layer), backing->graphicsLayer());
     else
         scrollingCoordinator->updateViewportConstrainedNode(nodeID, computeFixedViewportConstraints(layer), backing->graphicsLayer());
-#endif
 }
 
 void RenderLayerCompositor::unregisterViewportConstrainedLayer(RenderLayer& layer)
 {
     ASSERT(m_viewportConstrainedLayers.contains(&layer));
-#if PLATFORM(IOS)
-    UNUSED_PARAM(layer);
-    // On iOS, we batch-update viewport-constrained layers in updateCustomLayersAfterFlush().
-#else
+
     if (RenderLayerBacking* backing = layer.backing())
         backing->detachFromScrollingCoordinator();
-#endif
 }
 
 #if PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to