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 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2085 HitTestResult result(windowPoint); | 2085 HitTestResult result(windowPoint); |
| 2086 renderView->hitTest(request, result); | 2086 renderView->hitTest(request, result); |
| 2087 return result.scrollbar(); | 2087 return result.scrollbar(); |
| 2088 } | 2088 } |
| 2089 | 2089 |
| 2090 return false; | 2090 return false; |
| 2091 } | 2091 } |
| 2092 | 2092 |
| 2093 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& re sult, const PlatformWheelEvent& event) const | 2093 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& re sult, const PlatformWheelEvent& event) const |
| 2094 { | 2094 { |
| 2095 #if OS(UNIX) && !OS(MACOSX) | 2095 #if OS(WINDOWS) || OS(MACOSX) |
|
abarth-chromium
2013/09/09 17:26:24
Should Android do this too?
| |
| 2096 UNUSED_PARAM(result); | |
| 2097 UNUSED_PARAM(event); | |
| 2098 return false; | |
| 2099 #else | |
| 2096 // GTK+ must scroll horizontally if the mouse pointer is on top of the | 2100 // GTK+ must scroll horizontally if the mouse pointer is on top of the |
| 2097 // horizontal scrollbar while scrolling with the wheel. | 2101 // horizontal scrollbar while scrolling with the wheel. |
| 2098 // This code comes from gtk/EventHandlerGtk.cpp. | 2102 // This code comes from gtk/EventHandlerGtk.cpp. |
| 2099 return !event.hasPreciseScrollingDeltas() && result.scrollbar() && result.sc rollbar()->orientation() == HorizontalScrollbar; | 2103 return !event.hasPreciseScrollingDeltas() && result.scrollbar() && result.sc rollbar()->orientation() == HorizontalScrollbar; |
| 2100 #else | |
| 2101 UNUSED_PARAM(result); | |
| 2102 UNUSED_PARAM(event); | |
| 2103 return false; | |
| 2104 #endif | 2104 #endif |
| 2105 } | 2105 } |
| 2106 | 2106 |
| 2107 bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e) | 2107 bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e) |
| 2108 { | 2108 { |
| 2109 #define RETURN_WHEEL_EVENT_HANDLED() \ | 2109 #define RETURN_WHEEL_EVENT_HANDLED() \ |
| 2110 { \ | 2110 { \ |
| 2111 setFrameWasScrolledByUser(); \ | 2111 setFrameWasScrolledByUser(); \ |
| 2112 return true; \ | 2112 return true; \ |
| 2113 } | 2113 } |
| (...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3847 unsigned EventHandler::accessKeyModifiers() | 3847 unsigned EventHandler::accessKeyModifiers() |
| 3848 { | 3848 { |
| 3849 #if OS(MACOSX) | 3849 #if OS(MACOSX) |
| 3850 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3850 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
| 3851 #else | 3851 #else |
| 3852 return PlatformEvent::AltKey; | 3852 return PlatformEvent::AltKey; |
| 3853 #endif | 3853 #endif |
| 3854 } | 3854 } |
| 3855 | 3855 |
| 3856 } // namespace WebCore | 3856 } // namespace WebCore |
| OLD | NEW |