EventHandler.h 14.4 KB
Newer Older
darin's avatar
darin committed
1
/*
2
 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
darin's avatar
darin committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 */

#ifndef EventHandler_h
#define EventHandler_h

29
#include "DragActions.h"
30
#include "DragState.h"
31
#include "FocusDirection.h"
32
#include "HitTestRequest.h"
darin's avatar
darin committed
33 34
#include "PlatformMouseEvent.h"
#include "ScrollTypes.h"
35
#include "TextEventInputType.h"
darin's avatar
darin committed
36 37
#include "Timer.h"
#include <wtf/Forward.h>
38
#include <wtf/OwnPtr.h>
darin's avatar
darin committed
39 40
#include <wtf/RefPtr.h>

41
#if PLATFORM(MAC) && !defined(__OBJC__)
darin's avatar
darin committed
42 43 44
class NSView;
#endif

45 46 47 48
#if ENABLE(TOUCH_EVENTS)
#include <wtf/HashMap.h>
#endif

darin's avatar
darin committed
49 50 51
namespace WebCore {

class Clipboard;
52
class Cursor;
darin's avatar
darin committed
53
class Event;
54
class EventTarget;
darin's avatar
darin committed
55
class FloatPoint;
56
class FloatQuad;
darin's avatar
darin committed
57
class Frame;
58
class HTMLFrameSetElement;
59
class HitTestRequest;
darin's avatar
darin committed
60 61 62 63
class HitTestResult;
class KeyboardEvent;
class MouseEventWithHitTestResults;
class Node;
adele's avatar
adele committed
64
class PlatformKeyboardEvent;
65
class PlatformTouchEvent;
darin's avatar
darin committed
66 67 68 69
class PlatformWheelEvent;
class RenderLayer;
class RenderObject;
class RenderWidget;
70
class SVGElementInstance;
71
class Scrollbar;
darin's avatar
darin committed
72
class TextEvent;
73
class TouchEvent;
74
class WheelEvent;
darin's avatar
darin committed
75
class Widget;
76 77 78 79 80

#if ENABLE(GESTURE_EVENTS)
class PlatformGestureEvent;
#endif

81
#if ENABLE(GESTURE_RECOGNIZER)
82 83 84
class PlatformGestureRecognizer;
#endif

bolsinga@apple.com's avatar
bolsinga@apple.com committed
85
#if ENABLE(DRAG_SUPPORT)
oliver's avatar
 
oliver committed
86 87 88 89
extern const int LinkDragHysteresis;
extern const int ImageDragHysteresis;
extern const int TextDragHysteresis;
extern const int GeneralDragHysteresis;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
90
#endif // ENABLE(DRAG_SUPPORT)
aliceli1's avatar
aliceli1 committed
91

92 93
enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars };

94 95
class EventHandler {
    WTF_MAKE_NONCOPYABLE(EventHandler);
darin's avatar
darin committed
96 97 98 99 100
public:
    EventHandler(Frame*);
    ~EventHandler();

    void clear();
101
    void nodeWillBeRemoved(Node*);
darin's avatar
darin committed
102

bolsinga@apple.com's avatar
bolsinga@apple.com committed
103
#if ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
104
    void updateSelectionForMouseDrag();
bolsinga@apple.com's avatar
bolsinga@apple.com committed
105
#endif
darin's avatar
darin committed
106 107 108 109

    Node* mousePressNode() const;
    void setMousePressNode(PassRefPtr<Node>);

110
    void startPanScrolling(RenderObject*);
111

darin's avatar
darin committed
112 113
    void stopAutoscrollTimer(bool rendererIsBeingDestroyed = false);
    RenderObject* autoscrollRenderer() const;
114
    void updateAutoscrollRenderer();
darin's avatar
darin committed
115

116
    void dispatchFakeMouseMoveEventSoon();
117 118
    void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&);

119 120 121 122
    HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false,
                                       HitTestScrollbars scrollbars = DontHitTestScrollbars,
                                       HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active,
                                       const IntSize& padding = IntSize());
darin's avatar
darin committed
123 124 125 126

    bool mousePressed() const { return m_mousePressed; }
    void setMousePressed(bool pressed) { m_mousePressed = pressed; }

ap@apple.com's avatar
ap@apple.com committed
127
    void setCapturingMouseEventsNode(PassRefPtr<Node>); // A caller is responsible for resetting capturing node to 0.
adele's avatar
adele committed
128

