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

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: Rename |resendSource| to |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
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);
}

Powered by Google App Engine
This is Rietveld 408576698