Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index 1d3f446d1e4acd57d7eb6a03c54d22d081d766d6..6c78d5944638688c61ad09dbc5bffcd7b2e4ac6e 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -687,6 +687,7 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) |
| if (!m_client) |
| return false; |
| + |
|
tdresser
2015/09/15 13:13:08
Remove space.
wjmaclean
2015/09/15 15:02:48
Done.
|
| bool eventSwallowed = false; |
| bool eventCancelled = false; // for disambiguation |
| @@ -707,6 +708,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); |
|
tdresser
2015/09/15 13:13:08
Why do we need to explicitly repost the fling? Can
wjmaclean
2015/09/15 15:02:48
No, the GestureFlingStart gets dropped on the floo
tdresser
2015/09/15 15:28:29
I wonder if by not swallowing the event we could a
|
| + |
| m_client->didHandleGestureEvent(event, eventCancelled); |
| return eventSwallowed; |
| } |
| @@ -1864,7 +1871,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, 0); |
|
tdresser
2015/09/15 13:13:08
-1
We might want to define a constant for this, i
wjmaclean
2015/09/15 15:02:48
Done.
|
| mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endScrollEvent); |
| } |