REGRESSION(r137726): Spring Loaded Pan Scrolling doesn't stop
authoryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 08:22:36 +0000 (08:22 +0000)
committeryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 08:22:36 +0000 (08:22 +0000)
commite6ec07fcfc18e7a0f523664012b24d6112522af6
treeaf931f201b28daf1012b00ba364efe1090a162d0
parentefad4533ee2e0cab3de360abfc1a90e53e930ef3
REGRESSION(r137726): Spring Loaded Pan Scrolling doesn't stop
https://bugs.webkit.org/show_bug.cgi?id=107205

Reviewed by Hajime Morita.

Source/WebCore:

The bug is caused by forgetting to set true m_panScrollButtonPressed
in AutoscrollController::startPanScroll().

This patch changes state management during pan scroll by replacing
m_panScrollButtonPressed and m_springLoadedPanScrollInProgress by
m_autoscrollType with introducing new AutoscrollController state
AutoscrollForPanCanStop.

Tests: platform/chromium-win/fast/events/panScroll-click.html
       platform/chromium-win/fast/events/panScroll-drag.html

* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::AutoscrollController): Changed to remove initialization of m_panScrollButtonPressed and m_springLoadedPanScrollInProgress.
(WebCore::AutoscrollController::stopAutoscrollTimer): Changed to remove resetting m_panScrollButtonPressed and m_springLoadedPanScrollInProgress.
(WebCore::AutoscrollController::handleMouseReleaseEvent): Changed to handle AutoscrollForPan and AutoscrollForPanCanStop.
(WebCore::AutoscrollController::panScrollInProgress): Changed to check AutoscrollForPanCanStop too.
(WebCore::AutoscrollController::startPanScrolling): Changed to remove setting of m_springLoadedPanScrollInProgress.
(WebCore::AutoscrollController::autoscrollTimerFired): Changed to add case for AutoscrollForPanCanStop.
(WebCore::AutoscrollController::updatePanScrollState): Chagned to use AutoscrollForPan and AutoscrollForPanCanStop.
* page/AutoscrollController.h:
(AutoscrollController): Changed to add AutoscrollForPanCanStop to AutoscrollType.

LayoutTests:

* platform/chromium-win/fast/events/panScroll-click-expected.txt: Added.
* platform/chromium-win/fast/events/panScroll-click.html: Added.
* platform/chromium-win/fast/events/panScroll-drag-expected.txt: Added.
* platform/chromium-win/fast/events/panScroll-drag.html: Added.
* platfrom/chromium/TestExpectations: Skip panScroll-{click,drag}.html for Android, Linux, and Mac.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/chromium-win/fast/events/panScroll-click-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-win/fast/events/panScroll-click.html [new file with mode: 0644]
LayoutTests/platform/chromium-win/fast/events/panScroll-drag-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium-win/fast/events/panScroll-drag.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/AutoscrollController.cpp
Source/WebCore/page/AutoscrollController.h