Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 640748994f2cc102c31d19601cf721b0828302e2..07cd51412b75fa91b4bdf90feb659d52efbb84ad 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -727,14 +727,20 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) |
m_client->cancelScheduledContentIntents(); |
case WebInputEvent::GestureScrollEnd: |
case WebInputEvent::GestureScrollUpdate: |
- case WebInputEvent::GestureFlingStart: |
+ case WebInputEvent::GestureFlingStart: { |
// Scrolling-related gesture events invoke EventHandler recursively for each frame down |
// the chain, doing a single-frame hit-test per frame. This matches handleWheelEvent. |
// Perhaps we could simplify things by rewriting scroll handling to work inner frame |
// out, and then unify with other gesture events. |
eventSwallowed = mainFrameImpl()->frame()->eventHandler().handleGestureScrollEvent(platformEvent); |
+ IntPoint unusedDelta = mainFrameImpl()->frame()->eventHandler().unusedDelta(); |
+ if (unusedDelta != IntPoint() && (event.type == WebInputEvent::GestureScrollUpdate)) { |
+ IntPoint accumaltedRootOverScroll = mainFrameImpl()->frame()->eventHandler().accumaltedRootOverScroll(); |
+ m_client->didOverScrollOnMainThread(unusedDelta.x(), unusedDelta.y(), accumaltedRootOverScroll.x(), accumaltedRootOverScroll.y(), platformEvent.position().x(), platformEvent.position().y(), platformEvent.velocityX(), platformEvent.velocityY()); |
+ } |
majidvp
2015/04/23 18:25:09
Overscroll should be reported on both gesture and
|
m_client->didHandleGestureEvent(event, eventCancelled); |
return eventSwallowed; |
+ } |
case WebInputEvent::GesturePinchBegin: |
case WebInputEvent::GesturePinchEnd: |
case WebInputEvent::GesturePinchUpdate: |