Chromium Code Reviews| 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 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1838 } | 1838 } |
| 1839 | 1839 |
| 1840 return WebInputEventResult::NotHandled; | 1840 return WebInputEventResult::NotHandled; |
| 1841 } | 1841 } |
| 1842 | 1842 |
| 1843 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv ent) | 1843 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv ent) |
| 1844 { | 1844 { |
| 1845 if (!startNode || !wheelEvent) | 1845 if (!startNode || !wheelEvent) |
| 1846 return; | 1846 return; |
| 1847 | 1847 |
| 1848 Settings* settings = m_frame->settings(); | |
| 1849 if (settings && settings->wheelGesturesEnabled()) | |
|
bokan
2016/03/30 19:01:50
Is the idea that we first dispatch the wheel event
dtapuska
2016/03/30 19:15:45
Yes that is correct; previously it was conflating
| |
| 1850 return; | |
| 1851 | |
| 1848 // When the wheelEvent do not scroll, we trigger zoom in/out instead. | 1852 // When the wheelEvent do not scroll, we trigger zoom in/out instead. |
| 1849 if (!wheelEvent->canScroll()) | 1853 if (!wheelEvent->canScroll()) |
| 1850 return; | 1854 return; |
| 1851 | 1855 |
| 1852 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve nt); | 1856 ScrollGranularity granularity = wheelGranularityToScrollGranularity(wheelEve nt); |
| 1853 Node* node = nullptr; | 1857 Node* node = nullptr; |
| 1854 | 1858 |
| 1855 // Diagonal movement on a MacBook pro is an example of a 2-dimensional | 1859 // Diagonal movement on a MacBook pro is an example of a 2-dimensional |
| 1856 // mouse wheel event (where both deltaX and deltaY can be set). | 1860 // mouse wheel event (where both deltaX and deltaY can be set). |
| 1857 FloatSize delta; | 1861 FloatSize delta; |
| (...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3979 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 3983 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 3980 { | 3984 { |
| 3981 #if OS(MACOSX) | 3985 #if OS(MACOSX) |
| 3982 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); | 3986 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); |
| 3983 #else | 3987 #else |
| 3984 return PlatformEvent::AltKey; | 3988 return PlatformEvent::AltKey; |
| 3985 #endif | 3989 #endif |
| 3986 } | 3990 } |
| 3987 | 3991 |
| 3988 } // namespace blink | 3992 } // namespace blink |
| OLD | NEW |