Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1876)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 1308313005: Modify gesture event types for WebView-tag scroll bubbling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment to explain |resendingPluginId|. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebInputEventConversion.cpp ('k') | Source/web/tests/VisualViewportTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index f57c51a0631416a97657ff5db47a1153b8dabf9e..a32798f9a27adf0924a36690fdacb755c77ef0db 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);
}
« no previous file with comments | « Source/web/WebInputEventConversion.cpp ('k') | Source/web/tests/VisualViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698