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 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 if (isOverWidget && target && target->isWidget()) { | 2182 if (isOverWidget && target && target->isWidget()) { |
2183 Widget* widget = toRenderWidget(target)->widget(); | 2183 Widget* widget = toRenderWidget(target)->widget(); |
2184 if (widget && passWheelEventToWidget(e, widget)) | 2184 if (widget && passWheelEventToWidget(e, widget)) |
2185 RETURN_WHEEL_EVENT_HANDLED(); | 2185 RETURN_WHEEL_EVENT_HANDLED(); |
2186 } | 2186 } |
2187 | 2187 |
2188 if (node && !node->dispatchWheelEvent(event)) | 2188 if (node && !node->dispatchWheelEvent(event)) |
2189 RETURN_WHEEL_EVENT_HANDLED(); | 2189 RETURN_WHEEL_EVENT_HANDLED(); |
2190 } | 2190 } |
2191 | 2191 |
| 2192 // Ctrl + scrollwheel is reserved for triggering zoom in/out actions in Chro
mium. |
| 2193 // When Ctrl is pressed and the event was not canceled by JavaScript code, |
| 2194 // return false to notify the caller that the scrollwheel event was not canc
eled. |
| 2195 if (e.ctrlKey()) |
| 2196 return false; |
| 2197 |
2192 | 2198 |
2193 // We do another check on the frame view because the event handler can run J
S which results in the frame getting destroyed. | 2199 // We do another check on the frame view because the event handler can run J
S which results in the frame getting destroyed. |
2194 view = m_frame->view(); | 2200 view = m_frame->view(); |
2195 if (!view || !view->wheelEvent(event)) | 2201 if (!view || !view->wheelEvent(event)) |
2196 return false; | 2202 return false; |
2197 | 2203 |
2198 RETURN_WHEEL_EVENT_HANDLED(); | 2204 RETURN_WHEEL_EVENT_HANDLED(); |
2199 | 2205 |
2200 #undef RETURN_WHEEL_EVENT_HANDLED | 2206 #undef RETURN_WHEEL_EVENT_HANDLED |
2201 } | 2207 } |
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4016 unsigned EventHandler::accessKeyModifiers() | 4022 unsigned EventHandler::accessKeyModifiers() |
4017 { | 4023 { |
4018 #if OS(MACOSX) | 4024 #if OS(MACOSX) |
4019 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4025 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
4020 #else | 4026 #else |
4021 return PlatformEvent::AltKey; | 4027 return PlatformEvent::AltKey; |
4022 #endif | 4028 #endif |
4023 } | 4029 } |
4024 | 4030 |
4025 } // namespace WebCore | 4031 } // namespace WebCore |
OLD | NEW |