bolsinga@apple.com's avatar
bolsinga@apple.com committed
129
#if ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
130 131 132
    bool updateDragAndDrop(const PlatformMouseEvent&, Clipboard*);
    void cancelDragAndDrop(const PlatformMouseEvent&, Clipboard*);
    bool performDragAndDrop(const PlatformMouseEvent&, Clipboard*);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
133
#endif
darin's avatar
darin committed
134 135 136 137 138

    void scheduleHoverStateUpdate();

    void setResizingFrameSet(HTMLFrameSetElement*);

mitz@apple.com's avatar
mitz@apple.com committed
139 140
    void resizeLayerDestroyed();

darin's avatar
darin committed
141 142
    IntPoint currentMousePosition() const;

143
    static Frame* subframeForTargetNode(Node*);
144
    static Frame* subframeForHitTestResult(const MouseEventWithHitTestResults&);
145

tonikitoo@webkit.org's avatar
tonikitoo@webkit.org committed
146 147
    bool scrollOverflow(ScrollDirection, ScrollGranularity, Node* startingNode = 0);
    bool scrollRecursively(ScrollDirection, ScrollGranularity, Node* startingNode = 0);
148
    bool logicalScrollRecursively(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0);
149

darin's avatar
darin committed
150
    bool tabsToLinks(KeyboardEvent*) const;
ap@apple.com's avatar
ap@apple.com committed
151
    bool tabsToAllFormControls(KeyboardEvent*) const;
darin's avatar
darin committed
152

153 154
    bool mouseMoved(const PlatformMouseEvent&);

155 156
    void lostMouseCapture();

aroben's avatar
aroben committed
157
    bool handleMousePressEvent(const PlatformMouseEvent&);
158
    bool handleMouseMoveEvent(const PlatformMouseEvent&, HitTestResult* hoveredNode = 0);
aroben's avatar
aroben committed
159 160
    bool handleMouseReleaseEvent(const PlatformMouseEvent&);
    bool handleWheelEvent(PlatformWheelEvent&);
161
    void defaultWheelEventHandler(Node*, WheelEvent*);
darin's avatar
darin committed
162

163 164 165 166
#if ENABLE(GESTURE_EVENTS)
    bool handleGestureEvent(const PlatformGestureEvent&);
#endif

bolsinga@apple.com's avatar
bolsinga@apple.com committed
167
#if ENABLE(CONTEXT_MENUS)
darin's avatar
darin committed
168
    bool sendContextMenuEvent(const PlatformMouseEvent&);
169
    bool sendContextMenuEventForKey();
bolsinga@apple.com's avatar
bolsinga@apple.com committed
170
#endif
aroben's avatar
aroben committed
171

darin's avatar
darin committed
172 173
    void setMouseDownMayStartAutoscroll() { m_mouseDownMayStartAutoscroll = true; }

ap@webkit.org's avatar
ap@webkit.org committed
174 175
    bool needsKeyboardEventDisambiguationQuirks() const;

ap@webkit.org's avatar
ap@webkit.org committed
176
    static unsigned accessKeyModifiers();
ap@webkit.org's avatar
ap@webkit.org committed
177
    bool handleAccessKey(const PlatformKeyboardEvent&);
adele's avatar
adele committed
178
    bool keyEvent(const PlatformKeyboardEvent&);
adele's avatar
adele committed
179
    void defaultKeyboardEventHandler(KeyboardEvent*);
darin's avatar
darin committed
180

181
    bool handleTextInputEvent(const String& text, Event* underlyingEvent = 0, TextEventInputType = TextEventInputKeyboard);
darin's avatar
darin committed
182 183
    void defaultTextInputEventHandler(TextEvent*);

bolsinga@apple.com's avatar
bolsinga@apple.com committed
184
#if ENABLE(DRAG_SUPPORT)
oliver's avatar
 
oliver committed
185
    bool eventMayStartDrag(const PlatformMouseEvent&) const;
186 187
    
    void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
188
#endif
darin's avatar
darin committed
189

adele's avatar
adele committed
190 191
    void focusDocumentView();

192
    void capsLockStateMayHaveChanged(); // Only called by FrameSelection
193
    
194 195 196
    void sendResizeEvent(); // Only called in FrameView
    void sendScrollEvent(); // Ditto

