Skip to content
Permalink
Browse files
With tiled drawing enabled, pressing Down arrow after scrolling via m…
…ouse 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):

Canonical link: https://commits.webkit.org/96940@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Feb 29, 2012
1 parent bcad8c6 commit e482c795bb713baf5ebe2f8c21ea04e64d6d153b
Showing with 26 additions and 0 deletions.
  1. +18 −0 Source/WebCore/ChangeLog
  2. +6 −0 Source/WebCore/platform/ScrollAnimator.cpp
  3. +1 −0 Source/WebCore/platform/ScrollAnimator.h
  4. +1 −0 Source/WebCore/platform/ScrollableArea.cpp
@@ -1,3 +1,21 @@
2012-02-28 Anders Carlsson <andersca@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 <dcheng@chromium.org>

Unreviewed, rolling out r107894.
@@ -122,6 +122,12 @@ bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
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);
@@ -65,6 +65,7 @@ class ScrollAnimator {

virtual bool handleWheelEvent(const PlatformWheelEvent&);

void setCurrentPosition(const FloatPoint&);
FloatPoint currentPosition() const;

virtual void cancelAnimations() { }
@@ -150,6 +150,7 @@ void ScrollableArea::notifyScrollPositionChanged(const IntPoint& position)
verticalScrollbar->invalidate();
}

scrollAnimator()->setCurrentPosition(position);
scrollAnimator()->notifyContentAreaScrolled();
}

0 comments on commit e482c79

Please sign in to comment.