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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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 e37d4994665e933c5ed8a24cb7c84d5588144685..fcd5b33aa14e40e0a52a464a801bac8369433f1f 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -128,7 +128,7 @@ bool ShouldBoostFling(const gfx::Vector2dF& current_fling_velocity,
WebGestureEvent ObtainGestureScrollBegin(const WebGestureEvent& event) {
WebGestureEvent scroll_begin_event = event;
- scroll_begin_event.type = WebInputEvent::GestureScrollBegin;
+ scroll_begin_event.setType(WebInputEvent::GestureScrollBegin);
scroll_begin_event.data.scrollBegin.deltaXHint = 0;
scroll_begin_event.data.scrollBegin.deltaYHint = 0;
return scroll_begin_event;
@@ -1405,9 +1405,9 @@ bool InputHandlerProxy::TouchpadFlingScroll(
break;
case cc::EventListenerProperties::kPassive:
case cc::EventListenerProperties::kNone: {
- WebMouseWheelEvent synthetic_wheel;
- synthetic_wheel.type = WebInputEvent::MouseWheel;
- synthetic_wheel.timeStampSeconds = InSecondsF(base::TimeTicks::Now());
+ WebMouseWheelEvent synthetic_wheel(WebInputEvent::MouseWheel,
+ fling_parameters_.modifiers,
+ InSecondsF(base::TimeTicks::Now()));
synthetic_wheel.deltaX = increment.width;
synthetic_wheel.deltaY = increment.height;
synthetic_wheel.hasPreciseScrollingDeltas = true;
@@ -1415,7 +1415,6 @@ bool InputHandlerProxy::TouchpadFlingScroll(
synthetic_wheel.y = fling_parameters_.point.y;
synthetic_wheel.globalX = fling_parameters_.globalPoint.x;
synthetic_wheel.globalY = fling_parameters_.globalPoint.y;
- synthetic_wheel.modifiers = fling_parameters_.modifiers;
disposition = ScrollByMouseWheel(synthetic_wheel, properties);

Powered by Google App Engine
This is Rietveld 408576698