diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/input/gesture_manager.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/input/gesture_manager.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/chromium/third_party/blink/renderer/core/input/gesture_manager.h b/chromium/third_party/blink/renderer/core/input/gesture_manager.h index 87874be9871..523b2b0e80d 100644 --- a/chromium/third_party/blink/renderer/core/input/gesture_manager.h +++ b/chromium/third_party/blink/renderer/core/input/gesture_manager.h @@ -10,6 +10,7 @@ #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/layout/hit_test_request.h" #include "third_party/blink/renderer/core/page/event_with_hit_test_results.h" +#include "third_party/blink/renderer/platform/wtf/deque.h" namespace blink { @@ -19,6 +20,7 @@ class ScrollManager; class SelectionController; class PointerEventManager; class MouseEventManager; +class WebPointerEvent; // This class takes care of gestures and delegating the action based on the // gesture to the responsible class. @@ -55,12 +57,11 @@ class CORE_EXPORT GestureManager final // position. void SendContextMenuEventTouchDragEnd(const WebMouseEvent&); - // Used by PointerEventManager to notify GestureManager when a pointerdown - // pointerevent is dispatched. GestureManager is interested in knowing - // the pointerId of pointerdown event because it uses this pointer id - // to populate the pointerId for click and auxclick pointer events it - // generates. - void NotifyCurrentPointerDownId(PointerId pointer_id); + // Gesture Manager receives notification when Pointer Events are dispatched. + // GestureManager is interested in knowing the pointerId of pointerdown + // event because it uses this pointer id to populate the pointerId for + // click and auxclick pointer events it generates. + void NotifyPointerEventHandled(const WebPointerEvent& web_pointer_event); private: WebInputEventResult HandleGestureShowPress(); @@ -101,9 +102,15 @@ class CORE_EXPORT GestureManager final gfx::PointF long_press_position_in_root_frame_; - // The pointerId remapped by PointerEventFactory for the pointer event - // stream that generated the last pointerdown event - PointerId last_pointerdown_event_pointer_id_; + // Pair of the unique_touch_id for the first gesture in the sequence and + // the pointerId associated. + using TouchIdPointerId = std::pair<uint32_t, PointerId>; + // The mapping between unique_touch_event_id for tap down and pointer Id + // for pointerdown. We will keep the pointerId for a pointerevents sequence + // until we know that the pointerevents will not turn into gestures anymore. + // We will not keep track of the mapping for unique_touch_event_id = 0 + // (unknown id) which will be the case for mouse pointer events for example. + Deque<TouchIdPointerId> recent_pointerdown_pointer_ids_; const Member<SelectionController> selection_controller_; }; |