Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 168493002: Do not handle mouse wheel events when Ctrl is pressed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 + mousewheel should not be handled, because it is reserved for zoom
eae 2014/02/18 16:20:26 This comment is misleading. Does it mean that this
2193 if (e.ctrlKey())
2194 return false;
2195
2192 2196
2193 // We do another check on the frame view because the event handler can run J S which results in the frame getting destroyed. 2197 // 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(); 2198 view = m_frame->view();
2195 if (!view || !view->wheelEvent(event)) 2199 if (!view || !view->wheelEvent(event))
2196 return false; 2200 return false;
2197 2201
2198 RETURN_WHEEL_EVENT_HANDLED(); 2202 RETURN_WHEEL_EVENT_HANDLED();
2199 2203
2200 #undef RETURN_WHEEL_EVENT_HANDLED 2204 #undef RETURN_WHEEL_EVENT_HANDLED
2201 } 2205 }
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after
4016 unsigned EventHandler::accessKeyModifiers() 4020 unsigned EventHandler::accessKeyModifiers()
4017 { 4021 {
4018 #if OS(MACOSX) 4022 #if OS(MACOSX)
4019 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4023 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4020 #else 4024 #else
4021 return PlatformEvent::AltKey; 4025 return PlatformEvent::AltKey;
4022 #endif 4026 #endif
4023 } 4027 }
4024 4028
4025 } // namespace WebCore 4029 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698