author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 15:10:48 +0300 | |
changeset 30 | 5dc02b23752f |
parent 0 | 1918ee327afb |
child 33 | 3e2da88830cd |
permissions | -rw-r--r-- |
0 | 1 |
/* |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
2 |
* Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. |
0 | 3 |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
|
5 |
* modification, are permitted provided that the following conditions |
|
6 |
* are met: |
|
7 |
* 1. Redistributions of source code must retain the above copyright |
|
8 |
* notice, this list of conditions and the following disclaimer. |
|
9 |
* 2. Redistributions in binary form must reproduce the above copyright |
|
10 |
* notice, this list of conditions and the following disclaimer in the |
|
11 |
* documentation and/or other materials provided with the distribution. |
|
12 |
* |
|
13 |
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
|
14 |
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
15 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
16 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
|
17 |
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|
18 |
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
19 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|
20 |
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
|
21 |
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
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. |
|
24 |
*/ |
|
25 |
||
26 |
#ifndef EventHandler_h |
|
27 |
#define EventHandler_h |
|
28 |
||
29 |
#include "DragActions.h" |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
#include "FocusDirection.h" |
0 | 31 |
#include "PlatformMouseEvent.h" |
32 |
#include "ScrollTypes.h" |
|
33 |
#include "Timer.h" |
|
34 |
#include <wtf/Forward.h> |
|
35 |
#include <wtf/RefPtr.h> |
|
36 |
||
37 |
#if PLATFORM(MAC) && !defined(__OBJC__) |
|
38 |
class NSView; |
|
39 |
#endif |
|
40 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
41 |
#if ENABLE(TOUCH_EVENTS) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
42 |
#include <wtf/HashMap.h> |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
43 |
#endif |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
44 |
|
0 | 45 |
namespace WebCore { |
46 |
||
47 |
class AtomicString; |
|
48 |
class Clipboard; |
|
49 |
class Cursor; |
|
50 |
class Event; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
51 |
class EventTarget; |
0 | 52 |
class FloatPoint; |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
53 |
class FloatQuad; |
0 | 54 |
class Frame; |
55 |
class HitTestRequest; |
|
56 |
class HitTestResult; |
|
57 |
class HTMLFrameSetElement; |
|
58 |
class KeyboardEvent; |
|
59 |
class MouseEventWithHitTestResults; |
|
60 |
class Node; |
|
61 |
class PlatformKeyboardEvent; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
62 |
class PlatformTouchEvent; |
0 | 63 |
class PlatformWheelEvent; |
64 |
class RenderLayer; |
|
65 |
class RenderObject; |
|
66 |
class RenderWidget; |
|
67 |
class Scrollbar; |
|
68 |
class String; |
|
69 |
class SVGElementInstance; |
|
70 |
class TextEvent; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
class TouchEvent; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
class WheelEvent; |
0 | 73 |
class Widget; |
74 |
||
75 |
#if ENABLE(DRAG_SUPPORT) |
|
76 |
extern const int LinkDragHysteresis; |
|
77 |
extern const int ImageDragHysteresis; |
|
78 |
extern const int TextDragHysteresis; |
|
79 |
extern const int GeneralDragHysteresis; |
|
80 |
#endif // ENABLE(DRAG_SUPPORT) |
|
81 |
||
82 |
enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars }; |
|
83 |
||
84 |
class EventHandler : public Noncopyable { |
|
85 |
public: |
|
86 |
EventHandler(Frame*); |
|
87 |
~EventHandler(); |
|
88 |
||
89 |
void clear(); |
|
90 |
||
91 |
#if ENABLE(DRAG_SUPPORT) |
|
92 |
void updateSelectionForMouseDrag(); |
|
93 |
#endif |
|
94 |
||
95 |
Node* mousePressNode() const; |
|
96 |
void setMousePressNode(PassRefPtr<Node>); |
|
97 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
98 |
void startPanScrolling(RenderObject*); |
0 | 99 |
bool panScrollInProgress() { return m_panScrollInProgress; } |
100 |
void setPanScrollInProgress(bool inProgress) { m_panScrollInProgress = inProgress; } |
|
101 |
||
102 |
void stopAutoscrollTimer(bool rendererIsBeingDestroyed = false); |
|
103 |
RenderObject* autoscrollRenderer() const; |
|
104 |
void updateAutoscrollRenderer(); |
|
105 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
106 |
void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
107 |
|
0 | 108 |
HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars); |
109 |
||
110 |
bool mousePressed() const { return m_mousePressed; } |
|
111 |
void setMousePressed(bool pressed) { m_mousePressed = pressed; } |
|
112 |
||
113 |
void setCapturingMouseEventsNode(PassRefPtr<Node>); |
|
114 |
||
115 |
#if ENABLE(DRAG_SUPPORT) |
|
116 |
bool updateDragAndDrop(const PlatformMouseEvent&, Clipboard*); |
|
117 |
void cancelDragAndDrop(const PlatformMouseEvent&, Clipboard*); |
|
118 |
bool performDragAndDrop(const PlatformMouseEvent&, Clipboard*); |
|
119 |
#endif |
|
120 |
||
121 |
void scheduleHoverStateUpdate(); |
|
122 |
||
123 |
void setResizingFrameSet(HTMLFrameSetElement*); |
|
124 |
||
125 |
void resizeLayerDestroyed(); |
|
126 |
||
127 |
IntPoint currentMousePosition() const; |
|
128 |
||
129 |
void setIgnoreWheelEvents(bool); |
|
130 |
||
131 |
static Frame* subframeForTargetNode(Node*); |
|
132 |
||
133 |
bool scrollOverflow(ScrollDirection, ScrollGranularity); |
|
134 |
||
135 |
bool scrollRecursively(ScrollDirection, ScrollGranularity); |
|
136 |
||
137 |
#if ENABLE(DRAG_SUPPORT) |
|
138 |
bool shouldDragAutoNode(Node*, const IntPoint&) const; // -webkit-user-drag == auto |
|
139 |
#endif |
|
140 |
||
141 |
bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const; |
|
142 |
||
143 |
bool tabsToLinks(KeyboardEvent*) const; |
|
144 |
bool tabsToAllControls(KeyboardEvent*) const; |
|
145 |
||
146 |
bool mouseDownMayStartSelect() const { return m_mouseDownMayStartSelect; } |
|
147 |
||
148 |
bool mouseMoved(const PlatformMouseEvent&); |
|
149 |
||
150 |
bool handleMousePressEvent(const PlatformMouseEvent&); |
|
151 |
bool handleMouseMoveEvent(const PlatformMouseEvent&, HitTestResult* hoveredNode = 0); |
|
152 |
bool handleMouseReleaseEvent(const PlatformMouseEvent&); |
|
153 |
bool handleWheelEvent(PlatformWheelEvent&); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
154 |
void defaultWheelEventHandler(Node*, WheelEvent*); |
0 | 155 |
|
156 |
#if ENABLE(CONTEXT_MENUS) |
|
157 |
bool sendContextMenuEvent(const PlatformMouseEvent&); |
|
158 |
#endif |
|
159 |
||
160 |
void setMouseDownMayStartAutoscroll() { m_mouseDownMayStartAutoscroll = true; } |
|
161 |
||
162 |
bool needsKeyboardEventDisambiguationQuirks() const; |
|
163 |
||
164 |
static unsigned accessKeyModifiers(); |
|
165 |
bool handleAccessKey(const PlatformKeyboardEvent&); |
|
166 |
bool keyEvent(const PlatformKeyboardEvent&); |
|
167 |
void defaultKeyboardEventHandler(KeyboardEvent*); |
|
168 |
||
169 |
bool handleTextInputEvent(const String& text, Event* underlyingEvent = 0, |
|
170 |
bool isLineBreak = false, bool isBackTab = false); |
|
171 |
void defaultTextInputEventHandler(TextEvent*); |
|
172 |
||
173 |
#if ENABLE(DRAG_SUPPORT) |
|
174 |
bool eventMayStartDrag(const PlatformMouseEvent&) const; |
|
175 |
||
176 |
void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); |
|
177 |
#endif |
|
178 |
||
179 |
void focusDocumentView(); |
|
180 |
||
181 |
void capsLockStateMayHaveChanged(); |
|
182 |
||
183 |
void sendResizeEvent(); |
|
184 |
void sendScrollEvent(); |
|
185 |
||
186 |
#if PLATFORM(MAC) && defined(__OBJC__) |
|
187 |
PassRefPtr<KeyboardEvent> currentKeyboardEvent() const; |
|
188 |
||
189 |
void mouseDown(NSEvent *); |
|
190 |
void mouseDragged(NSEvent *); |
|
191 |
void mouseUp(NSEvent *); |
|
192 |
void mouseMoved(NSEvent *); |
|
193 |
bool keyEvent(NSEvent *); |
|
194 |
bool wheelEvent(NSEvent *); |
|
195 |
||
196 |
#if ENABLE(CONTEXT_MENUS) |
|
197 |
bool sendContextMenuEvent(NSEvent *); |
|
198 |
#endif |
|
199 |
bool eventMayStartDrag(NSEvent *); |
|
200 |
||
201 |
void sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent); |
|
202 |
||
203 |
void setActivationEventNumber(int num) { m_activationEventNumber = num; } |
|
204 |
||
205 |
static NSEvent *currentNSEvent(); |
|
206 |
#endif |
|
207 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
208 |
#if ENABLE(TOUCH_EVENTS) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
209 |
bool handleTouchEvent(const PlatformTouchEvent&); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
210 |
#endif |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
211 |
|
0 | 212 |
private: |
213 |
#if ENABLE(DRAG_SUPPORT) |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
214 |
enum DragAndDropHandleType { |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
215 |
UpdateDragAndDrop, |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
216 |
CancelDragAndDrop, |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
217 |
PerformDragAndDrop |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
218 |
}; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
219 |
|
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
220 |
struct EventHandlerDragState : Noncopyable { |
0 | 221 |
RefPtr<Node> m_dragSrc; // element that may be a drag source, for the current mouse gesture |
222 |
bool m_dragSrcIsLink; |
|
223 |
bool m_dragSrcIsImage; |
|
224 |
bool m_dragSrcInSelection; |
|
225 |
bool m_dragSrcMayBeDHTML; |
|
226 |
bool m_dragSrcMayBeUA; // Are DHTML and/or the UserAgent allowed to drag out? |
|
227 |
bool m_dragSrcIsDHTML; |
|
228 |
RefPtr<Clipboard> m_dragClipboard; // used on only the source side of dragging |
|
229 |
}; |
|
230 |
static EventHandlerDragState& dragState(); |
|
231 |
static const double TextDragDelay; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
232 |
|
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
233 |
bool canHandleDragAndDropForTarget(DragAndDropHandleType, Node* target, const PlatformMouseEvent&, Clipboard*, bool* accepted = 0); |
0 | 234 |
|
235 |
PassRefPtr<Clipboard> createDraggingClipboard() const; |
|
236 |
#endif // ENABLE(DRAG_SUPPORT) |
|
237 |
||
238 |
bool eventActivatedView(const PlatformMouseEvent&) const; |
|
239 |
void selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults&); |
|
240 |
void selectClosestWordOrLinkFromMouseEvent(const MouseEventWithHitTestResults&); |
|
241 |
||
242 |
bool handleMouseDoubleClickEvent(const PlatformMouseEvent&); |
|
243 |
||
244 |
bool handleMousePressEvent(const MouseEventWithHitTestResults&); |
|
245 |
bool handleMousePressEventSingleClick(const MouseEventWithHitTestResults&); |
|
246 |
bool handleMousePressEventDoubleClick(const MouseEventWithHitTestResults&); |
|
247 |
bool handleMousePressEventTripleClick(const MouseEventWithHitTestResults&); |
|
248 |
#if ENABLE(DRAG_SUPPORT) |
|
249 |
bool handleMouseDraggedEvent(const MouseEventWithHitTestResults&); |
|
250 |
#endif |
|
251 |
bool handleMouseReleaseEvent(const MouseEventWithHitTestResults&); |
|
252 |
||
253 |
void handleKeyboardSelectionMovement(KeyboardEvent*); |
|
254 |
||
255 |
Cursor selectCursor(const MouseEventWithHitTestResults&, Scrollbar*); |
|
256 |
#if ENABLE(PAN_SCROLLING) |
|
257 |
void updatePanScrollState(); |
|
258 |
#endif |
|
259 |
||
260 |
void hoverTimerFired(Timer<EventHandler>*); |
|
261 |
||
262 |
static bool canMouseDownStartSelect(Node*); |
|
263 |
#if ENABLE(DRAG_SUPPORT) |
|
264 |
static bool canMouseDragExtendSelect(Node*); |
|
265 |
#endif |
|
266 |
||
267 |
void handleAutoscroll(RenderObject*); |
|
268 |
void startAutoscrollTimer(); |
|
269 |
void setAutoscrollRenderer(RenderObject*); |
|
270 |
void autoscrollTimerFired(Timer<EventHandler>*); |
|
271 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
272 |
void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
273 |
void cancelFakeMouseMoveEvent(); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
274 |
|
0 | 275 |
void invalidateClick(); |
276 |
||
277 |
Node* nodeUnderMouse() const; |
|
278 |
||
279 |
void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&, bool fireMouseOverOut); |
|
280 |
void fireMouseOverOut(bool fireMouseOver = true, bool fireMouseOut = true, bool updateLastNodeUnderMouse = true); |
|
281 |
||
282 |
MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const PlatformMouseEvent&); |
|
283 |
||
284 |
bool dispatchMouseEvent(const AtomicString& eventType, Node* target, bool cancelable, int clickCount, const PlatformMouseEvent&, bool setUnder); |
|
285 |
#if ENABLE(DRAG_SUPPORT) |
|
286 |
bool dispatchDragEvent(const AtomicString& eventType, Node* target, const PlatformMouseEvent&, Clipboard*); |
|
287 |
||
288 |
void freeClipboard(); |
|
289 |
||
290 |
bool handleDrag(const MouseEventWithHitTestResults&); |
|
291 |
#endif |
|
292 |
bool handleMouseUp(const MouseEventWithHitTestResults&); |
|
293 |
#if ENABLE(DRAG_SUPPORT) |
|
294 |
void clearDragState(); |
|
295 |
||
296 |
bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent&); |
|
297 |
||
298 |
bool dragHysteresisExceeded(const FloatPoint&) const; |
|
299 |
bool dragHysteresisExceeded(const IntPoint&) const; |
|
300 |
#endif // ENABLE(DRAG_SUPPORT) |
|
301 |
||
302 |
bool passMousePressEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe); |
|
303 |
bool passMouseMoveEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe, HitTestResult* hoveredNode = 0); |
|
304 |
bool passMouseReleaseEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe); |
|
305 |
||
306 |
bool passSubframeEventToSubframe(MouseEventWithHitTestResults&, Frame* subframe, HitTestResult* hoveredNode = 0); |
|
307 |
||
308 |
bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&, Scrollbar*); |
|
309 |
||
310 |
bool passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&); |
|
311 |
bool passWidgetMouseDownEventToWidget(RenderWidget*); |
|
312 |
||
313 |
bool passMouseDownEventToWidget(Widget*); |
|
314 |
bool passWheelEventToWidget(PlatformWheelEvent&, Widget*); |
|
315 |
||
316 |
void defaultSpaceEventHandler(KeyboardEvent*); |
|
317 |
void defaultTabEventHandler(KeyboardEvent*); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
318 |
void defaultArrowEventHandler(FocusDirection, KeyboardEvent*); |
0 | 319 |
|
320 |
#if ENABLE(DRAG_SUPPORT) |
|
321 |
void allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const; |
|
322 |
#endif |
|
323 |
||
324 |
// The following are called at the beginning of handleMouseUp and handleDrag. |
|
325 |
// If they return true it indicates that they have consumed the event. |
|
326 |
bool eventLoopHandleMouseUp(const MouseEventWithHitTestResults&); |
|
327 |
#if ENABLE(DRAG_SUPPORT) |
|
328 |
bool eventLoopHandleMouseDragged(const MouseEventWithHitTestResults&); |
|
329 |
#endif |
|
330 |
||
331 |
bool invertSenseOfTabsToLinks(KeyboardEvent*) const; |
|
332 |
||
333 |
#if ENABLE(DRAG_SUPPORT) |
|
334 |
void updateSelectionForMouseDrag(Node* targetNode, const IntPoint& localPoint); |
|
335 |
#endif |
|
336 |
||
337 |
void updateLastScrollbarUnderMouse(Scrollbar*, bool); |
|
338 |
||
339 |
void setFrameWasScrolledByUser(); |
|
340 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
341 |
FocusDirection focusDirectionForKey(const AtomicString&) const; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
342 |
|
0 | 343 |
bool capturesDragging() const { return m_capturesDragging; } |
344 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
345 |
#if PLATFORM(MAC) && defined(__OBJC__) && !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE) |
0 | 346 |
NSView *mouseDownViewIfStillGood(); |
347 |
||
348 |
PlatformMouseEvent currentPlatformMouseEvent() const; |
|
349 |
#endif |
|
350 |
||
351 |
Frame* m_frame; |
|
352 |
||
353 |
bool m_mousePressed; |
|
354 |
bool m_capturesDragging; |
|
355 |
RefPtr<Node> m_mousePressNode; |
|
356 |
||
357 |
bool m_mouseDownMayStartSelect; |
|
358 |
#if ENABLE(DRAG_SUPPORT) |
|
359 |
bool m_mouseDownMayStartDrag; |
|
360 |
#endif |
|
361 |
bool m_mouseDownWasSingleClickInSelection; |
|
362 |
bool m_beganSelectingText; |
|
363 |
||
364 |
#if ENABLE(DRAG_SUPPORT) |
|
365 |
IntPoint m_dragStartPos; |
|
366 |
#endif |
|
367 |
||
368 |
IntPoint m_panScrollStartPos; |
|
369 |
bool m_panScrollInProgress; |
|
370 |
||
371 |
bool m_panScrollButtonPressed; |
|
372 |
bool m_springLoadedPanScrollInProgress; |
|
373 |
||
374 |
Timer<EventHandler> m_hoverTimer; |
|
375 |
||
376 |
Timer<EventHandler> m_autoscrollTimer; |
|
377 |
RenderObject* m_autoscrollRenderer; |
|
378 |
bool m_autoscrollInProgress; |
|
379 |
bool m_mouseDownMayStartAutoscroll; |
|
380 |
bool m_mouseDownWasInSubframe; |
|
381 |
||
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
382 |
Timer<EventHandler> m_fakeMouseMoveEventTimer; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
383 |
|
0 | 384 |
#if ENABLE(SVG) |
385 |
bool m_svgPan; |
|
386 |
RefPtr<SVGElementInstance> m_instanceUnderMouse; |
|
387 |
RefPtr<SVGElementInstance> m_lastInstanceUnderMouse; |
|
388 |
#endif |
|
389 |
||
390 |
RenderLayer* m_resizeLayer; |
|
391 |
||
392 |
RefPtr<Node> m_capturingMouseEventsNode; |
|
393 |
||
394 |
RefPtr<Node> m_nodeUnderMouse; |
|
395 |
RefPtr<Node> m_lastNodeUnderMouse; |
|
396 |
RefPtr<Frame> m_lastMouseMoveEventSubframe; |
|
397 |
RefPtr<Scrollbar> m_lastScrollbarUnderMouse; |
|
398 |
||
399 |
int m_clickCount; |
|
400 |
RefPtr<Node> m_clickNode; |
|
401 |
||
402 |
#if ENABLE(DRAG_SUPPORT) |
|
403 |
RefPtr<Node> m_dragTarget; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
404 |
bool m_shouldOnlyFireDragOverEvent; |
0 | 405 |
#endif |
406 |
||
407 |
RefPtr<HTMLFrameSetElement> m_frameSetBeingResized; |
|
408 |
||
409 |
IntSize m_offsetFromResizeCorner; // in the coords of m_resizeLayer |
|
410 |
||
411 |
IntPoint m_currentMousePosition; |
|
412 |
IntPoint m_mouseDownPos; // in our view's coords |
|
413 |
double m_mouseDownTimestamp; |
|
414 |
PlatformMouseEvent m_mouseDown; |
|
415 |
||
416 |
bool m_useLatchedWheelEventNode; |
|
417 |
RefPtr<Node> m_latchedWheelEventNode; |
|
418 |
bool m_widgetIsLatched; |
|
419 |
||
420 |
RefPtr<Node> m_previousWheelScrolledNode; |
|
421 |
||
422 |
#if PLATFORM(MAC) |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
423 |
#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE) |
0 | 424 |
NSView *m_mouseDownView; |
425 |
bool m_sendingEventToSubview; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
426 |
#endif |
0 | 427 |
int m_activationEventNumber; |
428 |
#endif |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
429 |
#if ENABLE(TOUCH_EVENTS) |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
430 |
typedef HashMap<int, RefPtr<EventTarget> > TouchTargetMap; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
431 |
TouchTargetMap m_originatingTouchPointTargets; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
432 |
#endif |
0 | 433 |
}; |
434 |
||
435 |
} // namespace WebCore |
|
436 |
||
437 |
#endif // EventHandler_h |