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