197
#if PLATFORM(MAC) && defined(__OBJC__)
darin@apple.com's avatar
darin@apple.com committed
198 199 200 201 202 203 204 205
    void mouseDown(NSEvent *);
    void mouseDragged(NSEvent *);
    void mouseUp(NSEvent *);
    void mouseMoved(NSEvent *);
    bool keyEvent(NSEvent *);
    bool wheelEvent(NSEvent *);

    void sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent);
darin's avatar
darin committed
206 207 208

    void setActivationEventNumber(int num) { m_activationEventNumber = num; }

darin@apple.com's avatar
darin@apple.com committed
209
    static NSEvent *currentNSEvent();
darin's avatar
darin committed
210 211
#endif

212 213 214 215
#if ENABLE(TOUCH_EVENTS)
    bool handleTouchEvent(const PlatformTouchEvent&);
#endif

darin's avatar
darin committed
216
private:
bolsinga@apple.com's avatar
bolsinga@apple.com committed
217
#if ENABLE(DRAG_SUPPORT)
218 219 220 221 222 223
    enum DragAndDropHandleType {
        UpdateDragAndDrop,
        CancelDragAndDrop,
        PerformDragAndDrop
    };

224
    static DragState& dragState();
darin@apple.com's avatar
darin@apple.com committed
225
    static const double TextDragDelay;
226

227
    bool canHandleDragAndDropForTarget(DragAndDropHandleType, Node* target, const PlatformMouseEvent&, Clipboard*, bool* accepted = 0);
228
    
darin@apple.com's avatar
darin@apple.com committed
229
    PassRefPtr<Clipboard> createDraggingClipboard() const;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
230
#endif // ENABLE(DRAG_SUPPORT)
231

oliver's avatar
 
oliver committed
232
    bool eventActivatedView(const PlatformMouseEvent&) const;
darin@apple.com's avatar
darin@apple.com committed
233 234
    void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&);
    void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResults&);
darin's avatar
darin committed
235

aroben's avatar
aroben committed
236
    bool handleMouseDoubleClickEvent(const PlatformMouseEvent&);
darin's avatar
darin committed
237

238 239 240
    static Node* targetNode(const MouseEventWithHitTestResults&);
    static Node* targetNode(const HitTestResult&);

aroben's avatar
aroben committed
241 242 243 244
    bool handleMousePressEvent(const MouseEventWithHitTestResults&);
    bool handleMousePressEventSingleClick(const MouseEventWithHitTestResults&);
    bool handleMousePressEventDoubleClick(const MouseEventWithHitTestResults&);
    bool handleMousePressEventTripleClick(const MouseEventWithHitTestResults&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
245
#if ENABLE(DRAG_SUPPORT)
246
    bool handleMouseDraggedEvent(const MouseEventWithHitTestResults&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
247
#endif
aroben's avatar
aroben committed
248
    bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&);
darin's avatar
darin committed
249

250 251
    void handleKeyboardSelectionMovement(KeyboardEvent*);
    
hyatt@apple.com's avatar
hyatt@apple.com committed
252
    Cursor selectCursor(const MouseEventWithHitTestResults&, Scrollbar*);
253
#if ENABLE(PAN_SCROLLING)
254
    void updatePanScrollState();
255
#endif
256

darin's avatar
darin committed
257 258 259
    void hoverTimerFired(Timer<EventHandler>*);

    static bool canMouseDownStartSelect(Node*);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
260
#if ENABLE(DRAG_SUPPORT)
adele's avatar
adele committed
261
    static bool canMouseDragExtendSelect(Node*);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
262
#endif
darin's avatar
darin committed
263 264 265 266 267

    void handleAutoscroll(RenderObject*);
    void startAutoscrollTimer();
    void setAutoscrollRenderer(RenderObject*);
    void autoscrollTimerFired(Timer<EventHandler>*);
268 269 270 271 272 273 274
    bool logicalScrollOverflow(ScrollLogicalDirection, ScrollGranularity, Node* startingNode = 0);
    
    bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const;
    bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; }

    static bool isKeyboardOptionTab(KeyboardEvent*);
    static bool eventInvertsTabsToLinksClientCallResult(KeyboardEvent*);
darin's avatar
darin committed
275

276 277 278
    void fakeMouseMoveEventTimerFired(Timer<EventHandler>*);
    void cancelFakeMouseMoveEvent();

darin's avatar
darin committed
279 280 281
    void invalidateClick();

    Node* nodeUnderMouse() const;
