| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement); | 119 void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement); |
| 120 | 120 |
| 121 void scheduleHoverStateUpdate(); | 121 void scheduleHoverStateUpdate(); |
| 122 void scheduleCursorUpdate(); | 122 void scheduleCursorUpdate(); |
| 123 | 123 |
| 124 void setResizingFrameSet(HTMLFrameSetElement*); | 124 void setResizingFrameSet(HTMLFrameSetElement*); |
| 125 | 125 |
| 126 void resizeScrollableAreaDestroyed(); | 126 void resizeScrollableAreaDestroyed(); |
| 127 | 127 |
| 128 IntPoint lastKnownMousePosition() const; | 128 IntPoint lastKnownMousePosition() const; |
| 129 Cursor currentMouseCursor() const { return m_currentMouseCursor; } | |
| 130 | 129 |
| 131 // Attempts to scroll the DOM tree. If that fails, scrolls the view. | 130 // Attempts to scroll the DOM tree. If that fails, scrolls the view. |
| 132 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. | 131 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. |
| 133 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); | 132 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); |
| 134 | 133 |
| 135 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 134 bool handleMouseMoveEvent(const PlatformMouseEvent&); |
| 136 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 135 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
| 137 | 136 |
| 138 bool handleMousePressEvent(const PlatformMouseEvent&); | 137 bool handleMousePressEvent(const PlatformMouseEvent&); |
| 139 bool handleMouseReleaseEvent(const PlatformMouseEvent&); | 138 bool handleMouseReleaseEvent(const PlatformMouseEvent&); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 337 |
| 339 bool m_mouseDownMayStartSelect; | 338 bool m_mouseDownMayStartSelect; |
| 340 bool m_mouseDownMayStartDrag; | 339 bool m_mouseDownMayStartDrag; |
| 341 bool m_mouseDownWasSingleClickInSelection; | 340 bool m_mouseDownWasSingleClickInSelection; |
| 342 enum SelectionInitiationState { HaveNotStartedSelection, PlacedCaret, Extend
edSelection }; | 341 enum SelectionInitiationState { HaveNotStartedSelection, PlacedCaret, Extend
edSelection }; |
| 343 SelectionInitiationState m_selectionInitiationState; | 342 SelectionInitiationState m_selectionInitiationState; |
| 344 | 343 |
| 345 LayoutPoint m_dragStartPos; | 344 LayoutPoint m_dragStartPos; |
| 346 | 345 |
| 347 Timer<EventHandler> m_hoverTimer; | 346 Timer<EventHandler> m_hoverTimer; |
| 347 |
| 348 // TODO(rbyers): Mouse cursor update is page-wide, not per-frame. Page-wide
state |
| 349 // should move out of EventHandler to a new PageEventHandler class. crbug.co
m/449649 |
| 348 Timer<EventHandler> m_cursorUpdateTimer; | 350 Timer<EventHandler> m_cursorUpdateTimer; |
| 349 | 351 |
| 350 bool m_mouseDownMayStartAutoscroll; | 352 bool m_mouseDownMayStartAutoscroll; |
| 351 | 353 |
| 352 Timer<EventHandler> m_fakeMouseMoveEventTimer; | 354 Timer<EventHandler> m_fakeMouseMoveEventTimer; |
| 353 | 355 |
| 354 bool m_svgPan; | 356 bool m_svgPan; |
| 355 | 357 |
| 356 DeprecatedPaintLayerScrollableArea* m_resizeScrollableArea; | 358 DeprecatedPaintLayerScrollableArea* m_resizeScrollableArea; |
| 357 | 359 |
| 358 RefPtrWillBeMember<Node> m_capturingMouseEventsNode; | 360 RefPtrWillBeMember<Node> m_capturingMouseEventsNode; |
| 359 bool m_eventHandlerWillResetCapturingMouseEventsNode; | 361 bool m_eventHandlerWillResetCapturingMouseEventsNode; |
| 360 | 362 |
| 361 RefPtrWillBeMember<Node> m_nodeUnderMouse; | 363 RefPtrWillBeMember<Node> m_nodeUnderMouse; |
| 362 RefPtrWillBeMember<Node> m_lastNodeUnderMouse; | 364 RefPtrWillBeMember<Node> m_lastNodeUnderMouse; |
| 363 RefPtrWillBeMember<LocalFrame> m_lastMouseMoveEventSubframe; | 365 RefPtrWillBeMember<LocalFrame> m_lastMouseMoveEventSubframe; |
| 364 RefPtrWillBeMember<Scrollbar> m_lastScrollbarUnderMouse; | 366 RefPtrWillBeMember<Scrollbar> m_lastScrollbarUnderMouse; |
| 365 Cursor m_currentMouseCursor; | |
| 366 | 367 |
| 367 int m_clickCount; | 368 int m_clickCount; |
| 368 RefPtrWillBeMember<Node> m_clickNode; | 369 RefPtrWillBeMember<Node> m_clickNode; |
| 369 | 370 |
| 370 RefPtrWillBeMember<Node> m_dragTarget; | 371 RefPtrWillBeMember<Node> m_dragTarget; |
| 371 bool m_shouldOnlyFireDragOverEvent; | 372 bool m_shouldOnlyFireDragOverEvent; |
| 372 | 373 |
| 373 RefPtrWillBeMember<HTMLFrameSetElement> m_frameSetBeingResized; | 374 RefPtrWillBeMember<HTMLFrameSetElement> m_frameSetBeingResized; |
| 374 | 375 |
| 375 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. | 376 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. |
| 376 | 377 |
| 377 bool m_mousePositionIsUnknown; | 378 bool m_mousePositionIsUnknown; |
| 379 // The last mouse movement position this frame has seen in root frame coordi
nates. |
| 378 IntPoint m_lastKnownMousePosition; | 380 IntPoint m_lastKnownMousePosition; |
| 379 IntPoint m_lastKnownMouseGlobalPosition; | 381 IntPoint m_lastKnownMouseGlobalPosition; |
| 380 IntPoint m_mouseDownPos; // In our view's coords. | 382 IntPoint m_mouseDownPos; // In our view's coords. |
| 381 double m_mouseDownTimestamp; | 383 double m_mouseDownTimestamp; |
| 382 PlatformMouseEvent m_mouseDown; | 384 PlatformMouseEvent m_mouseDown; |
| 383 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 385 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
| 384 | 386 |
| 385 RefPtrWillBeMember<Node> m_latchedWheelEventNode; | 387 RefPtrWillBeMember<Node> m_latchedWheelEventNode; |
| 386 bool m_widgetIsLatched; | 388 bool m_widgetIsLatched; |
| 387 | 389 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // scroll sequence in this frame, or any child frames. Only used | 422 // scroll sequence in this frame, or any child frames. Only used |
| 421 // with ScrollCustomization. If some delta has been consumed, a | 423 // with ScrollCustomization. If some delta has been consumed, a |
| 422 // scroll which shouldn't propagate can't cause any element to | 424 // scroll which shouldn't propagate can't cause any element to |
| 423 // scroll other than the |m_previousGestureScrolledNode|. | 425 // scroll other than the |m_previousGestureScrolledNode|. |
| 424 bool m_deltaConsumedForScrollSequence; | 426 bool m_deltaConsumedForScrollSequence; |
| 425 }; | 427 }; |
| 426 | 428 |
| 427 } // namespace blink | 429 } // namespace blink |
| 428 | 430 |
| 429 #endif // EventHandler_h | 431 #endif // EventHandler_h |
| OLD | NEW |