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

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

Issue 1968653005: Set width=height=1 of mouse like pointer events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PointerEventManager_h 5 #ifndef PointerEventManager_h
6 #define PointerEventManager_h 6 #define PointerEventManager_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/events/PointerEvent.h" 9 #include "core/events/PointerEvent.h"
10 #include "core/events/PointerEventFactory.h" 10 #include "core/events/PointerEventFactory.h"
(...skipping 19 matching lines...) Expand all
30 WebInputEventResult sendMousePointerEvent( 30 WebInputEventResult sendMousePointerEvent(
31 Node*, const AtomicString& type, 31 Node*, const AtomicString& type,
32 int clickCount, const PlatformMouseEvent&, 32 int clickCount, const PlatformMouseEvent&,
33 Node* relatedTarget, 33 Node* relatedTarget,
34 AbstractView*, 34 AbstractView*,
35 Node* lastNodeUnderMouse); 35 Node* lastNodeUnderMouse);
36 36
37 WebInputEventResult handleTouchEvents( 37 WebInputEventResult handleTouchEvents(
38 const PlatformTouchEvent&); 38 const PlatformTouchEvent&);
39 39
40 // Sends node transition events mouseout/leave/over/enter to the 40 // Sends boundary events mouseout/leave/over/enter to the
41 // corresponding targets. This function sends pointerout/leave/over/enter 41 // corresponding targets. This function sends pointerout/leave/over/enter
42 // only when isFrameBoundaryTransition is true which indicates the 42 // only when isFrameBoundaryTransition is true which indicates the
43 // transition is over the document boundary and not only the elements border 43 // transition is over the document boundary and not only the elements border
44 // inside the document. If isFrameBoundaryTransition is false, 44 // inside the document. If isFrameBoundaryTransition is false,
45 // then the event is a compatibility event like those created by touch 45 // then the event is a compatibility event like those created by touch
46 // and in that case the corresponding pointer events will be handled by 46 // and in that case the corresponding pointer events will be handled by
47 // sendTouchPointerEvent for example and there is no need to send pointer 47 // sendTouchPointerEvent for example and there is no need to send pointer
48 // transition events. Note that normal mouse events (e.g. mousemove/down/up) 48 // boundary events. Note that normal mouse events (e.g. mousemove/down/up)
49 // and their corresponding transition events will be handled altogether by 49 // and their corresponding boundary events will be handled altogether by
50 // sendMousePointerEvent function. 50 // sendMousePointerEvent function.
51 void sendMouseAndPossiblyPointerNodeTransitionEvents( 51 void sendMouseAndPossiblyPointerBoundaryEvents(
52 Node* exitedNode, 52 Node* exitedNode,
53 Node* enteredNode, 53 Node* enteredNode,
54 const PlatformMouseEvent&, 54 const PlatformMouseEvent&,
55 AbstractView*, bool isFrameBoundaryTransition); 55 AbstractView*, bool isFrameBoundaryTransition);
56 56
57 // Resets the internal state of this object. 57 // Resets the internal state of this object.
58 void clear(); 58 void clear();
59 59
60 void elementRemoved(EventTarget*); 60 void elementRemoved(EventTarget*);
61 void setPointerCapture(int, EventTarget*); 61 void setPointerCapture(int, EventTarget*);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // Sends touch pointer events and sets consumed bits in TouchInfo array 98 // Sends touch pointer events and sets consumed bits in TouchInfo array
99 // based on the return value of pointer event handlers. 99 // based on the return value of pointer event handlers.
100 void dispatchTouchPointerEvents( 100 void dispatchTouchPointerEvents(
101 const PlatformTouchEvent&, 101 const PlatformTouchEvent&,
102 HeapVector<TouchEventManager::TouchInfo>&); 102 HeapVector<TouchEventManager::TouchInfo>&);
103 103
104 // Returns whether the event is consumed or not. 104 // Returns whether the event is consumed or not.
105 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*); 105 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*);
106 106
107 void sendNodeTransitionEvents( 107 void sendBoundaryEvents(
108 EventTarget* exitedTarget, 108 EventTarget* exitedTarget,
109 EventTarget* enteredTarget, 109 EventTarget* enteredTarget,
110 PointerEvent*, 110 PointerEvent*,
111 const PlatformMouseEvent& = PlatformMouseEvent(), 111 const PlatformMouseEvent& = PlatformMouseEvent(),
112 bool sendMouseEvent = false); 112 bool sendMouseEvent = false);
113 void setNodeUnderPointer(PointerEvent*, 113 void setNodeUnderPointer(PointerEvent*,
114 EventTarget*, bool sendEvent = true); 114 EventTarget*, bool sendEvent = true);
115 115
116 // Returns whether the pointer capture is changed. In this case this 116 // Returns whether the pointer capture is changed. In this case this
117 // function will take care of transition events and setNodeUnderPointer 117 // function will take care of transition events and setNodeUnderPointer
118 // should not send transition events. 118 // should not send transition events.
119 bool processPendingPointerCapture( 119 bool processPendingPointerCapture(
120 PointerEvent*, 120 PointerEvent*,
121 EventTarget*, 121 EventTarget*,
122 const PlatformMouseEvent& = PlatformMouseEvent(), 122 const PlatformMouseEvent& = PlatformMouseEvent(),
123 bool sendMouseEvent = false); 123 bool sendMouseEvent = false);
124 124
125 // Processes the capture state of a pointer, updates node under 125 // Processes the capture state of a pointer, updates node under
126 // pointer, and sends corresponding transition events for pointer if 126 // pointer, and sends corresponding boundary events for pointer if
127 // setPointerPosition is true. It also sends corresponding transition events 127 // setPointerPosition is true. It also sends corresponding boundary events
128 // for mouse if sendMouseEvent is true. 128 // for mouse if sendMouseEvent is true.
129 void processCaptureAndPositionOfPointerEvent( 129 void processCaptureAndPositionOfPointerEvent(
130 PointerEvent*, 130 PointerEvent*,
131 EventTarget* hitTestTarget, 131 EventTarget* hitTestTarget,
132 EventTarget* lastNodeUnderMouse = nullptr, 132 EventTarget* lastNodeUnderMouse = nullptr,
133 const PlatformMouseEvent& = PlatformMouseEvent(), 133 const PlatformMouseEvent& = PlatformMouseEvent(),
134 bool sendMouseEvent = false, 134 bool sendMouseEvent = false,
135 bool setPointerPosition = true); 135 bool setPointerPosition = true);
136 136
137 void removeTargetFromPointerCapturingMapping( 137 void removeTargetFromPointerCapturingMapping(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 PointerCapturingMap m_pointerCaptureTarget; 171 PointerCapturingMap m_pointerCaptureTarget;
172 PointerCapturingMap m_pendingPointerCaptureTarget; 172 PointerCapturingMap m_pendingPointerCaptureTarget;
173 PointerEventFactory m_pointerEventFactory; 173 PointerEventFactory m_pointerEventFactory;
174 TouchEventManager m_touchEventManager; 174 TouchEventManager m_touchEventManager;
175 175
176 }; 176 };
177 177
178 } // namespace blink 178 } // namespace blink
179 179
180 #endif // PointerEventManager_h 180 #endif // PointerEventManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698