summaryrefslogtreecommitdiffstats
path: root/webkit/glue/event_conversion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/event_conversion.cc')
-rw-r--r--webkit/glue/event_conversion.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc
index 39cdc90..548bfa5 100644
--- a/webkit/glue/event_conversion.cc
+++ b/webkit/glue/event_conversion.cc
@@ -123,10 +123,11 @@ MakePlatformWheelEvent::MakePlatformWheelEvent(Widget* widget,
const WebMouseWheelEvent& e) {
m_position = widget->convertFromContainingWindow(IntPoint(e.x, e.y));
m_globalPosition = IntPoint(e.global_x, e.global_y);
- m_deltaX = static_cast<float>(e.delta_x);
- m_deltaY = static_cast<float>(e.delta_y);
+ m_deltaX = e.delta_x;
+ m_deltaY = e.delta_y;
m_isAccepted = false;
- m_granularity = ScrollByLineWheelEvent;
+ m_granularity = e.scroll_by_page ?
+ ScrollByPageWheelEvent : ScrollByLineWheelEvent;
m_shiftKey = (e.modifiers & WebInputEvent::SHIFT_KEY) != 0;
m_ctrlKey = (e.modifiers & WebInputEvent::CTRL_KEY) != 0;
m_altKey = (e.modifiers & WebInputEvent::ALT_KEY) != 0;