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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 1391393002: Fire pointerup/down events for corresponding mouse events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
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?

Powered by Google App Engine
This is Rietveld 408576698