282 283 284 285
    
    void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&, bool fireMouseOverOut);
    void fireMouseOverOut(bool fireMouseOver = true, bool fireMouseOut = true, bool updateLastNodeUnderMouse = true);
    
darin's avatar
darin committed
286
    MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const PlatformMouseEvent&);
darin's avatar
darin committed
287

288
    bool dispatchMouseEvent(const AtomicString& eventType, Node* target, bool cancelable, int clickCount, const PlatformMouseEvent&, bool setUnder);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
289
#if ENABLE(DRAG_SUPPORT)
290
    bool dispatchDragEvent(const AtomicString& eventType, Node* target, const PlatformMouseEvent&, Clipboard*);
darin's avatar
darin committed
291 292 293 294

    void freeClipboard();

    bool handleDrag(const MouseEventWithHitTestResults&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
295
#endif
darin's avatar
darin committed
296
    bool handleMouseUp(const MouseEventWithHitTestResults&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
297
#if ENABLE(DRAG_SUPPORT)
298
    void clearDragState();
darin's avatar
darin committed
299 300 301 302

    bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent&);

    bool dragHysteresisExceeded(const FloatPoint&) const;
aliceli1's avatar
aliceli1 committed
303
    bool dragHysteresisExceeded(const IntPoint&) const;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
304
#endif // ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
305 306

    bool passMousePressEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe);
307
    bool passMouseMoveEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe, HitTestResult* hoveredNode = 0);
darin's avatar
darin committed
308 309
    bool passMouseReleaseEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe);

aroben's avatar
aroben committed
310
    bool passSubframeEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe, HitTestResult* hoveredNode = 0);
darin's avatar
darin committed
311

hyatt@apple.com's avatar
hyatt@apple.com committed
312
    bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&, Scrollbar*);
darin's avatar
darin committed
313 314 315 316 317

    bool passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&);
    bool passWidgetMouseDownEventToWidget(RenderWidget*);

    bool passMouseDownEventToWidget(Widget*);
andersca's avatar
andersca committed
318
    bool passWheelEventToWidget(PlatformWheelEvent&, Widget*);
darin's avatar
darin committed
319

darin@apple.com's avatar
darin@apple.com committed
320
    void defaultSpaceEventHandler(KeyboardEvent*);
321
    void defaultBackspaceEventHandler(KeyboardEvent*);
adachan@apple.com's avatar
adachan@apple.com committed
322
    void defaultTabEventHandler(KeyboardEvent*);
323
    void defaultArrowEventHandler(FocusDirection, KeyboardEvent*);
darin's avatar
darin committed
324

bolsinga@apple.com's avatar
bolsinga@apple.com committed
325
#if ENABLE(DRAG_SUPPORT)
326
    DragSourceAction updateDragSourceActionsAllowed() const;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
327
#endif
darin's avatar
darin committed
328

