Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 20:46:03 +0000 (20:46 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Apr 2014 20:46:03 +0000 (20:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=131150

Reviewed by Beth Dakin.

When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
layout yet so our composting layers haven't been hooked together. Don't try
to add a zero nodeID to the map in this case.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayerCompositor.cpp

index 82f00b2..04ba49f 100644 (file)
@@ -1,3 +1,17 @@
+2014-04-02  Simon Fraser  <simon.fraser@apple.com>
+
+        Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=131150
+
+        Reviewed by Beth Dakin.
+
+        When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
+        layout yet so our composting layers haven't been hooked together. Don't try
+        to add a zero nodeID to the map in this case.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
+
 2014-04-03  David Hyatt  <hyatt@apple.com>
 
         Continuations casting issue.
index b55f5e4..89095b0 100644 (file)
@@ -3505,6 +3505,9 @@ void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, Scr
             ASSERT_NOT_REACHED();
 
         nodeID = scrollingCoordinator->attachToStateTree(nodeType, nodeID, parentNodeID);
+        if (!nodeID)
+            return;
+
         backing->setViewportConstrainedNodeID(nodeID);
 
         switch (nodeType) {
@@ -3528,6 +3531,9 @@ void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, Scr
             nodeID = scrollingCoordinator->uniqueScrollLayerID();
 
         nodeID = scrollingCoordinator->attachToStateTree(isRootLayer ? FrameScrollingNode : OverflowScrollingNode, nodeID, parentNodeID);
+        if (!nodeID)
+            return;
+
         backing->setScrollingNodeID(nodeID);
         m_scrollingNodeToLayerMap.add(nodeID, &layer);