Title: [109183] trunk/Source/WebCore
Revision
109183
Author
ander...@apple.com
Date
2012-02-28 18:36:08 -0800 (Tue, 28 Feb 2012)

Log Message

With tiled drawing enabled, pressing Down arrow after scrolling via mouse gesture causes page to jump back up to top
https://bugs.webkit.org/show_bug.cgi?id=79249
<rdar://problem/10866273>

Reviewed by Sam Weinig.

ScrollableArea::notifyScrollPositionChanged must make sure that the scroll animator position is kept up to date.

* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::setCurrentPosition):
(WebCore):
* platform/ScrollAnimator.h:
(ScrollAnimator):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::notifyScrollPositionChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (109182 => 109183)


--- trunk/Source/WebCore/ChangeLog	2012-02-29 02:20:12 UTC (rev 109182)
+++ trunk/Source/WebCore/ChangeLog	2012-02-29 02:36:08 UTC (rev 109183)
@@ -1,3 +1,21 @@
+2012-02-28  Anders Carlsson  <ander...@apple.com>
+
+        With tiled drawing enabled, pressing Down arrow after scrolling via mouse gesture causes page to jump back up to top
+        https://bugs.webkit.org/show_bug.cgi?id=79249
+        <rdar://problem/10866273>
+
+        Reviewed by Sam Weinig.
+
+        ScrollableArea::notifyScrollPositionChanged must make sure that the scroll animator position is kept up to date.
+
+        * platform/ScrollAnimator.cpp:
+        (WebCore::ScrollAnimator::setCurrentPosition):
+        (WebCore):
+        * platform/ScrollAnimator.h:
+        (ScrollAnimator):
+        * platform/ScrollableArea.cpp:
+        (WebCore::ScrollableArea::notifyScrollPositionChanged):
+
 2012-02-28  Daniel Cheng  <dch...@chromium.org>
 
         Unreviewed, rolling out r107894.

Modified: trunk/Source/WebCore/platform/ScrollAnimator.cpp (109182 => 109183)


--- trunk/Source/WebCore/platform/ScrollAnimator.cpp	2012-02-29 02:20:12 UTC (rev 109182)
+++ trunk/Source/WebCore/platform/ScrollAnimator.cpp	2012-02-29 02:36:08 UTC (rev 109183)
@@ -122,6 +122,12 @@
     return handled;
 }
 
+void ScrollAnimator::setCurrentPosition(const FloatPoint& position)
+{
+    m_currentPosX = position.x();
+    m_currentPosY = position.y();
+}
+
 FloatPoint ScrollAnimator::currentPosition() const
 {
     return FloatPoint(m_currentPosX, m_currentPosY);

Modified: trunk/Source/WebCore/platform/ScrollAnimator.h (109182 => 109183)


--- trunk/Source/WebCore/platform/ScrollAnimator.h	2012-02-29 02:20:12 UTC (rev 109182)
+++ trunk/Source/WebCore/platform/ScrollAnimator.h	2012-02-29 02:36:08 UTC (rev 109183)
@@ -65,6 +65,7 @@
 
     virtual bool handleWheelEvent(const PlatformWheelEvent&);
 
+    void setCurrentPosition(const FloatPoint&);
     FloatPoint currentPosition() const;
 
     virtual void cancelAnimations() { }

Modified: trunk/Source/WebCore/platform/ScrollableArea.cpp (109182 => 109183)


--- trunk/Source/WebCore/platform/ScrollableArea.cpp	2012-02-29 02:20:12 UTC (rev 109182)
+++ trunk/Source/WebCore/platform/ScrollableArea.cpp	2012-02-29 02:36:08 UTC (rev 109183)
@@ -150,6 +150,7 @@
             verticalScrollbar->invalidate();
     }
 
+    scrollAnimator()->setCurrentPosition(position);
     scrollAnimator()->notifyContentAreaScrolled();
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to