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

Unified Diff: content/browser/renderer_host/web_input_event_aurax11.cc

Issue 12223110: aura: Populate and use the newly added acceleration ratio fields in wheel-events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/web_input_event_aurax11.cc
diff --git a/content/browser/renderer_host/web_input_event_aurax11.cc b/content/browser/renderer_host/web_input_event_aurax11.cc
index 122c3457cb21598eb0c1d9492dff7987a500b064..8e4d19307a16bc581a92e360c93ca212e78b13cc 100644
--- a/content/browser/renderer_host/web_input_event_aurax11.cc
+++ b/content/browser/renderer_host/web_input_event_aurax11.cc
@@ -145,9 +145,17 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent(
webkit_event.timeStampSeconds = event->time_stamp().InSecondsF();
webkit_event.hasPreciseScrollingDeltas = true;
webkit_event.deltaX = event->x_offset();
+ if (event->x_offset_ordinal() != 0.f && event->x_offset() != 0.f) {
+ webkit_event.accelerationRatioX =
+ event->x_offset_ordinal() / event->x_offset();
+ }
webkit_event.wheelTicksX = webkit_event.deltaX / kPixelsPerTick;
webkit_event.deltaY = event->y_offset();
webkit_event.wheelTicksY = webkit_event.deltaY / kPixelsPerTick;
+ if (event->y_offset_ordinal() != 0.f && event->y_offset() != 0.f) {
+ webkit_event.accelerationRatioY =
+ event->y_offset_ordinal() / event->y_offset();
+ }
return webkit_event;
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698