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

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: Fix mouse up event sender not modifying modifiers Created 4 years 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 0bc9e4691ea706b2f23bd14e99489dcd11bec14b..e22dca12e2a044951ccdbb96ce2dd8f800e19f84 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -127,7 +127,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;
@@ -1404,9 +1404,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;
@@ -1414,7 +1414,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