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

Unified Diff: Source/web/WebInputEventConversion.cpp

Issue 22859012: Add support for DOM Level 3 WheelEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename prefixedType() to legacyType() 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/svg/SVGElementInstance.idl ('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 c2735f78667df09eddc47fafa6d0d69b09756252..775039f753d14abbaf25660f3d99dd5e2a312805 100644
--- a/Source/web/WebInputEventConversion.cpp
+++ b/Source/web/WebInputEventConversion.cpp
@@ -578,15 +578,14 @@ WebMouseEventBuilder::WebMouseEventBuilder(const WebCore::Widget* widget, const
WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const WebCore::RenderObject* renderObject, const WheelEvent& event)
{
- if (event.type() != eventNames().mousewheelEvent)
+ if (event.type() != eventNames().wheelEvent && event.type() != eventNames().mousewheelEvent)
return;
type = WebInputEvent::MouseWheel;
updateWebMouseEventFromWebCoreMouseEvent(event, *widget, *renderObject, *this);
deltaX = static_cast<float>(event.rawDeltaX());
deltaY = static_cast<float>(event.rawDeltaY());
- // The 120 is from WheelEvent::initWheelEvent().
- wheelTicksX = static_cast<float>(event.wheelDeltaX()) / 120;
- wheelTicksY = static_cast<float>(event.wheelDeltaY()) / 120;
+ wheelTicksX = static_cast<float>(event.wheelDeltaX()) / WheelEvent::TickMultiplier;
+ wheelTicksY = static_cast<float>(event.wheelDeltaY()) / WheelEvent::TickMultiplier;
scrollByPage = event.deltaMode() == WheelEvent::DOM_DELTA_PAGE;
}
« no previous file with comments | « Source/core/svg/SVGElementInstance.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698