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

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_win.cc

Issue 1574013002: Remove the % WHEEL_DELTA check in WebMouseWheelEventBuilder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot rbyers nit Created 4 years, 11 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 | « no previous file | content/browser/renderer_host/input/web_input_event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/web_input_event_builders_win.cc
diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.cc b/content/browser/renderer_host/input/web_input_event_builders_win.cc
index 0b964e231e7b1000e075cfcf017b1d0c426dea75..33701fb1ab2e8fa70efcdba0cf28122d66912870 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_win.cc
+++ b/content/browser/renderer_host/input/web_input_event_builders_win.cc
@@ -288,15 +288,10 @@ WebMouseWheelEvent WebMouseWheelEventBuilder::Build(HWND hwnd,
result.globalX = static_cast<short>(LOWORD(lparam));
result.globalY = static_cast<short>(HIWORD(lparam));
- short wheel_delta_wparam = GET_WHEEL_DELTA_WPARAM(wparam);
- // The current heuristic for setting hasPreciseScrollingDelta is whether or
- // not wheel_delta is an exact multiple of WHEEL_DELTA. Note that high
- // precision trackpads can occasionally generate deltas that are an exact
- // multiple of WHEEL_DELTA.
- if (wheel_delta_wparam % WHEEL_DELTA != 0)
- result.hasPreciseScrollingDeltas = true;
-
- wheel_delta = static_cast<float>(wheel_delta_wparam);
+ // Currently we leave hasPreciseScrollingDeltas false, even for trackpad
+ // scrolls that generate WM_MOUSEWHEEL, since we don't have a good way to
+ // distinguish these from real mouse wheels (crbug.com/545234).
+ wheel_delta = static_cast<float>(GET_WHEEL_DELTA_WPARAM(wparam));
if (message == WM_MOUSEHWHEEL) {
horizontal_scroll = true;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/web_input_event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698