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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 23034006: WheelEvent's deltaX/deltaY should report real amount of pixels scrolled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No Change Created 7 years, 4 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 | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebInputEventConversion.cpp
diff --git a/Source/web/WebInputEventConversion.cpp b/Source/web/WebInputEventConversion.cpp
index 775039f753d14abbaf25660f3d99dd5e2a312805..fdb2ca3407bf7599d95ccdc5951bba90227f729d 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -582,10 +582,10 @@ WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const
return;
type = WebInputEvent::MouseWheel;
updateWebMouseEventFromWebCoreMouseEvent(event, *widget, *renderObject, *this);
- deltaX = static_cast<float>(event.rawDeltaX());
- deltaY = static_cast<float>(event.rawDeltaY());
- wheelTicksX = static_cast<float>(event.wheelDeltaX()) / WheelEvent::TickMultiplier;
- wheelTicksY = static_cast<float>(event.wheelDeltaY()) / WheelEvent::TickMultiplier;
+ deltaX = -event.deltaX();
+ deltaY = -event.deltaY();
+ wheelTicksX = event.ticksX();
+ wheelTicksY = event.ticksY();
scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE;
}
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698