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; |
} |