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

Unified Diff: content/renderer/input/input_handler_proxy.cc

Issue 591233002: [exp] Browser-side fling in aura. Base URL: https://chromium.googlesource.com/chromium/src.git@fling-curve-config-remove
Patch Set: self-nits Created 6 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 | « content/common/input/web_input_event_traits.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_handler_proxy.cc
diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
index 90df5cb70e82c70706586ec3e8b07a9baec07abf..1de0e86a489fbe53b99d5849606cc1745ce00875 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -66,7 +66,9 @@ bool ShouldSuppressScrollForFlingBoosting(
const gfx::Vector2dF& current_fling_velocity,
const WebGestureEvent& scroll_update_event,
double time_since_last_boost_event) {
- DCHECK_EQ(WebInputEvent::GestureScrollUpdate, scroll_update_event.type);
+ DCHECK(WebInputEvent::GestureScrollUpdate == scroll_update_event.type ||
+ WebInputEvent::GestureScrollUpdateWithoutPropagation ==
+ scroll_update_event.type);
gfx::Vector2dF dx(scroll_update_event.data.scrollUpdate.deltaX,
scroll_update_event.data.scrollUpdate.deltaY);
@@ -287,7 +289,9 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleInputEvent(
NOTREACHED();
break;
}
- } else if (event.type == WebInputEvent::GestureScrollUpdate) {
+ } else if (event.type == WebInputEvent::GestureScrollUpdate ||
+ event.type ==
+ WebInputEvent::GestureScrollUpdateWithoutPropagation) {
#ifndef NDEBUG
DCHECK(expect_scroll_update_end_);
#endif
@@ -510,6 +514,7 @@ bool InputHandlerProxy::FilterInputEventForFlingBoosting(
ExtendBoostedFlingTimeout(gesture_event);
return true;
+ case WebInputEvent::GestureScrollUpdateWithoutPropagation:
case WebInputEvent::GestureScrollUpdate: {
const double time_since_last_boost_event =
event.timeStampSeconds - last_fling_boost_event_.timeStampSeconds;
@@ -712,6 +717,8 @@ bool InputHandlerProxy::CancelCurrentFlingWithoutNotifyingClient() {
WebGestureEvent last_fling_boost_event = last_fling_boost_event_;
last_fling_boost_event_ = WebGestureEvent();
if (last_fling_boost_event.type == WebInputEvent::GestureScrollBegin ||
+ last_fling_boost_event.type ==
+ WebInputEvent::GestureScrollUpdateWithoutPropagation ||
last_fling_boost_event.type == WebInputEvent::GestureScrollUpdate) {
// Synthesize a GestureScrollBegin, as the original was suppressed.
HandleInputEvent(ObtainGestureScrollBegin(last_fling_boost_event));
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698