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

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: Cleanup asserts. 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..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);
}

Powered by Google App Engine
This is Rietveld 408576698