Make momentum scroll event latching work in WebKit2 on Mac.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Apr 2011 19:57:53 +0000 (19:57 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Apr 2011 19:57:53 +0000 (19:57 +0000)
commitdf98d29b62fa28c162753a1d8547b8772c693f46
treef4c2c8b5e9fe253b71111c6f46c5444b36c3f71a
parent0ef2f479d0bf042e95dd6c0b1b51d2c17f1b2579
Make momentum scroll event latching work in WebKit2 on Mac.

<rdar://problem/8751861>

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in: Remove _wkIsLatchingWheelEvent, add _wkGetNSEventMomentumPhase.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleWheelEvent): Set m_useLatchedWheelEventNode based on the
event's momentumPhase.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::wheelEvent): Remove the setting of m_useLatchedWheelEventNode.
It is now done in EventHandler::handleWheelEvent.
* platform/mac/WebCoreSystemInterface.h: Remove wkIsLatchingWheelEvent, add wkGetNSEventMomentumPhase.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* platform/mac/WheelEventMac.mm:
(WebCore::momentumPhaseForEvent): Return a phase on older Mac system by using wkGetNSEventMomentumPhase.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Remove IsLatchingWheelEvent, add GetNSEventMomentumPhase.
* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView scrollWheel:]): Use WKGetNSEventMomentumPhase to set isLatchingEvent.

Source/WebKit2:

* Shared/mac/WebEventFactory.mm:
(WebKit::momentumPhaseForEvent): Return a phase on older Mac system by using WKGetNSEventMomentumPhase.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Remove IsLatchingWheelEvent, add GetNSEventMomentumPhase.

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a: Updated to remove WKIsLatchingWheelEvent and add WKGetNSEventMomentumPhase.
* libWebKitSystemInterfaceSnowLeopard.a: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/platform/mac/WebCoreSystemInterface.h
Source/WebCore/platform/mac/WebCoreSystemInterface.mm
Source/WebCore/platform/mac/WheelEventMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/WebEventFactory.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a