| 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 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 RETURN_WHEEL_EVENT_HANDLED(); | 2198 RETURN_WHEEL_EVENT_HANDLED(); |
| 2199 | 2199 |
| 2200 #undef RETURN_WHEEL_EVENT_HANDLED | 2200 #undef RETURN_WHEEL_EVENT_HANDLED |
| 2201 } | 2201 } |
| 2202 | 2202 |
| 2203 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
ent) | 2203 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
ent) |
| 2204 { | 2204 { |
| 2205 if (!startNode || !wheelEvent) | 2205 if (!startNode || !wheelEvent) |
| 2206 return; | 2206 return; |
| 2207 | 2207 |
| 2208 // Ctrl + scrollwheel is reserved for triggering zoom in/out actions in Chro
mium. |
| 2209 if (wheelEvent->ctrlKey()) |
| 2210 return; |
| 2211 |
| 2208 Node* stopNode = m_previousWheelScrolledNode.get(); | 2212 Node* stopNode = m_previousWheelScrolledNode.get(); |
| 2209 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve
nt->deltaMode()); | 2213 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve
nt->deltaMode()); |
| 2210 | 2214 |
| 2211 // Break up into two scrolls if we need to. Diagonal movement on | 2215 // Break up into two scrolls if we need to. Diagonal movement on |
| 2212 // a MacBook pro is an example of a 2-dimensional mouse wheel event (where b
oth deltaX and deltaY can be set). | 2216 // a MacBook pro is an example of a 2-dimensional mouse wheel event (where b
oth deltaX and deltaY can be set). |
| 2213 if (scroll(ScrollRight, granularity, startNode, &stopNode, wheelEvent->delta
X(), roundedIntPoint(wheelEvent->absoluteLocation()))) | 2217 if (scroll(ScrollRight, granularity, startNode, &stopNode, wheelEvent->delta
X(), roundedIntPoint(wheelEvent->absoluteLocation()))) |
| 2214 wheelEvent->setDefaultHandled(); | 2218 wheelEvent->setDefaultHandled(); |
| 2215 | 2219 |
| 2216 if (scroll(ScrollDown, granularity, startNode, &stopNode, wheelEvent->deltaY
(), roundedIntPoint(wheelEvent->absoluteLocation()))) | 2220 if (scroll(ScrollDown, granularity, startNode, &stopNode, wheelEvent->deltaY
(), roundedIntPoint(wheelEvent->absoluteLocation()))) |
| 2217 wheelEvent->setDefaultHandled(); | 2221 wheelEvent->setDefaultHandled(); |
| (...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4014 unsigned EventHandler::accessKeyModifiers() | 4018 unsigned EventHandler::accessKeyModifiers() |
| 4015 { | 4019 { |
| 4016 #if OS(MACOSX) | 4020 #if OS(MACOSX) |
| 4017 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4021 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 4018 #else | 4022 #else |
| 4019 return PlatformEvent::AltKey; | 4023 return PlatformEvent::AltKey; |
| 4020 #endif | 4024 #endif |
| 4021 } | 4025 } |
| 4022 | 4026 |
| 4023 } // namespace WebCore | 4027 } // namespace WebCore |
| OLD | NEW |