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

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

Issue 2943133002: Async Wheel Event with only the first one cancellable behind a flag. (Closed)
Patch Set: failing tests fixed. 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/blink_event_util.cc
diff --git a/ui/events/blink/blink_event_util.cc b/ui/events/blink/blink_event_util.cc
index 7dfbe2912ecc587df6f6949babb5096d4911ac07..c5df11d39c4b1e3befcb117ccb6b4927f18cfa14 100644
--- a/ui/events/blink/blink_event_util.cc
+++ b/ui/events/blink/blink_event_util.cc
@@ -283,6 +283,7 @@ void Coalesce(const WebMouseWheelEvent& event_to_coalesce,
float old_wheelTicksY = event->wheel_ticks_y;
float old_movementX = event->movement_x;
float old_movementY = event->movement_y;
+ WebInputEvent::DispatchType old_dispatch_type = event->dispatch_type;
*event = event_to_coalesce;
event->delta_x += old_deltaX;
event->delta_y += old_deltaY;
@@ -294,6 +295,8 @@ void Coalesce(const WebMouseWheelEvent& event_to_coalesce,
GetAccelerationRatio(event->delta_x, unaccelerated_x);
event->acceleration_ratio_y =
GetAccelerationRatio(event->delta_y, unaccelerated_y);
+ event->dispatch_type =
+ MergeDispatchTypes(old_dispatch_type, event_to_coalesce.dispatch_type);
}
bool CanCoalesce(const WebTouchEvent& event_to_coalesce,

Powered by Google App Engine
This is Rietveld 408576698