OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2184 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
ent) | 2184 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
ent) |
2185 { | 2185 { |
2186 if (!startNode || !wheelEvent) | 2186 if (!startNode || !wheelEvent) |
2187 return; | 2187 return; |
2188 | 2188 |
2189 Node* stopNode = m_previousWheelScrolledNode.get(); | 2189 Node* stopNode = m_previousWheelScrolledNode.get(); |
2190 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve
nt->deltaMode()); | 2190 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve
nt->deltaMode()); |
2191 | 2191 |
2192 // Break up into two scrolls if we need to. Diagonal movement on | 2192 // Break up into two scrolls if we need to. Diagonal movement on |
2193 // a MacBook pro is an example of a 2-dimensional mouse wheel event (where b
oth deltaX and deltaY can be set). | 2193 // a MacBook pro is an example of a 2-dimensional mouse wheel event (where b
oth deltaX and deltaY can be set). |
2194 if (scrollNode(wheelEvent->rawDeltaX(), granularity, ScrollLeft, ScrollRight
, startNode, &stopNode)) | 2194 if (scrollNode(wheelEvent->deltaX(), granularity, ScrollRight, ScrollLeft, s
tartNode, &stopNode)) |
2195 wheelEvent->setDefaultHandled(); | 2195 wheelEvent->setDefaultHandled(); |
2196 | 2196 |
2197 if (scrollNode(wheelEvent->rawDeltaY(), granularity, ScrollUp, ScrollDown, s
tartNode, &stopNode)) | 2197 if (scrollNode(wheelEvent->deltaY(), granularity, ScrollDown, ScrollUp, star
tNode, &stopNode)) |
2198 wheelEvent->setDefaultHandled(); | 2198 wheelEvent->setDefaultHandled(); |
2199 | 2199 |
2200 if (!m_latchedWheelEventNode) | 2200 if (!m_latchedWheelEventNode) |
2201 m_previousWheelScrolledNode = stopNode; | 2201 m_previousWheelScrolledNode = stopNode; |
2202 } | 2202 } |
2203 | 2203 |
2204 bool EventHandler::handleGestureTapDown() | 2204 bool EventHandler::handleGestureTapDown() |
2205 { | 2205 { |
2206 FrameView* view = m_frame->view(); | 2206 FrameView* view = m_frame->view(); |
2207 if (!view) | 2207 if (!view) |
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3844 unsigned EventHandler::accessKeyModifiers() | 3844 unsigned EventHandler::accessKeyModifiers() |
3845 { | 3845 { |
3846 #if OS(DARWIN) | 3846 #if OS(DARWIN) |
3847 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3847 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3848 #else | 3848 #else |
3849 return PlatformEvent::AltKey; | 3849 return PlatformEvent::AltKey; |
3850 #endif | 3850 #endif |
3851 } | 3851 } |
3852 | 3852 |
3853 } // namespace WebCore | 3853 } // namespace WebCore |
OLD | NEW |