Index: Source/web/WebViewImpl.cpp |
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
index 1d3f446d1e4acd57d7eb6a03c54d22d081d766d6..64b6cbabf6759fffbd4ce2c65184db61a4af5d6c 100644 |
--- a/Source/web/WebViewImpl.cpp |
+++ b/Source/web/WebViewImpl.cpp |
@@ -707,6 +707,12 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) |
scheduleAnimation(); |
eventSwallowed = true; |
+ // Plugins may need to see GestureFlingStart to balance |
+ // GestureScrollBegin (since the former replaces GestureScrollEnd when |
+ // transitioning to a fling). |
+ PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event); |
+ mainFrameImpl()->frame()->eventHandler().handleGestureScrollEvent(platformEvent); |
+ |
m_client->didHandleGestureEvent(event, eventCancelled); |
return eventSwallowed; |
} |
@@ -1864,7 +1870,7 @@ void WebViewImpl::beginFrame(const WebBeginFrameArgs& frameTime) |
PlatformGestureEvent endScrollEvent(PlatformEvent::GestureScrollEnd, |
m_positionOnFlingStart, m_globalPositionOnFlingStart, |
IntSize(), 0, false, false, false, false); |
- endScrollEvent.setScrollGestureData(0, 0, 0, 0, true, false); |
+ endScrollEvent.setScrollGestureData(0, 0, 0, 0, true, false, -1 /* null plugin id */); |
mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endScrollEvent); |
} |