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

Unified Diff: ui/events/blink/input_handler_proxy.cc

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: Merged with master. Created 3 years, 6 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: ui/events/blink/input_handler_proxy.cc
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc
index 6ff1983d7139c16be4b7604726a8c80db40dea7f..2b1f46de9277e230d74ddeab4439a2fa53e3ee21 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -141,6 +141,10 @@ cc::ScrollState CreateScrollStateForGesture(const WebGestureEvent& event) {
case WebInputEvent::kGestureScrollBegin:
scroll_state_data.position_x = event.x;
scroll_state_data.position_y = event.y;
+ scroll_state_data.delta_x_hint = -event.data.scroll_begin.delta_x_hint;
+ scroll_state_data.delta_y_hint = -event.data.scroll_begin.delta_y_hint;
+ scroll_state_data.ignore_delta_hints =
+ event.data.scroll_begin.ignore_delta_hints;
bokan 2017/06/19 21:43:17 Do you know what this flag is used for? Does it ev
sahel 2017/06/22 16:34:20 I will get rid of this once I fix the event_sender
bokan 2017/06/22 21:44:37 Acknowledged.
scroll_state_data.is_beginning = true;
// On Mac, a GestureScrollBegin in the inertial phase indicates a fling
// start.
@@ -826,8 +830,7 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureScrollBegin(
} else if (ShouldAnimate(gesture_event.data.scroll_begin.delta_hint_units !=
blink::WebGestureEvent::ScrollUnits::kPixels)) {
DCHECK(!scroll_state.is_in_inertial_phase());
- gfx::Point scroll_point(gesture_event.x, gesture_event.y);
- scroll_status = input_handler_->ScrollAnimatedBegin(scroll_point);
+ scroll_status = input_handler_->ScrollAnimatedBegin(&scroll_state);
} else {
scroll_status = input_handler_->ScrollBegin(
&scroll_state, GestureScrollInputType(gesture_event.source_device));

Powered by Google App Engine
This is Rietveld 408576698