| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 const LayoutSize& padding = LayoutSize()); | 105 const LayoutSize& padding = LayoutSize()); |
| 106 | 106 |
| 107 bool mousePressed() const { return m_mousePressed; } | 107 bool mousePressed() const { return m_mousePressed; } |
| 108 void setMousePressed(bool pressed) { m_mousePressed = pressed; } | 108 void setMousePressed(bool pressed) { m_mousePressed = pressed; } |
| 109 | 109 |
| 110 void setCapturingMouseEventsNode(PassRefPtr<Node>); // A caller is responsib
le for resetting capturing node to 0. | 110 void setCapturingMouseEventsNode(PassRefPtr<Node>); // A caller is responsib
le for resetting capturing node to 0. |
| 111 | 111 |
| 112 void scheduleHoverStateUpdate(); | 112 void scheduleHoverStateUpdate(); |
| 113 void scheduleCursorUpdate(); | 113 void scheduleCursorUpdate(); |
| 114 | 114 |
| 115 void resizeScrollableAreaDestroyed(); | |
| 116 | |
| 117 IntPoint lastKnownMousePosition() const; | 115 IntPoint lastKnownMousePosition() const; |
| 118 Cursor currentMouseCursor() const { return m_currentMouseCursor; } | 116 Cursor currentMouseCursor() const { return m_currentMouseCursor; } |
| 119 | 117 |
| 120 // Attempts to scroll the DOM tree. If that fails, scrolls the view. | 118 // Attempts to scroll the DOM tree. If that fails, scrolls the view. |
| 121 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. | 119 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. |
| 122 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
0); | 120 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
0); |
| 123 | 121 |
| 124 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 122 bool handleMouseMoveEvent(const PlatformMouseEvent&); |
| 125 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 123 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
| 126 | 124 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void defaultTabEventHandler(KeyboardEvent*); | 256 void defaultTabEventHandler(KeyboardEvent*); |
| 259 | 257 |
| 260 void updateSelectionForMouseDrag(const HitTestResult&); | 258 void updateSelectionForMouseDrag(const HitTestResult&); |
| 261 | 259 |
| 262 void updateLastScrollbarUnderMouse(Scrollbar*, bool); | 260 void updateLastScrollbarUnderMouse(Scrollbar*, bool); |
| 263 | 261 |
| 264 bool capturesDragging() const { return m_capturesDragging; } | 262 bool capturesDragging() const { return m_capturesDragging; } |
| 265 | 263 |
| 266 bool handleGestureShowPress(); | 264 bool handleGestureShowPress(); |
| 267 | 265 |
| 268 bool handleScrollGestureOnResizer(Node*, const PlatformGestureEvent&); | |
| 269 | |
| 270 bool passScrollGestureEventToWidget(const PlatformGestureEvent&, RenderObjec
t*); | 266 bool passScrollGestureEventToWidget(const PlatformGestureEvent&, RenderObjec
t*); |
| 271 bool sendScrollEventToView(const PlatformGestureEvent&, const FloatSize&); | 267 bool sendScrollEventToView(const PlatformGestureEvent&, const FloatSize&); |
| 272 | 268 |
| 273 AutoscrollController* autoscrollController() const; | 269 AutoscrollController* autoscrollController() const; |
| 274 void setLastKnownMousePosition(const PlatformMouseEvent&); | 270 void setLastKnownMousePosition(const PlatformMouseEvent&); |
| 275 | 271 |
| 276 LocalFrame* const m_frame; | 272 LocalFrame* const m_frame; |
| 277 | 273 |
| 278 bool m_mousePressed; | 274 bool m_mousePressed; |
| 279 bool m_capturesDragging; | 275 bool m_capturesDragging; |
| 280 RefPtr<Node> m_mousePressNode; | 276 RefPtr<Node> m_mousePressNode; |
| 281 | 277 |
| 282 bool m_mouseDownMayStartSelect; | 278 bool m_mouseDownMayStartSelect; |
| 283 bool m_mouseDownMayStartDrag; | 279 bool m_mouseDownMayStartDrag; |
| 284 bool m_mouseDownWasSingleClickInSelection; | 280 bool m_mouseDownWasSingleClickInSelection; |
| 285 enum SelectionInitiationState { HaveNotStartedSelection, PlacedCaret, Extend
edSelection }; | 281 enum SelectionInitiationState { HaveNotStartedSelection, PlacedCaret, Extend
edSelection }; |
| 286 SelectionInitiationState m_selectionInitiationState; | 282 SelectionInitiationState m_selectionInitiationState; |
| 287 | 283 |
| 288 LayoutPoint m_dragStartPos; | 284 LayoutPoint m_dragStartPos; |
| 289 | 285 |
| 290 Timer<EventHandler> m_hoverTimer; | 286 Timer<EventHandler> m_hoverTimer; |
| 291 Timer<EventHandler> m_cursorUpdateTimer; | 287 Timer<EventHandler> m_cursorUpdateTimer; |
| 292 | 288 |
| 293 bool m_mouseDownMayStartAutoscroll; | 289 bool m_mouseDownMayStartAutoscroll; |
| 294 | 290 |
| 295 Timer<EventHandler> m_fakeMouseMoveEventTimer; | 291 Timer<EventHandler> m_fakeMouseMoveEventTimer; |
| 296 | 292 |
| 297 RenderLayerScrollableArea* m_resizeScrollableArea; | |
| 298 | |
| 299 RefPtr<Node> m_capturingMouseEventsNode; | 293 RefPtr<Node> m_capturingMouseEventsNode; |
| 300 bool m_eventHandlerWillResetCapturingMouseEventsNode; | 294 bool m_eventHandlerWillResetCapturingMouseEventsNode; |
| 301 | 295 |
| 302 RefPtr<Node> m_nodeUnderMouse; | 296 RefPtr<Node> m_nodeUnderMouse; |
| 303 RefPtr<Node> m_lastNodeUnderMouse; | 297 RefPtr<Node> m_lastNodeUnderMouse; |
| 304 RefPtr<Scrollbar> m_lastScrollbarUnderMouse; | 298 RefPtr<Scrollbar> m_lastScrollbarUnderMouse; |
| 305 Cursor m_currentMouseCursor; | 299 Cursor m_currentMouseCursor; |
| 306 | 300 |
| 307 int m_clickCount; | 301 int m_clickCount; |
| 308 RefPtr<Node> m_clickNode; | 302 RefPtr<Node> m_clickNode; |
| 309 | 303 |
| 310 RefPtr<Node> m_dragTarget; | 304 RefPtr<Node> m_dragTarget; |
| 311 bool m_shouldOnlyFireDragOverEvent; | 305 bool m_shouldOnlyFireDragOverEvent; |
| 312 | 306 |
| 313 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. | |
| 314 | |
| 315 bool m_mousePositionIsUnknown; | 307 bool m_mousePositionIsUnknown; |
| 316 IntPoint m_lastKnownMousePosition; | 308 IntPoint m_lastKnownMousePosition; |
| 317 IntPoint m_lastKnownMouseGlobalPosition; | 309 IntPoint m_lastKnownMouseGlobalPosition; |
| 318 IntPoint m_mouseDownPos; // In our view's coords. | 310 IntPoint m_mouseDownPos; // In our view's coords. |
| 319 double m_mouseDownTimestamp; | 311 double m_mouseDownTimestamp; |
| 320 PlatformMouseEvent m_mouseDown; | 312 PlatformMouseEvent m_mouseDown; |
| 321 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 313 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
| 322 | 314 |
| 323 RefPtr<Node> m_latchedWheelEventNode; | 315 RefPtr<Node> m_latchedWheelEventNode; |
| 324 bool m_widgetIsLatched; | 316 bool m_widgetIsLatched; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 344 bool m_didStartDrag; | 336 bool m_didStartDrag; |
| 345 | 337 |
| 346 Timer<EventHandler> m_activeIntervalTimer; | 338 Timer<EventHandler> m_activeIntervalTimer; |
| 347 double m_lastShowPressTimestamp; | 339 double m_lastShowPressTimestamp; |
| 348 RefPtr<Element> m_lastDeferredTapElement; | 340 RefPtr<Element> m_lastDeferredTapElement; |
| 349 }; | 341 }; |
| 350 | 342 |
| 351 } // namespace blink | 343 } // namespace blink |
| 352 | 344 |
| 353 #endif // EventHandler_h | 345 #endif // EventHandler_h |
| OLD | NEW |