Latched scrolling may interact badly with custom programmatic scrolling
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Apr 2014 02:32:48 +0000 (02:32 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 20 Apr 2014 02:32:48 +0000 (02:32 +0000)
commitbfd476fb2801b8b0f82eff10d5c7054d2ca56ba4
tree62022c9fa3df5aa09ba81d029b44e024ae74d6a5
parentdf0ea829f594157e5b99f5689b86a5d15770ca02
Latched scrolling may interact badly with custom programmatic scrolling
https://bugs.webkit.org/show_bug.cgi?id=131869
<rdar://problem/16249557>

Reviewed by Darin Adler.

* dom/Element.cpp:
(WebCore::Element::setScrollLeft): Mark scrollable area as having
been scrolled programmatically.
(WebCore::Element::setScrollTop): Ditto.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Check for programmatic scroll, and
clear latched state if the handler manually scrolled. Clear programmatic
scroll state at the end of event handling.
(WebCore::EventHandler::clearLatchedState): Refactored code.
* page/EventHandler.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents): Check
if scrollable area was scrolled programmatically. If it was, do
not honor latching behavior.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::ScrollableArea): Initialize new member.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::isScrolledProgrammatically): Added.
(WebCore::ScrollableArea::setScrolledProgrammatically): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/platform/ScrollableArea.cpp
Source/WebCore/platform/ScrollableArea.h
WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme