Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Mar 2014 02:54:31 +0000 (02:54 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Mar 2014 02:54:31 +0000 (02:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129724

Reviewed by Sam Weinig.

Call setScrollPositionWithoutContentEdgeConstraints() from
ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
layers are not clamped during rubber-banding.

This requires making setScrollPositionWithoutContentEdgeConstraints()
a pure virtual function on the base class.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:

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

Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h

index b6d7964..d37da83 100644 (file)
@@ -1,3 +1,23 @@
+2014-03-04  Simon Fraser  <simon.fraser@apple.com>
+
+        Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
+        https://bugs.webkit.org/show_bug.cgi?id=129724
+
+        Reviewed by Sam Weinig.
+        
+        Call setScrollPositionWithoutContentEdgeConstraints() from
+        ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
+        layers are not clamped during rubber-banding.
+        
+        This requires making setScrollPositionWithoutContentEdgeConstraints()
+        a pure virtual function on the base class.
+
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
+        * page/scrolling/ScrollingTreeScrollingNode.h:
+        * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
+        * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
+
 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
 
         WebVideoFullscreen, should make the hand off of the video layer explicit.
index faaae52..02f5c06 100644 (file)
@@ -107,7 +107,7 @@ void ScrollingTree::scrollPositionChangedViaDelegatedScrolling(ScrollingNodeID n
     if (node->nodeType() != ScrollingNode)
         return;
 
-    toScrollingTreeScrollingNode(node)->setScrollPosition(scrollPosition);
+    toScrollingTreeScrollingNode(node)->setScrollPositionWithoutContentEdgeConstraints(scrollPosition);
 }
 
 void ScrollingTree::commitNewTreeState(PassOwnPtr<ScrollingStateTree> scrollingStateTree)
index e922c7e..20feea0 100644 (file)
@@ -51,6 +51,7 @@ public:
 
     virtual void handleWheelEvent(const PlatformWheelEvent&) = 0;
     virtual void setScrollPosition(const FloatPoint&) = 0;
+    virtual void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) = 0;
 
     SynchronousScrollingReasons synchronousScrollingReasons() const { return m_synchronousScrollingReasons; }
     bool shouldUpdateScrollLayerPositionSynchronously() const { return m_synchronousScrollingReasons; }
index d0d2eff..d774299 100644 (file)
@@ -50,7 +50,7 @@ private:
 
     FloatPoint scrollPosition() const;
     virtual void setScrollPosition(const FloatPoint&) override;
-    void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&);
+    virtual void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override;
 
     void setScrollLayerPosition(const FloatPoint&);
 
index 1eabcdc..ee91e13 100644 (file)
@@ -67,7 +67,7 @@ private:
 
     FloatPoint scrollPosition() const;
     virtual void setScrollPosition(const FloatPoint&) override;
-    void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&);
+    virtual void setScrollPositionWithoutContentEdgeConstraints(const FloatPoint&) override;
 
     void setScrollLayerPosition(const FloatPoint&);