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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 10826209: gestures: Generate only either scroll-end or fling-start events at the end of a scroll gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-fix Created 8 years, 4 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: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 273907861e0e07d693f87371bafabddd2f27a41e..0fe503fe45ba1c06811187aae432a81cc0521204 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1318,6 +1318,11 @@ ui::GestureStatus RenderWidgetHostViewAura::OnGestureEvent(
WebKit::WebGestureEvent fling_cancel = gesture;
fling_cancel.type = WebKit::WebInputEvent::GestureFlingCancel;
host_->ForwardGestureEvent(fling_cancel);
+ } else if (event->type() == ui::ET_SCROLL_FLING_START) {
+ // WebKit requires that a scroll ends first before a fling starts.
rjkroege 2012/08/09 16:51:06 It is planned to remove this requirement on WebKit
sadrul 2012/08/09 17:44:02 Nice! My impression was that it was still necessar
+ WebKit::WebGestureEvent scroll_end = gesture;
+ gesture.type = WebKit::WebInputEvent::GestureScrollEnd;
+ host_->ForwardGestureEvent(scroll_end);
}
if (gesture.type != WebKit::WebInputEvent::Undefined) {

Powered by Google App Engine
This is Rietveld 408576698