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