| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 class PaintLayerScrollableArea; | 57 class PaintLayerScrollableArea; |
| 58 class Document; | 58 class Document; |
| 59 class DragState; | 59 class DragState; |
| 60 class Element; | 60 class Element; |
| 61 class Event; | 61 class Event; |
| 62 class EventTarget; | 62 class EventTarget; |
| 63 template <typename EventType> | 63 template <typename EventType> |
| 64 class EventWithHitTestResults; | 64 class EventWithHitTestResults; |
| 65 class FloatPoint; | 65 class FloatPoint; |
| 66 class FloatQuad; | 66 class FloatQuad; |
| 67 class FrameHost; |
| 67 class HTMLFrameSetElement; | 68 class HTMLFrameSetElement; |
| 68 class HitTestRequest; | 69 class HitTestRequest; |
| 69 class HitTestResult; | 70 class HitTestResult; |
| 70 class KeyboardEvent; | 71 class KeyboardEvent; |
| 71 class LayoutObject; | 72 class LayoutObject; |
| 72 class LocalFrame; | 73 class LocalFrame; |
| 73 class Node; | 74 class Node; |
| 74 class OptionalCursor; | 75 class OptionalCursor; |
| 75 class PlatformGestureEvent; | 76 class PlatformGestureEvent; |
| 76 class PlatformKeyboardEvent; | 77 class PlatformKeyboardEvent; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 PlatformTouchPoint point; | 234 PlatformTouchPoint point; |
| 234 Member<EventTarget> touchTarget; | 235 Member<EventTarget> touchTarget; |
| 235 Member<LocalFrame> targetFrame; | 236 Member<LocalFrame> targetFrame; |
| 236 FloatPoint adjustedPagePoint; | 237 FloatPoint adjustedPagePoint; |
| 237 FloatSize adjustedRadius; | 238 FloatSize adjustedRadius; |
| 238 bool knownTarget; | 239 bool knownTarget; |
| 239 bool consumed; | 240 bool consumed; |
| 240 String region; | 241 String region; |
| 241 }; | 242 }; |
| 242 | 243 |
| 243 // TODO(bokan): This seems like it no longer belongs here. | |
| 244 void handleOverscroll(const ScrollResult&, const FloatPoint& positionInRootF
rame = FloatPoint(), const FloatSize& velocity = FloatSize()); | |
| 245 | |
| 246 private: | 244 private: |
| 247 static DragState& dragState(); | 245 static DragState& dragState(); |
| 248 | 246 |
| 249 DataTransfer* createDraggingDataTransfer() const; | 247 DataTransfer* createDraggingDataTransfer() const; |
| 250 | 248 |
| 251 WebInputEventResult handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, H
itTestResult* hoveredNode = nullptr, bool onlyUpdateScrollbars = false, bool for
ceLeave = false); | 249 WebInputEventResult handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, H
itTestResult* hoveredNode = nullptr, bool onlyUpdateScrollbars = false, bool for
ceLeave = false); |
| 252 WebInputEventResult handleMousePressEvent(const MouseEventWithHitTestResults
&); | 250 WebInputEventResult handleMousePressEvent(const MouseEventWithHitTestResults
&); |
| 253 WebInputEventResult handleMouseFocus(const MouseEventWithHitTestResults&, In
putDeviceCapabilities* sourceCapabilities); | 251 WebInputEventResult handleMouseFocus(const MouseEventWithHitTestResults&, In
putDeviceCapabilities* sourceCapabilities); |
| 254 WebInputEventResult handleMouseDraggedEvent(const MouseEventWithHitTestResul
ts&); | 252 WebInputEventResult handleMouseDraggedEvent(const MouseEventWithHitTestResul
ts&); |
| 255 WebInputEventResult handleMouseReleaseEvent(const MouseEventWithHitTestResul
ts&); | 253 WebInputEventResult handleMouseReleaseEvent(const MouseEventWithHitTestResul
ts&); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 // most recently clicked node, falling back to the frame. | 309 // most recently clicked node, falling back to the frame. |
| 312 // Returns true if the scroll was consumed. | 310 // Returns true if the scroll was consumed. |
| 313 // direction - The logical direction to scroll in. This will be converted to | 311 // direction - The logical direction to scroll in. This will be converted to |
| 314 // a physical direction for each LayoutBox we try to scroll | 312 // a physical direction for each LayoutBox we try to scroll |
| 315 // based on that box's writing mode. | 313 // based on that box's writing mode. |
| 316 // granularity - The units that the scroll delta parameter is in. | 314 // granularity - The units that the scroll delta parameter is in. |
| 317 // startNode - Optional. If provided, start chaining from the given node. | 315 // startNode - Optional. If provided, start chaining from the given node. |
| 318 // If not, use the current focus or last clicked node. | 316 // If not, use the current focus or last clicked node. |
| 319 bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nul
lptr); | 317 bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nul
lptr); |
| 320 | 318 |
| 321 void resetOverscroll(bool didScrollX, bool didScrollY); | |
| 322 | |
| 323 ScrollResult scrollBox( | 319 ScrollResult scrollBox( |
| 324 LayoutBox*, | 320 LayoutBox*, |
| 325 ScrollGranularity, | 321 ScrollGranularity, |
| 326 const FloatSize& delta, | 322 const FloatSize& delta, |
| 327 const FloatPoint& position, | 323 const FloatPoint& position, |
| 328 const FloatSize& velocity, | 324 const FloatSize& velocity, |
| 329 bool* wasRootScroller); | 325 bool* wasRootScroller); |
| 330 | 326 |
| 331 bool isRootScroller(const Node&) const; | 327 bool isRootScroller(const Node&) const; |
| 332 void customizedScroll(const Node& startNode, ScrollState&); | 328 void customizedScroll(const Node& startNode, ScrollState&); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 391 |
| 396 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, | 392 // If the given element is a shadow host and its root has delegatesFocus=fal
se flag, |
| 397 // slide focus to its inner element. Returns true if the resulting focus is
different from | 393 // slide focus to its inner element. Returns true if the resulting focus is
different from |
| 398 // the given element. | 394 // the given element. |
| 399 bool slideFocusOnShadowHostIfNecessary(const Element&); | 395 bool slideFocusOnShadowHostIfNecessary(const Element&); |
| 400 | 396 |
| 401 void dispatchPointerEvents(const PlatformTouchEvent&, HeapVector<TouchInfo>&
); | 397 void dispatchPointerEvents(const PlatformTouchEvent&, HeapVector<TouchInfo>&
); |
| 402 | 398 |
| 403 WebInputEventResult dispatchTouchEvents(const PlatformTouchEvent&, HeapVecto
r<TouchInfo>&, bool); | 399 WebInputEventResult dispatchTouchEvents(const PlatformTouchEvent&, HeapVecto
r<TouchInfo>&, bool); |
| 404 | 400 |
| 401 FrameHost* frameHost(); |
| 402 |
| 405 // NOTE: If adding a new field to this class please ensure that it is | 403 // NOTE: If adding a new field to this class please ensure that it is |
| 406 // cleared in |EventHandler::clear()|. | 404 // cleared in |EventHandler::clear()|. |
| 407 | 405 |
| 408 const Member<LocalFrame> m_frame; | 406 const Member<LocalFrame> m_frame; |
| 409 | 407 |
| 410 // Current button-press state for mouse/mouse-like-stylus. | 408 // Current button-press state for mouse/mouse-like-stylus. |
| 411 // TODO(crbug.com/563676): Buggy for chorded buttons. | 409 // TODO(crbug.com/563676): Buggy for chorded buttons. |
| 412 bool m_mousePressed; | 410 bool m_mousePressed; |
| 413 | 411 |
| 414 bool m_capturesDragging; | 412 bool m_capturesDragging; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 445 int m_clickCount; | 443 int m_clickCount; |
| 446 Member<Node> m_clickNode; | 444 Member<Node> m_clickNode; |
| 447 | 445 |
| 448 Member<Node> m_dragTarget; | 446 Member<Node> m_dragTarget; |
| 449 bool m_shouldOnlyFireDragOverEvent; | 447 bool m_shouldOnlyFireDragOverEvent; |
| 450 | 448 |
| 451 Member<HTMLFrameSetElement> m_frameSetBeingResized; | 449 Member<HTMLFrameSetElement> m_frameSetBeingResized; |
| 452 | 450 |
| 453 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. | 451 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. |
| 454 | 452 |
| 455 FloatSize m_accumulatedRootOverscroll; | |
| 456 | |
| 457 bool m_mousePositionIsUnknown; | 453 bool m_mousePositionIsUnknown; |
| 458 // The last mouse movement position this frame has seen in root frame coordi
nates. | 454 // The last mouse movement position this frame has seen in root frame coordi
nates. |
| 459 IntPoint m_lastKnownMousePosition; | 455 IntPoint m_lastKnownMousePosition; |
| 460 IntPoint m_lastKnownMouseGlobalPosition; | 456 IntPoint m_lastKnownMouseGlobalPosition; |
| 461 IntPoint m_mouseDownPos; // In our view's coords. | 457 IntPoint m_mouseDownPos; // In our view's coords. |
| 462 double m_mouseDownTimestamp; | 458 double m_mouseDownTimestamp; |
| 463 PlatformMouseEvent m_mouseDown; | 459 PlatformMouseEvent m_mouseDown; |
| 464 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 460 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
| 465 | 461 |
| 466 // The target of each active touch point indexed by the touch ID. | 462 // The target of each active touch point indexed by the touch ID. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 // scroll which shouldn't propagate can't cause any element to | 498 // scroll which shouldn't propagate can't cause any element to |
| 503 // scroll other than the |m_previousGestureScrolledNode|. | 499 // scroll other than the |m_previousGestureScrolledNode|. |
| 504 bool m_deltaConsumedForScrollSequence; | 500 bool m_deltaConsumedForScrollSequence; |
| 505 }; | 501 }; |
| 506 | 502 |
| 507 } // namespace blink | 503 } // namespace blink |
| 508 | 504 |
| 509 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); | 505 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); |
| 510 | 506 |
| 511 #endif // EventHandler_h | 507 #endif // EventHandler_h |
| OLD | NEW |