Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 2141993003: PointerEvents for long-press: fix double firing & canceling MEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 IntPoint dragDataTransferLocationForTesting(); 140 IntPoint dragDataTransferLocationForTesting();
141 141
142 // Performs a logical scroll that chains, crossing frames, starting from 142 // Performs a logical scroll that chains, crossing frames, starting from
143 // the given node or a reasonable default (focus/last clicked). 143 // the given node or a reasonable default (focus/last clicked).
144 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode = nullptr); 144 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode = nullptr);
145 145
146 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&); 146 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&);
147 void handleMouseLeaveEvent(const PlatformMouseEvent&); 147 void handleMouseLeaveEvent(const PlatformMouseEvent&);
148 148
149 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&); 149 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&, const b ool synthesizedFromTouch = false);
Rick Byers 2016/07/14 14:27:10 PlatformMouseEvent already has a fromTouch() prope
mustaq 2016/07/18 20:50:15 Done.
150 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&); 150 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&);
151 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&); 151 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&);
152 152
153 // Called on the local root frame exactly once per gesture event. 153 // Called on the local root frame exactly once per gesture event.
154 WebInputEventResult handleGestureEvent(const PlatformGestureEvent&); 154 WebInputEventResult handleGestureEvent(const PlatformGestureEvent&);
155 WebInputEventResult handleGestureEvent(const GestureEventWithHitTestResults& ); 155 WebInputEventResult handleGestureEvent(const GestureEventWithHitTestResults& );
156 156
157 // Clear the old hover/active state within frames before moving the hover st ate to the another frame 157 // Clear the old hover/active state within frames before moving the hover st ate to the another frame
158 void updateGestureHoverActiveState(const HitTestRequest&, Element*); 158 void updateGestureHoverActiveState(const HitTestRequest&, Element*);
159 159
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 bool isCursorVisible() const; 267 bool isCursorVisible() const;
268 void updateCursor(); 268 void updateCursor();
269 269
270 ScrollableArea* associatedScrollableArea(const PaintLayer*) const; 270 ScrollableArea* associatedScrollableArea(const PaintLayer*) const;
271 271
272 void invalidateClick(); 272 void invalidateClick();
273 273
274 Node* updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); 274 Node* updateMouseEventTargetNode(Node*, const PlatformMouseEvent&);
275 void updateMouseEventTargetNodeAndSendEvents(Node*, const PlatformMouseEvent &, bool isFrameBoundaryTransition = false); 275 void updateMouseEventTargetNodeAndSendEvents(Node*, const PlatformMouseEvent &, bool isFrameBoundaryTransition = false);
276 276
277
278 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const PlatformMouseEvent&); 277 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const PlatformMouseEvent&);
279 278
280 WebInputEventResult dispatchMouseEvent(const AtomicString& eventType, Node* target, int clickCount, const PlatformMouseEvent&); 279 WebInputEventResult dispatchMouseEvent(const AtomicString& eventType, Node* target, int clickCount, const PlatformMouseEvent&);
281 280
282 // Dispatches ME after corresponding PE provided the PE has not been cancele d. The eventType arg 281 // Dispatches ME after corresponding PE provided the PE has not been cancele d. The eventType arg
283 // must be a mouse event that can be gated though a preventDefaulted pointer down (i.e., one of 282 // must be a mouse event that can be gated though a preventDefaulted pointer down (i.e., one of
284 // {mousedown, mousemove, mouseup}). 283 // {mousedown, mousemove, mouseup}).
285 // TODO(mustaq): Can we avoid the clickCount param, instead use PlatformMous eEvent's count? 284 // TODO(mustaq): Can we avoid the clickCount param, instead use PlatformMous eEvent's count?
286 // Same applied to dispatchMouseEvent() above. 285 // Same applied to dispatchMouseEvent() above.
287 WebInputEventResult updatePointerTargetAndDispatchEvents(const AtomicString& mouseEventType, Node* target, 286 WebInputEventResult updatePointerTargetAndDispatchEvents(const AtomicString& mouseEventType, Node* target,
288 int clickCount, const PlatformMouseEvent&); 287 int clickCount, const PlatformMouseEvent&, const bool synthesizedFromTou ch = false);
Rick Byers 2016/07/14 14:27:10 ditto
mustaq 2016/07/18 20:50:15 Done.
289 288
290 WebInputEventResult dispatchDragEvent(const AtomicString& eventType, Node* t arget, const PlatformMouseEvent&, DataTransfer*); 289 WebInputEventResult dispatchDragEvent(const AtomicString& eventType, Node* t arget, const PlatformMouseEvent&, DataTransfer*);
291 290
292 void clearDragDataTransfer(); 291 void clearDragDataTransfer();
293 292
294 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); 293 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator);
295 bool tryStartDrag(const MouseEventWithHitTestResults&); 294 bool tryStartDrag(const MouseEventWithHitTestResults&);
296 295
297 // Clears drag target and related states. It is called when drag is done or canceled. 296 // Clears drag target and related states. It is called when drag is done or canceled.
298 void clearDragState(); 297 void clearDragState();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 402
404 // Set on GestureTapDown if the |pointerdown| event corresponding to the 403 // Set on GestureTapDown if the |pointerdown| event corresponding to the
405 // triggering |touchstart| event was canceled. This suppresses mouse event 404 // triggering |touchstart| event was canceled. This suppresses mouse event
406 // firing for the current gesture sequence (i.e. until next GestureTapDown). 405 // firing for the current gesture sequence (i.e. until next GestureTapDown).
407 bool m_suppressMouseEventsFromGestures; 406 bool m_suppressMouseEventsFromGestures;
408 }; 407 };
409 408
410 } // namespace blink 409 } // namespace blink
411 410
412 #endif // EventHandler_h 411 #endif // EventHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698