Index: third_party/WebKit/Source/core/input/EventHandler.h |
diff --git a/third_party/WebKit/Source/core/input/EventHandler.h b/third_party/WebKit/Source/core/input/EventHandler.h |
index 50611cef0bfd515b19af2a8793ba70bbcc270978..4b5a77f87f67fad295b1e2aa8d548d7f911ae156 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.h |
+++ b/third_party/WebKit/Source/core/input/EventHandler.h |
@@ -283,7 +283,7 @@ private: |
void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); |
// Returns true when the sent PE has defaultPrevented or defaultHandled set. |
- bool dispatchPointerEventForMouseEvent(Node* target, const AtomicString& eventType, const PlatformMouseEvent&, Node* relatedTarget); |
+ bool dispatchPointerEventForMouseEvent(Node* target, const AtomicString& eventType, const PlatformMouseEvent&, Node* relatedTarget = nullptr); |
// Dispatches mouseover, mouseout, mouseenter and mouseleave events to appropriate nodes when the mouse pointer moves from one node to another. |
void sendMouseEventsForNodeTransition(Node*, Node*, const PlatformMouseEvent&); |
@@ -414,6 +414,11 @@ private: |
PointerIdManager m_pointerIdManager; |
+ // Prevents firing mousedown, mousemove & mouseup in-between a canceled pointerdown and next pointerup/pointercancel. |
+ // See "PREVENT MOUSE EVENT flag" in the spec: |
+ // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-events |
+ bool m_preventMouseEventForPointerTypeMouse; |
+ |
// This is set upon sending a pointercancel for touch, prevents PE dispatches for touches until |
// all touch-points become inactive. |
// TODO(mustaq): Consider a state per pointerType, as in PointerIdManager? Exclude mouse? |