| 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 30 matching lines...) Expand all Loading... |
| 72 class RenderLayer; | 73 class RenderLayer; |
| 73 class RenderLayerScrollableArea; | 74 class RenderLayerScrollableArea; |
| 74 class RenderObject; | 75 class RenderObject; |
| 75 class ScrollableArea; | 76 class ScrollableArea; |
| 76 class Scrollbar; | 77 class Scrollbar; |
| 77 class TextEvent; | 78 class TextEvent; |
| 78 class VisibleSelection; | 79 class VisibleSelection; |
| 79 class WheelEvent; | 80 class WheelEvent; |
| 80 class Widget; | 81 class Widget; |
| 81 | 82 |
| 82 typedef EventWithHitTestResults<PlatformGestureEvent> GestureEventWithHitTestRes
ults; | |
| 83 typedef EventWithHitTestResults<PlatformMouseEvent> MouseEventWithHitTestResults
; | |
| 84 | |
| 85 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili
ngWhitespace }; | 83 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili
ngWhitespace }; |
| 86 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; | 84 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; |
| 87 | 85 |
| 88 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler>
{ | 86 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler>
{ |
| 89 WTF_MAKE_NONCOPYABLE(EventHandler); | 87 WTF_MAKE_NONCOPYABLE(EventHandler); |
| 90 public: | 88 public: |
| 91 explicit EventHandler(LocalFrame*); | 89 explicit EventHandler(LocalFrame*); |
| 92 ~EventHandler(); | 90 ~EventHandler(); |
| 93 void trace(Visitor*); | 91 void trace(Visitor*); |
| 94 | 92 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 137 bool handleMouseMoveEvent(const PlatformMouseEvent&); |
| 140 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 138 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
| 141 | 139 |
| 142 bool handleMousePressEvent(const PlatformMouseEvent&); | 140 bool handleMousePressEvent(const PlatformMouseEvent&); |
| 143 bool handleMouseReleaseEvent(const PlatformMouseEvent&); | 141 bool handleMouseReleaseEvent(const PlatformMouseEvent&); |
| 144 bool handleWheelEvent(const PlatformWheelEvent&); | 142 bool handleWheelEvent(const PlatformWheelEvent&); |
| 145 void defaultWheelEventHandler(Node*, WheelEvent*); | 143 void defaultWheelEventHandler(Node*, WheelEvent*); |
| 146 | 144 |
| 147 // Called on the local root frame exactly once per gesture event. | 145 // Called on the local root frame exactly once per gesture event. |
| 148 bool handleGestureEvent(const PlatformGestureEvent&); | 146 bool handleGestureEvent(const PlatformGestureEvent&); |
| 147 bool handleGestureEvent(const GestureEventWithHitTestResults&); |
| 149 | 148 |
| 150 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme
nt and updating | 149 // Hit-test the provided (non-scroll) gesture event, applying touch-adjustme
nt and updating |
| 151 // hover/active state across all frames if necessary. This should be called
at most once | 150 // hover/active state across all frames if necessary. This should be called
at most once |
| 152 // per gesture event, and called on the local root frame. | 151 // per gesture event, and called on the local root frame. |
| 153 // Note: This is similar to (the less clearly named) prepareMouseEvent. | 152 // Note: This is similar to (the less clearly named) prepareMouseEvent. |
| 154 // FIXME: Remove readOnly param when there is only ever a single call to thi
s. | 153 // FIXME: Remove readOnly param when there is only ever a single call to thi
s. |
| 155 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent
&, bool readOnly = false); | 154 GestureEventWithHitTestResults targetGestureEvent(const PlatformGestureEvent
&, bool readOnly = false); |
| 156 | 155 |
| 157 // Handle the provided non-scroll gesture event. Should be called only on th
e inner frame. | 156 // Handle the provided non-scroll gesture event. Should be called only on th
e inner frame. |
| 158 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); | 157 bool handleGestureEventInFrame(const GestureEventWithHitTestResults&); |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 bool m_longTapShouldInvokeContextMenu; | 403 bool m_longTapShouldInvokeContextMenu; |
| 405 | 404 |
| 406 Timer<EventHandler> m_activeIntervalTimer; | 405 Timer<EventHandler> m_activeIntervalTimer; |
| 407 double m_lastShowPressTimestamp; | 406 double m_lastShowPressTimestamp; |
| 408 RefPtrWillBeMember<Element> m_lastDeferredTapElement; | 407 RefPtrWillBeMember<Element> m_lastDeferredTapElement; |
| 409 }; | 408 }; |
| 410 | 409 |
| 411 } // namespace blink | 410 } // namespace blink |
| 412 | 411 |
| 413 #endif // EventHandler_h | 412 #endif // EventHandler_h |
| OLD | NEW |