REGRESSION (r142520?): Space no longer scrolls the page
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 01:35:34 +0000 (01:35 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Feb 2013 01:35:34 +0000 (01:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109526

Reviewed by Tim Horton.

ScrollingTree::updateTreeFromStateNode() used to bail early when it had
no children (no fixed or sticky elements), but that left updateAfterChildren()
uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
position.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):

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

Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingTree.cpp

index 4394594..bcc62fe 100644 (file)
@@ -1,3 +1,18 @@
+2013-02-11  Simon Fraser  <simon.fraser@apple.com>
+
+        REGRESSION (r142520?): Space no longer scrolls the page
+        https://bugs.webkit.org/show_bug.cgi?id=109526
+
+        Reviewed by Tim Horton.
+
+        ScrollingTree::updateTreeFromStateNode() used to bail early when it had
+        no children (no fixed or sticky elements), but that left updateAfterChildren()
+        uncalled. Fix by always calling updateAfterChildren(), which updates the scroll
+        position.
+
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::updateTreeFromStateNode):
+
 2013-02-11  Tim Horton  <timothy_horton@apple.com>
 
         Remove extra early-return in FrameView::setScrollPosition
index 20619df..f4c7691 100644 (file)
@@ -193,13 +193,11 @@ void ScrollingTree::updateTreeFromStateNode(ScrollingStateNode* stateNode)
 
     // Now update the children if we have any.
     Vector<OwnPtr<ScrollingStateNode> >* stateNodeChildren = stateNode->children();
-    if (!stateNodeChildren)
-        return;
-
-    size_t size = stateNodeChildren->size();
-    for (size_t i = 0; i < size; ++i)
-        updateTreeFromStateNode(stateNodeChildren->at(i).get());
-    
+    if (stateNodeChildren) {
+        size_t size = stateNodeChildren->size();
+        for (size_t i = 0; i < size; ++i)
+            updateTreeFromStateNode(stateNodeChildren->at(i).get());
+    }
     node->updateAfterChildren(stateNode);
 }