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 2510133002: Add getCoalescedEvents API to PointerEvent (Closed)
Patch Set: rebase Created 4 years 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 IntPoint lastKnownMousePosition() const; 134 IntPoint lastKnownMousePosition() const;
135 135
136 IntPoint dragDataTransferLocationForTesting(); 136 IntPoint dragDataTransferLocationForTesting();
137 137
138 // Performs a logical scroll that chains, crossing frames, starting from 138 // Performs a logical scroll that chains, crossing frames, starting from
139 // the given node or a reasonable default (focus/last clicked). 139 // the given node or a reasonable default (focus/last clicked).
140 bool bubblingScroll(ScrollDirection, 140 bool bubblingScroll(ScrollDirection,
141 ScrollGranularity, 141 ScrollGranularity,
142 Node* startingNode = nullptr); 142 Node* startingNode = nullptr);
143 143
144 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&); 144 WebInputEventResult handleMouseMoveEvent(
145 const PlatformMouseEvent&,
146 const Vector<PlatformMouseEvent>& coalescedEvents);
145 void handleMouseLeaveEvent(const PlatformMouseEvent&); 147 void handleMouseLeaveEvent(const PlatformMouseEvent&);
146 148
147 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&); 149 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&);
148 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&); 150 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&);
149 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&); 151 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&);
150 152
151 // Called on the local root frame exactly once per gesture event. 153 // Called on the local root frame exactly once per gesture event.
152 WebInputEventResult handleGestureEvent(const PlatformGestureEvent&); 154 WebInputEventResult handleGestureEvent(const PlatformGestureEvent&);
153 WebInputEventResult handleGestureEvent(const GestureEventWithHitTestResults&); 155 WebInputEventResult handleGestureEvent(const GestureEventWithHitTestResults&);
154 156
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 216
215 bool handleTextInputEvent(const String& text, 217 bool handleTextInputEvent(const String& text,
216 Event* underlyingEvent = nullptr, 218 Event* underlyingEvent = nullptr,
217 TextEventInputType = TextEventInputKeyboard); 219 TextEventInputType = TextEventInputKeyboard);
218 void defaultTextInputEventHandler(TextEvent*); 220 void defaultTextInputEventHandler(TextEvent*);
219 221
220 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); 222 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation);
221 223
222 void capsLockStateMayHaveChanged(); // Only called by FrameSelection 224 void capsLockStateMayHaveChanged(); // Only called by FrameSelection
223 225
224 WebInputEventResult handleTouchEvent(const PlatformTouchEvent&); 226 WebInputEventResult handleTouchEvent(
227 const PlatformTouchEvent&,
228 const Vector<PlatformTouchEvent>& coalescedEvents);
225 229
226 bool useHandCursor(Node*, bool isOverLink); 230 bool useHandCursor(Node*, bool isOverLink);
227 231
228 void notifyElementActivated(); 232 void notifyElementActivated();
229 233
230 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { 234 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() {
231 return m_lastMouseDownUserGestureToken.release(); 235 return m_lastMouseDownUserGestureToken.release();
232 } 236 }
233 237
234 SelectionController& selectionController() const { 238 SelectionController& selectionController() const {
(...skipping 15 matching lines...) Expand all
250 // If not, use the current focus or last clicked node. 254 // If not, use the current focus or last clicked node.
251 bool logicalScroll(ScrollDirection, 255 bool logicalScroll(ScrollDirection,
252 ScrollGranularity, 256 ScrollGranularity,
253 Node* startNode = nullptr); 257 Node* startNode = nullptr);
254 258
255 bool isTouchPointerIdActiveOnFrame(int, LocalFrame*) const; 259 bool isTouchPointerIdActiveOnFrame(int, LocalFrame*) const;
256 260
257 private: 261 private:
258 WebInputEventResult handleMouseMoveOrLeaveEvent( 262 WebInputEventResult handleMouseMoveOrLeaveEvent(
259 const PlatformMouseEvent&, 263 const PlatformMouseEvent&,
264 const Vector<PlatformMouseEvent>&,
260 HitTestResult* hoveredNode = nullptr, 265 HitTestResult* hoveredNode = nullptr,
261 bool onlyUpdateScrollbars = false, 266 bool onlyUpdateScrollbars = false,
262 bool forceLeave = false); 267 bool forceLeave = false);
263 268
264 HitTestRequest::HitTestRequestType getHitTypeForGestureType( 269 HitTestRequest::HitTestRequestType getHitTypeForGestureType(
265 PlatformEvent::EventType); 270 PlatformEvent::EventType);
266 void applyTouchAdjustment(PlatformGestureEvent*, HitTestResult*); 271 void applyTouchAdjustment(PlatformGestureEvent*, HitTestResult*);
267 WebInputEventResult handleGestureTapDown( 272 WebInputEventResult handleGestureTapDown(
268 const GestureEventWithHitTestResults&); 273 const GestureEventWithHitTestResults&);
269 WebInputEventResult handleGestureTap(const GestureEventWithHitTestResults&); 274 WebInputEventResult handleGestureTap(const GestureEventWithHitTestResults&);
(...skipping 25 matching lines...) Expand all
295 // Dispatches ME after corresponding PE provided the PE has not been canceled. 300 // Dispatches ME after corresponding PE provided the PE has not been canceled.
296 // The eventType arg must be a mouse event that can be gated though a 301 // The eventType arg must be a mouse event that can be gated though a
297 // preventDefaulted pointerdown (i.e., one of 302 // preventDefaulted pointerdown (i.e., one of
298 // {mousedown, mousemove, mouseup}). 303 // {mousedown, mousemove, mouseup}).
299 // TODO(mustaq): Can we avoid the clickCount param, instead use 304 // TODO(mustaq): Can we avoid the clickCount param, instead use
300 // PlatformMouseEvent's count? 305 // PlatformMouseEvent's count?
301 // Same applied to dispatchMouseEvent() above. 306 // Same applied to dispatchMouseEvent() above.
302 WebInputEventResult updatePointerTargetAndDispatchEvents( 307 WebInputEventResult updatePointerTargetAndDispatchEvents(
303 const AtomicString& mouseEventType, 308 const AtomicString& mouseEventType,
304 Node* target, 309 Node* target,
305 const PlatformMouseEvent&); 310 const PlatformMouseEvent&,
311 const Vector<PlatformMouseEvent>& coalescedEvents);
306 312
307 // Clears drag target and related states. It is called when drag is done or 313 // Clears drag target and related states. It is called when drag is done or
308 // canceled. 314 // canceled.
309 void clearDragState(); 315 void clearDragState();
310 316
311 WebInputEventResult passMousePressEventToSubframe( 317 WebInputEventResult passMousePressEventToSubframe(
312 MouseEventWithHitTestResults&, 318 MouseEventWithHitTestResults&,
313 LocalFrame* subframe); 319 LocalFrame* subframe);
314 WebInputEventResult passMouseMoveEventToSubframe( 320 WebInputEventResult passMouseMoveEventToSubframe(
315 MouseEventWithHitTestResults&, 321 MouseEventWithHitTestResults&,
322 const Vector<PlatformMouseEvent>&,
316 LocalFrame* subframe, 323 LocalFrame* subframe,
317 HitTestResult* hoveredNode = nullptr); 324 HitTestResult* hoveredNode = nullptr);
318 WebInputEventResult passMouseReleaseEventToSubframe( 325 WebInputEventResult passMouseReleaseEventToSubframe(
319 MouseEventWithHitTestResults&, 326 MouseEventWithHitTestResults&,
320 LocalFrame* subframe); 327 LocalFrame* subframe);
321 328
322 bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&); 329 bool passMousePressEventToScrollbar(MouseEventWithHitTestResults&);
323 330
324 void defaultSpaceEventHandler(KeyboardEvent*); 331 void defaultSpaceEventHandler(KeyboardEvent*);
325 void defaultBackspaceEventHandler(KeyboardEvent*); 332 void defaultBackspaceEventHandler(KeyboardEvent*);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 387
381 // Set on GestureTapDown if the |pointerdown| event corresponding to the 388 // Set on GestureTapDown if the |pointerdown| event corresponding to the
382 // triggering |touchstart| event was canceled. This suppresses mouse event 389 // triggering |touchstart| event was canceled. This suppresses mouse event
383 // firing for the current gesture sequence (i.e. until next GestureTapDown). 390 // firing for the current gesture sequence (i.e. until next GestureTapDown).
384 bool m_suppressMouseEventsFromGestures; 391 bool m_suppressMouseEventsFromGestures;
385 }; 392 };
386 393
387 } // namespace blink 394 } // namespace blink
388 395
389 #endif // EventHandler_h 396 #endif // EventHandler_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerEventInit.idl ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698