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 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 } | 2029 } |
2030 | 2030 |
2031 WebInputEventResult EventHandler::handleGestureShowPress() | 2031 WebInputEventResult EventHandler::handleGestureShowPress() |
2032 { | 2032 { |
2033 m_lastShowPressTimestamp = WTF::monotonicallyIncreasingTime(); | 2033 m_lastShowPressTimestamp = WTF::monotonicallyIncreasingTime(); |
2034 | 2034 |
2035 FrameView* view = m_frame->view(); | 2035 FrameView* view = m_frame->view(); |
2036 if (!view) | 2036 if (!view) |
2037 return WebInputEventResult::NotHandled; | 2037 return WebInputEventResult::NotHandled; |
2038 if (ScrollAnimatorBase* scrollAnimator = view->existingScrollAnimator()) | 2038 if (ScrollAnimatorBase* scrollAnimator = view->existingScrollAnimator()) |
2039 scrollAnimator->cancelAnimations(); | 2039 scrollAnimator->cancelAnimation(); |
2040 const FrameView::ScrollableAreaSet* areas = view->scrollableAreas(); | 2040 const FrameView::ScrollableAreaSet* areas = view->scrollableAreas(); |
2041 if (!areas) | 2041 if (!areas) |
2042 return WebInputEventResult::NotHandled; | 2042 return WebInputEventResult::NotHandled; |
2043 for (const ScrollableArea* scrollableArea : *areas) { | 2043 for (const ScrollableArea* scrollableArea : *areas) { |
2044 ScrollAnimatorBase* animator = scrollableArea->existingScrollAnimator(); | 2044 ScrollAnimatorBase* animator = scrollableArea->existingScrollAnimator(); |
2045 if (animator) | 2045 if (animator) |
2046 animator->cancelAnimations(); | 2046 animator->cancelAnimation(); |
2047 } | 2047 } |
2048 return WebInputEventResult::NotHandled; | 2048 return WebInputEventResult::NotHandled; |
2049 } | 2049 } |
2050 | 2050 |
2051 WebInputEventResult EventHandler::handleGestureEvent(const PlatformGestureEvent&
gestureEvent) | 2051 WebInputEventResult EventHandler::handleGestureEvent(const PlatformGestureEvent&
gestureEvent) |
2052 { | 2052 { |
2053 // Propagation to inner frames is handled below this function. | 2053 // Propagation to inner frames is handled below this function. |
2054 ASSERT(m_frame == m_frame->localFrameRoot()); | 2054 ASSERT(m_frame == m_frame->localFrameRoot()); |
2055 | 2055 |
2056 // Scrolling-related gesture events invoke EventHandler recursively for each
frame down | 2056 // Scrolling-related gesture events invoke EventHandler recursively for each
frame down |
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4141 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 4141 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
4142 { | 4142 { |
4143 #if OS(MACOSX) | 4143 #if OS(MACOSX) |
4144 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 4144 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
4145 #else | 4145 #else |
4146 return PlatformEvent::AltKey; | 4146 return PlatformEvent::AltKey; |
4147 #endif | 4147 #endif |
4148 } | 4148 } |
4149 | 4149 |
4150 } // namespace blink | 4150 } // namespace blink |
OLD | NEW |