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

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

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 8 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 21 matching lines...) Expand all
32 AbstractView*, 32 AbstractView*,
33 Node* lastNodeUnderMouse); 33 Node* lastNodeUnderMouse);
34 34
35 // Returns whether the event is consumed or not 35 // Returns whether the event is consumed or not
36 WebInputEventResult sendTouchPointerEvent( 36 WebInputEventResult sendTouchPointerEvent(
37 EventTarget*, 37 EventTarget*,
38 const PlatformTouchPoint&, PlatformEvent::Modifiers, 38 const PlatformTouchPoint&, PlatformEvent::Modifiers,
39 const double width, const double height, 39 const double width, const double height,
40 const double clientX, const double clientY); 40 const double clientX, const double clientY);
41 41
42 void sendTouchCancelPointerEvent(EventTarget*, 42 // Inhibits firing of touch-type PointerEvents until unblocked by unblockTou chPointers(). Also
43 const PlatformTouchPoint&); 43 // sends pointercancels for existing touch-type PointerEvents.
44 // See: www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default -touch-behaviors
45 void blockTouchPointers();
46
47 // Enables firing of touch-type PointerEvents after they were inhibited by b lockTouchPointers().
48 void unblockTouchPointers();
44 49
45 // Sends node transition events mouseout/leave/over/enter to the 50 // Sends node transition events mouseout/leave/over/enter to the
46 // corresponding targets. This function sends pointerout/leave/over/enter 51 // corresponding targets. This function sends pointerout/leave/over/enter
47 // only when isFrameBoundaryTransition is true which indicates the 52 // only when isFrameBoundaryTransition is true which indicates the
48 // transition is over the document boundary and not only the elements border 53 // transition is over the document boundary and not only the elements border
49 // inside the document. If isFrameBoundaryTransition is false, 54 // inside the document. If isFrameBoundaryTransition is false,
50 // then the event is a compatibility event like those created by touch 55 // then the event is a compatibility event like those created by touch
51 // and in that case the corresponding pointer events will be handled by 56 // and in that case the corresponding pointer events will be handled by
52 // sendTouchPointerEvent for example and there is no need to send pointer 57 // sendTouchPointerEvent for example and there is no need to send pointer
53 // transition events. Note that normal mouse events (e.g. mousemove/down/up) 58 // transition events. Note that normal mouse events (e.g. mousemove/down/up)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 EventTarget*, 133 EventTarget*,
129 PointerEvent*, 134 PointerEvent*,
130 bool checkForListener = false); 135 bool checkForListener = false);
131 void releasePointerCapture(int); 136 void releasePointerCapture(int);
132 137
133 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin terdown and next pointerup/pointercancel. 138 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin terdown and next pointerup/pointercancel.
134 // See "PREVENT MOUSE EVENT flag" in the spec: 139 // See "PREVENT MOUSE EVENT flag" in the spec:
135 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e vents 140 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e vents
136 bool m_preventMouseEventForPointerType[static_cast<size_t>(WebPointerPropert ies::PointerType::LastEntry) + 1]; 141 bool m_preventMouseEventForPointerType[static_cast<size_t>(WebPointerPropert ies::PointerType::LastEntry) + 1];
137 142
143 // Set upon sending a pointercancel for touch, prevents PE dispatches for to uches until
144 // all touch-points become inactive.
145 bool m_inCanceledStateForPointerTypeTouch;
146
138 // Note that this map keeps track of node under pointer with id=1 as well 147 // Note that this map keeps track of node under pointer with id=1 as well
139 // which might be different than m_nodeUnderMouse in EventHandler. That one 148 // which might be different than m_nodeUnderMouse in EventHandler. That one
140 // keeps track of any compatibility mouse event positions but this map for 149 // keeps track of any compatibility mouse event positions but this map for
141 // the pointer with id=1 is only taking care of true mouse related events. 150 // the pointer with id=1 is only taking care of true mouse related events.
142 HeapHashMap<int, EventTargetAttributes> m_nodeUnderPointer; 151 HeapHashMap<int, EventTargetAttributes> m_nodeUnderPointer;
143 152
144 PointerCapturingMap m_pointerCaptureTarget; 153 PointerCapturingMap m_pointerCaptureTarget;
145 PointerCapturingMap m_pendingPointerCaptureTarget; 154 PointerCapturingMap m_pendingPointerCaptureTarget;
146 PointerEventFactory m_pointerEventFactory; 155 PointerEventFactory m_pointerEventFactory;
147 }; 156 };
148 157
149 } // namespace blink 158 } // namespace blink
150 159
151 #endif // PointerEventManager_h 160 #endif // PointerEventManager_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698