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

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

Issue 1855513002: Consider isPrimary and pointerType when preventing compat mouse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void removePointer(const PassRefPtrWillBeRawPtr<PointerEvent>); 125 void removePointer(const PassRefPtrWillBeRawPtr<PointerEvent>);
126 WebInputEventResult dispatchPointerEvent( 126 WebInputEventResult dispatchPointerEvent(
127 PassRefPtrWillBeRawPtr<EventTarget>, 127 PassRefPtrWillBeRawPtr<EventTarget>,
128 PassRefPtrWillBeRawPtr<PointerEvent>, 128 PassRefPtrWillBeRawPtr<PointerEvent>,
129 bool checkForListener = false); 129 bool checkForListener = false);
130 void releasePointerCapture(int); 130 void releasePointerCapture(int);
131 131
132 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin terdown and next pointerup/pointercancel. 132 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin terdown and next pointerup/pointercancel.
133 // See "PREVENT MOUSE EVENT flag" in the spec: 133 // See "PREVENT MOUSE EVENT flag" in the spec:
134 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e vents 134 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e vents
135 bool m_preventMouseEventForPointerTypeMouse; 135 bool m_preventMouseEventForPointerType[static_cast<int>(WebPointerProperties ::PointerType::LastEntry) + 1];
dtapuska 2016/04/05 19:21:25 Personally I'd cast to a size_t
Navid Zolghadr 2016/04/05 20:17:25 Done.
136 136
137 // Note that this map keeps track of node under pointer with id=1 as well 137 // Note that this map keeps track of node under pointer with id=1 as well
138 // which might be different than m_nodeUnderMouse in EventHandler. That one 138 // which might be different than m_nodeUnderMouse in EventHandler. That one
139 // keeps track of any compatibility mouse event positions but this map for 139 // keeps track of any compatibility mouse event positions but this map for
140 // the pointer with id=1 is only taking care of true mouse related events. 140 // the pointer with id=1 is only taking care of true mouse related events.
141 WillBeHeapHashMap<int, EventTargetAttributes> m_nodeUnderPointer; 141 WillBeHeapHashMap<int, EventTargetAttributes> m_nodeUnderPointer;
142 142
143 PointerCapturingMap m_pointerCaptureTarget; 143 PointerCapturingMap m_pointerCaptureTarget;
144 PointerCapturingMap m_pendingPointerCaptureTarget; 144 PointerCapturingMap m_pendingPointerCaptureTarget;
145 PointerEventFactory m_pointerEventFactory; 145 PointerEventFactory m_pointerEventFactory;
146 }; 146 };
147 147
148 } // namespace blink 148 } // namespace blink
149 149
150 #endif // PointerEventManager_h 150 #endif // PointerEventManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698