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

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

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: ignore_delta_hints_ deleted. 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 0f26dd9f7641c7c7fd8e21dd283b3544c2f515bc..6633e90daf6ce8881bf31e98bfc9a02d0937d6bc 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -141,6 +141,8 @@ 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.is_beginning = true;
// On Mac, a GestureScrollBegin in the inertial phase indicates a fling
// start.
@@ -838,8 +840,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