| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef EventHandler_h | 26 #ifndef EventHandler_h |
| 27 #define EventHandler_h | 27 #define EventHandler_h |
| 28 | 28 |
| 29 #include "core/editing/TextGranularity.h" | 29 #include "core/editing/TextGranularity.h" |
| 30 #include "core/events/TextEventInputType.h" | 30 #include "core/events/TextEventInputType.h" |
| 31 #include "core/page/DragActions.h" | 31 #include "core/page/DragActions.h" |
| 32 #include "core/page/EventWithHitTestResults.h" |
| 32 #include "core/page/FocusType.h" | 33 #include "core/page/FocusType.h" |
| 33 #include "core/rendering/HitTestRequest.h" | 34 #include "core/rendering/HitTestRequest.h" |
| 34 #include "core/rendering/style/RenderStyleConstants.h" | 35 #include "core/rendering/style/RenderStyleConstants.h" |
| 35 #include "platform/Cursor.h" | 36 #include "platform/Cursor.h" |
| 36 #include "platform/PlatformMouseEvent.h" | 37 #include "platform/PlatformMouseEvent.h" |
| 37 #include "platform/Timer.h" | 38 #include "platform/Timer.h" |
| 38 #include "platform/UserGestureIndicator.h" | 39 #include "platform/UserGestureIndicator.h" |
| 39 #include "platform/geometry/LayoutPoint.h" | 40 #include "platform/geometry/LayoutPoint.h" |
| 40 #include "platform/heap/Handle.h" | 41 #include "platform/heap/Handle.h" |
| 41 #include "platform/scroll/ScrollTypes.h" | 42 #include "platform/scroll/ScrollTypes.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 class RenderObject; | 75 class RenderObject; |
| 75 class RenderWidget; | 76 class RenderWidget; |
| 76 class ScrollableArea; | 77 class ScrollableArea; |
| 77 class Scrollbar; | 78 class Scrollbar; |
| 78 class TextEvent; | 79 class TextEvent; |
| 79 class TouchEvent; | 80 class TouchEvent; |
| 80 class VisibleSelection; | 81 class VisibleSelection; |
| 81 class WheelEvent; | 82 class WheelEvent; |
| 82 class Widget; | 83 class Widget; |
| 83 | 84 |
| 84 typedef EventWithHitTestResults<PlatformGestureEvent> GestureEventWithHitTestRes
ults; | |
| 85 typedef EventWithHitTestResults<PlatformMouseEvent> MouseEventWithHitTestResults
; | |
| 86 | |
| 87 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili
ngWhitespace }; | 85 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili
ngWhitespace }; |
| 88 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; | 86 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; |
| 89 | 87 |
| 90 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler>
{ | 88 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler>
{ |
| 91 WTF_MAKE_NONCOPYABLE(EventHandler); | 89 WTF_MAKE_NONCOPYABLE(EventHandler); |
| 92 public: | 90 public: |
| 93 explicit EventHandler(LocalFrame*); | 91 explicit EventHandler(LocalFrame*); |
| 94 ~EventHandler(); | 92 ~EventHandler(); |
| 95 void trace(Visitor*); | 93 void trace(Visitor*); |
| 96 | 94 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 138 |
| 141 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 139 bool handleMouseMoveEvent(const PlatformMouseEvent&); |
| 142 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 140 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
| 143 | 141 |
| 144 bool handleMousePressEvent(const PlatformMouseEvent&); | 142 bool handleMousePressEvent(const PlatformMouseEvent&); |
| 145 bool handleMouseReleaseEvent(const PlatformMouseEvent&); | 143 bool handleMouseReleaseEvent(const PlatformMouseEvent&); |
| 146 bool handleWheelEvent(const PlatformWheelEvent&); | 144 bool handleWheelEvent(const PlatformWheelEvent&); |
| 147 void defaultWheelEventHandler(Node*, WheelEvent*); | 145 void defaultWheelEventHandler(Node*, WheelEvent*); |
| 148 | 146 |
| 149 // Called on the local root frame exactly once per gesture event. | 147 // Called on the local root frame exactly once per gesture event. |
| 150 bool handleGestureEvent(const PlatformGestureEvent&); | 148 bool handleGestureEvent(const GestureEventWithHitTestResults&); |
| 151 | 149 |
| 152 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme
nt and updating | 150 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme
nt and updating |
| 153 // hover/active state across all frames if necessary. This should be called
at most once | 151 // hover/active state across all frames if necessary. This should be called
at most once |
| 154 // per gesture event, and called on the local root frame. | 152 // per gesture event, and called on the local root frame. |
| 155 // Note: This is similar to (the less clearly named) prepareMouseEvent. | 153 // Note: This is similar to (the less clearly named) prepareMouseEvent. |
| 156 // FIXME: Remove readOnly param when there is only ever a single call to thi
s. | 154 // FIXME: Remove readOnly param when there is only ever a single call to thi
s. |
| 157 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent
&, bool readOnly = false); | 155 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent
&, bool readOnly = false); |
| 158 | 156 |
| 159 // Handle the provided non-scroll gesture event. Should be called only on th
e inner frame. | 157 // Handle the provided non-scroll gesture event. Should be called only on th
e inner frame. |
| 160 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); | 158 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 bool m_longTapShouldInvokeContextMenu; | 400 bool m_longTapShouldInvokeContextMenu; |
| 403 | 401 |
| 404 Timer<EventHandler> m_activeIntervalTimer; | 402 Timer<EventHandler> m_activeIntervalTimer; |
| 405 double m_lastShowPressTimestamp; | 403 double m_lastShowPressTimestamp; |
| 406 RefPtrWillBeMember<Element> m_lastDeferredTapElement; | 404 RefPtrWillBeMember<Element> m_lastDeferredTapElement; |
| 407 }; | 405 }; |
| 408 | 406 |
| 409 } // namespace blink | 407 } // namespace blink |
| 410 | 408 |
| 411 #endif // EventHandler_h | 409 #endif // EventHandler_h |
| OLD | NEW |