darin's avatar
darin committed
329 330 331
    // The following are called at the beginning of handleMouseUp and handleDrag.  
    // If they return true it indicates that they have consumed the event.
    bool eventLoopHandleMouseUp(const MouseEventWithHitTestResults&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
332
#if ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
333
    bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
334
#endif
darin's avatar
darin committed
335

bolsinga@apple.com's avatar
bolsinga@apple.com committed
336
#if ENABLE(DRAG_SUPPORT)
337
    void updateSelectionForMouseDrag(const HitTestResult&);
bolsinga@apple.com's avatar
bolsinga@apple.com committed
338
#endif
darin's avatar
darin committed
339

treat@webkit.org's avatar
treat@webkit.org committed
340
    void updateLastScrollbarUnderMouse(Scrollbar*, bool);
341 342
    
    void setFrameWasScrolledByUser();
treat@webkit.org's avatar
treat@webkit.org committed
343

344 345
    FocusDirection focusDirectionForKey(const AtomicString&) const;

346 347
    bool capturesDragging() const { return m_capturesDragging; }

348
#if PLATFORM(MAC) && defined(__OBJC__)
darin@apple.com's avatar
darin@apple.com committed
349 350 351 352 353
    NSView *mouseDownViewIfStillGood();

    PlatformMouseEvent currentPlatformMouseEvent() const;
#endif

darin's avatar
darin committed
354 355 356
    Frame* m_frame;

    bool m_mousePressed;
357
    bool m_capturesDragging;
darin's avatar
darin committed
358 359
    RefPtr<Node> m_mousePressNode;

darin's avatar
darin committed
360
    bool m_mouseDownMayStartSelect;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
361
#if ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
362
    bool m_mouseDownMayStartDrag;
363
    bool m_dragMayStartSelectionInstead;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
364
#endif
darin's avatar
darin committed
365
    bool m_mouseDownWasSingleClickInSelection;
darin's avatar
darin committed
366 367
    bool m_beganSelectingText;

bolsinga@apple.com's avatar
bolsinga@apple.com committed
368
#if ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
369
    IntPoint m_dragStartPos;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
370
#endif
darin's avatar
darin committed
371

372 373 374
    IntPoint m_panScrollStartPos;
    bool m_panScrollInProgress;

375 376 377
    bool m_panScrollButtonPressed;
    bool m_springLoadedPanScrollInProgress;

darin's avatar
darin committed
378 379 380 381
    Timer<EventHandler> m_hoverTimer;
    
    Timer<EventHandler> m_autoscrollTimer;
    RenderObject* m_autoscrollRenderer;
382
    bool m_autoscrollInProgress;
darin's avatar
darin committed
383
    bool m_mouseDownMayStartAutoscroll;
darin's avatar
darin committed
384
    bool m_mouseDownWasInSubframe;
darin@apple.com's avatar
darin@apple.com committed
385

386 387
    Timer<EventHandler> m_fakeMouseMoveEventTimer;

weinig's avatar
weinig committed
388 389
#if ENABLE(SVG)
    bool m_svgPan;
390 391
    RefPtr<SVGElementInstance> m_instanceUnderMouse;
    RefPtr<SVGElementInstance> m_lastInstanceUnderMouse;
weinig's avatar
weinig committed
392
#endif
darin's avatar
darin committed
393 394 395

    RenderLayer* m_resizeLayer;

adele's avatar
adele committed
396
    RefPtr<Node> m_capturingMouseEventsNode;
ap@apple.com's avatar
ap@apple.com committed
397
    bool m_eventHandlerWillResetCapturingMouseEventsNode;
adele's avatar
adele committed
398
    
darin's avatar
darin committed
399 400 401
    RefPtr<Node> m_nodeUnderMouse;
    RefPtr<Node> m_lastNodeUnderMouse;
    RefPtr<Frame> m_lastMouseMoveEventSubframe;
hyatt@apple.com's avatar
hyatt@apple.com committed
402
    RefPtr<Scrollbar> m_lastScrollbarUnderMouse;
darin's avatar
darin committed
403 404 405 406

    int m_clickCount;
    RefPtr<Node> m_clickNode;

bolsinga@apple.com's avatar
bolsinga@apple.com committed
407
#if ENABLE(DRAG_SUPPORT)
darin's avatar
darin committed
408
    RefPtr<Node> m_dragTarget;
409
    bool m_shouldOnlyFireDragOverEvent;
bolsinga@apple.com's avatar
bolsinga@apple.com committed
410
#endif
darin's avatar
darin committed
411 412 413
    
    RefPtr<HTMLFrameSetElement> m_frameSetBeingResized;

414
    IntSize m_offsetFromResizeCorner;   // in the coords of m_resizeLayer
darin's avatar
darin committed
415 416
    
    IntPoint m_currentMousePosition;
aliceli1's avatar
aliceli1 committed
417 418
    IntPoint m_mouseDownPos; // in our view's coords
    double m_mouseDownTimestamp;
419
    PlatformMouseEvent m_mouseDown;
420

andersca@apple.com's avatar
andersca@apple.com committed
421 422 423
    bool m_useLatchedWheelEventNode;
    RefPtr<Node> m_latchedWheelEventNode;
    bool m_widgetIsLatched;
424 425 426

    RefPtr<Node> m_previousWheelScrolledNode;

427
#if PLATFORM(MAC)
darin's avatar
darin committed
428 429 430 431
    NSView *m_mouseDownView;
    bool m_sendingEventToSubview;
    int m_activationEventNumber;
#endif
432
#if ENABLE(TOUCH_EVENTS)
433 434
    typedef HashMap<int, RefPtr<EventTarget> > TouchTargetMap;
    TouchTargetMap m_originatingTouchPointTargets;
435
    bool m_touchPressed;
436
#endif
437
#if ENABLE(GESTURE_RECOGNIZER)
438 439
    OwnPtr<PlatformGestureRecognizer> m_gestureRecognizer;
#endif
darin's avatar
darin committed
440 441 442 443 444
};

} // namespace WebCore

#endif // EventHandler_h