| 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 21 matching lines...) Expand all Loading... |
| 32 #include "HitTestRequest.h" | 32 #include "HitTestRequest.h" |
| 33 #include "LayoutPoint.h" | 33 #include "LayoutPoint.h" |
| 34 #include "PlatformMouseEvent.h" | 34 #include "PlatformMouseEvent.h" |
| 35 #include "PlatformWheelEvent.h" | 35 #include "PlatformWheelEvent.h" |
| 36 #include "ScrollTypes.h" | 36 #include "ScrollTypes.h" |
| 37 #include "TextEventInputType.h" | 37 #include "TextEventInputType.h" |
| 38 #include "TextGranularity.h" | 38 #include "TextGranularity.h" |
| 39 #include "Timer.h" | 39 #include "Timer.h" |
| 40 #include "UserGestureIndicator.h" | 40 #include "UserGestureIndicator.h" |
| 41 #include <wtf/Forward.h> | 41 #include <wtf/Forward.h> |
| 42 #include <wtf/HashMap.h> |
| 42 #include <wtf/OwnPtr.h> | 43 #include <wtf/OwnPtr.h> |
| 43 #include <wtf/RefPtr.h> | 44 #include <wtf/RefPtr.h> |
| 44 | 45 |
| 45 #if ENABLE(TOUCH_EVENTS) | |
| 46 #include <wtf/HashMap.h> | |
| 47 #endif | |
| 48 | |
| 49 namespace WebCore { | 46 namespace WebCore { |
| 50 | 47 |
| 51 class AutoscrollController; | 48 class AutoscrollController; |
| 52 class Clipboard; | 49 class Clipboard; |
| 53 class Document; | 50 class Document; |
| 54 class Element; | 51 class Element; |
| 55 class Event; | 52 class Event; |
| 56 class EventTarget; | 53 class EventTarget; |
| 57 class FloatPoint; | 54 class FloatPoint; |
| 58 class FloatQuad; | 55 class FloatQuad; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 199 |
| 203 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); | 200 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); |
| 204 | 201 |
| 205 void focusDocumentView(); | 202 void focusDocumentView(); |
| 206 | 203 |
| 207 void capsLockStateMayHaveChanged(); // Only called by FrameSelection | 204 void capsLockStateMayHaveChanged(); // Only called by FrameSelection |
| 208 | 205 |
| 209 void sendResizeEvent(); // Only called in FrameView | 206 void sendResizeEvent(); // Only called in FrameView |
| 210 void sendScrollEvent(); // Ditto | 207 void sendScrollEvent(); // Ditto |
| 211 | 208 |
| 212 #if ENABLE(TOUCH_EVENTS) | |
| 213 bool handleTouchEvent(const PlatformTouchEvent&); | 209 bool handleTouchEvent(const PlatformTouchEvent&); |
| 214 #endif | |
| 215 | 210 |
| 216 bool useHandCursor(Node*, bool isOverLink, bool shiftKey); | 211 bool useHandCursor(Node*, bool isOverLink, bool shiftKey); |
| 217 | 212 |
| 218 private: | 213 private: |
| 219 static DragState& dragState(); | 214 static DragState& dragState(); |
| 220 static const double TextDragDelay; | 215 static const double TextDragDelay; |
| 221 | 216 |
| 222 PassRefPtr<Clipboard> createDraggingClipboard() const; | 217 PassRefPtr<Clipboard> createDraggingClipboard() const; |
| 223 | 218 |
| 224 bool eventActivatedView(const PlatformMouseEvent&) const; | 219 bool eventActivatedView(const PlatformMouseEvent&) const; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 243 bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; } | 238 bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; } |
| 244 | 239 |
| 245 static bool isKeyboardOptionTab(KeyboardEvent*); | 240 static bool isKeyboardOptionTab(KeyboardEvent*); |
| 246 static bool eventInvertsTabsToLinksClientCallResult(KeyboardEvent*); | 241 static bool eventInvertsTabsToLinksClientCallResult(KeyboardEvent*); |
| 247 | 242 |
| 248 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); | 243 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); |
| 249 void cancelFakeMouseMoveEvent(); | 244 void cancelFakeMouseMoveEvent(); |
| 250 | 245 |
| 251 bool isInsideScrollbar(const IntPoint&) const; | 246 bool isInsideScrollbar(const IntPoint&) const; |
| 252 | 247 |
| 253 #if ENABLE(TOUCH_EVENTS) | |
| 254 bool dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent&); | 248 bool dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent&); |
| 255 HitTestResult hitTestResultInFrame(Frame*, const LayoutPoint&, HitTestReques
t::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Activ
e | HitTestRequest::DisallowShadowContent); | 249 HitTestResult hitTestResultInFrame(Frame*, const LayoutPoint&, HitTestReques
t::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Activ
e | HitTestRequest::DisallowShadowContent); |
| 256 #endif | |
| 257 | 250 |
| 258 void invalidateClick(); | 251 void invalidateClick(); |
| 259 | 252 |
| 260 Node* nodeUnderMouse() const; | 253 Node* nodeUnderMouse() const; |
| 261 | 254 |
| 262 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&, bool fireM
ouseOverOut); | 255 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&, bool fireM
ouseOverOut); |
| 263 void fireMouseOverOut(bool fireMouseOver = true, bool fireMouseOut = true, b
ool updateLastNodeUnderMouse = true); | 256 void fireMouseOverOut(bool fireMouseOver = true, bool fireMouseOut = true, b
ool updateLastNodeUnderMouse = true); |
| 264 | 257 |
| 265 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
PlatformMouseEvent&); | 258 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const
PlatformMouseEvent&); |
| 266 | 259 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 IntPoint m_mouseDownPos; // In our view's coords. | 374 IntPoint m_mouseDownPos; // In our view's coords. |
| 382 double m_mouseDownTimestamp; | 375 double m_mouseDownTimestamp; |
| 383 PlatformMouseEvent m_mouseDown; | 376 PlatformMouseEvent m_mouseDown; |
| 384 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 377 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
| 385 | 378 |
| 386 RefPtr<Node> m_latchedWheelEventNode; | 379 RefPtr<Node> m_latchedWheelEventNode; |
| 387 bool m_widgetIsLatched; | 380 bool m_widgetIsLatched; |
| 388 | 381 |
| 389 RefPtr<Node> m_previousWheelScrolledNode; | 382 RefPtr<Node> m_previousWheelScrolledNode; |
| 390 | 383 |
| 391 #if ENABLE(TOUCH_EVENTS) | |
| 392 typedef HashMap<int, RefPtr<EventTarget> > TouchTargetMap; | 384 typedef HashMap<int, RefPtr<EventTarget> > TouchTargetMap; |
| 393 TouchTargetMap m_originatingTouchPointTargets; | 385 TouchTargetMap m_originatingTouchPointTargets; |
| 394 RefPtr<Document> m_originatingTouchPointDocument; | 386 RefPtr<Document> m_originatingTouchPointDocument; |
| 395 unsigned m_originatingTouchPointTargetKey; | 387 unsigned m_originatingTouchPointTargetKey; |
| 396 bool m_touchPressed; | 388 bool m_touchPressed; |
| 397 #endif | |
| 398 | 389 |
| 399 RefPtr<Node> m_scrollGestureHandlingNode; | 390 RefPtr<Node> m_scrollGestureHandlingNode; |
| 400 bool m_lastHitTestResultOverWidget; | 391 bool m_lastHitTestResultOverWidget; |
| 401 RefPtr<Node> m_previousGestureScrolledNode; | 392 RefPtr<Node> m_previousGestureScrolledNode; |
| 402 RefPtr<Scrollbar> m_scrollbarHandlingScrollGesture; | 393 RefPtr<Scrollbar> m_scrollbarHandlingScrollGesture; |
| 403 | 394 |
| 404 double m_maxMouseMovedDuration; | 395 double m_maxMouseMovedDuration; |
| 405 PlatformEvent::Type m_baseEventType; | 396 PlatformEvent::Type m_baseEventType; |
| 406 bool m_didStartDrag; | 397 bool m_didStartDrag; |
| 407 bool m_didLongPressInvokeContextMenu; | 398 bool m_didLongPressInvokeContextMenu; |
| 408 | 399 |
| 409 #if ENABLE(CURSOR_VISIBILITY) | 400 #if ENABLE(CURSOR_VISIBILITY) |
| 410 Timer<EventHandler> m_autoHideCursorTimer; | 401 Timer<EventHandler> m_autoHideCursorTimer; |
| 411 #endif | 402 #endif |
| 412 }; | 403 }; |
| 413 | 404 |
| 414 } // namespace WebCore | 405 } // namespace WebCore |
| 415 | 406 |
| 416 #endif // EventHandler_h | 407 #endif // EventHandler_h |
| OLD | NEW |