| 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 14 matching lines...) Expand all Loading... |
| 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/FocusType.h" | 32 #include "core/page/FocusType.h" |
| 33 #include "core/rendering/HitTestRequest.h" | 33 #include "core/rendering/HitTestRequest.h" |
| 34 #include "core/rendering/style/RenderStyleConstants.h" | 34 #include "core/rendering/style/RenderStyleConstants.h" |
| 35 #include "heap/Handle.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/scroll/ScrollTypes.h" | 41 #include "platform/scroll/ScrollTypes.h" |
| 41 #include "wtf/Forward.h" | 42 #include "wtf/Forward.h" |
| 42 #include "wtf/HashMap.h" | 43 #include "wtf/HashMap.h" |
| 43 #include "wtf/RefPtr.h" | 44 #include "wtf/RefPtr.h" |
| 44 | 45 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 class RenderWidget; | 72 class RenderWidget; |
| 72 class SVGElementInstance; | 73 class SVGElementInstance; |
| 73 class ScrollableArea; | 74 class ScrollableArea; |
| 74 class Scrollbar; | 75 class Scrollbar; |
| 75 class TextEvent; | 76 class TextEvent; |
| 76 class TouchEvent; | 77 class TouchEvent; |
| 77 class VisibleSelection; | 78 class VisibleSelection; |
| 78 class WheelEvent; | 79 class WheelEvent; |
| 79 class Widget; | 80 class Widget; |
| 80 | 81 |
| 81 struct DragState; | 82 class DragState; |
| 82 | 83 |
| 83 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili
ngWhitespace }; | 84 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili
ngWhitespace }; |
| 84 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; | 85 enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis }; |
| 85 | 86 |
| 86 class EventHandler { | 87 class EventHandler { |
| 87 WTF_MAKE_NONCOPYABLE(EventHandler); | 88 WTF_MAKE_NONCOPYABLE(EventHandler); |
| 88 public: | 89 public: |
| 89 explicit EventHandler(Frame*); | 90 explicit EventHandler(Frame*); |
| 90 ~EventHandler(); | 91 ~EventHandler(); |
| 91 | 92 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 174 |
| 174 bool handleTouchEvent(const PlatformTouchEvent&); | 175 bool handleTouchEvent(const PlatformTouchEvent&); |
| 175 | 176 |
| 176 bool useHandCursor(Node*, bool isOverLink, bool shiftKey); | 177 bool useHandCursor(Node*, bool isOverLink, bool shiftKey); |
| 177 | 178 |
| 178 void notifyElementActivated(); | 179 void notifyElementActivated(); |
| 179 | 180 |
| 180 private: | 181 private: |
| 181 static DragState& dragState(); | 182 static DragState& dragState(); |
| 182 | 183 |
| 183 PassRefPtr<Clipboard> createDraggingClipboard() const; | 184 PassRefPtrWillBeRawPtr<Clipboard> createDraggingClipboard() const; |
| 184 | 185 |
| 185 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS
election&, TextGranularity); | 186 bool updateSelectionForMouseDownDispatchingSelectStart(Node*, const VisibleS
election&, TextGranularity); |
| 186 void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailing
Whitespace); | 187 void selectClosestWordFromHitTestResult(const HitTestResult&, AppendTrailing
Whitespace); |
| 187 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendT
railingWhitespace); | 188 void selectClosestMisspellingFromHitTestResult(const HitTestResult&, AppendT
railingWhitespace); |
| 188 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); | 189 void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); |
| 189 void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResul
ts&); | 190 void selectClosestMisspellingFromMouseEvent(const MouseEventWithHitTestResul
ts&); |
| 190 void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResult
s&); | 191 void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResult
s&); |
| 191 | 192 |
| 192 bool handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, HitTestResult* h
overedNode = 0, bool onlyUpdateScrollbars = false); | 193 bool handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, HitTestResult* h
overedNode = 0, bool onlyUpdateScrollbars = false); |
| 193 bool handleMousePressEvent(const MouseEventWithHitTestResults&); | 194 bool handleMousePressEvent(const MouseEventWithHitTestResults&); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 float m_syntheticPageScaleFactor; | 394 float m_syntheticPageScaleFactor; |
| 394 | 395 |
| 395 Timer<EventHandler> m_activeIntervalTimer; | 396 Timer<EventHandler> m_activeIntervalTimer; |
| 396 double m_lastShowPressTimestamp; | 397 double m_lastShowPressTimestamp; |
| 397 RefPtr<Element> m_lastDeferredTapElement; | 398 RefPtr<Element> m_lastDeferredTapElement; |
| 398 }; | 399 }; |
| 399 | 400 |
| 400 } // namespace WebCore | 401 } // namespace WebCore |
| 401 | 402 |
| 402 #endif // EventHandler_h | 403 #endif // EventHandler_h |
| OLD | NEW |