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

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

Issue 2174863002: Change mouse pointer event targets to the capturing node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/PointerEventManager.h
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.h b/third_party/WebKit/Source/core/input/PointerEventManager.h
index 6b33a8d73985c6d2652af02291c1afc152772df2..4821b97071c388317eb666685bd4ea4fc20c0143 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.h
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.h
@@ -65,16 +65,20 @@ public:
// Returns whether there is any touch on the screen.
bool isAnyTouchActive() const;
+ // TODO(crbug.com/625843): This can be hidden when mouse refactoring in EventHandler is done.
+ EventTarget* getMouseCapturingNode() const;
dtapuska 2016/07/22 15:57:39 This is odd; returning a ptr from a const object;
Navid Zolghadr 2016/07/22 16:39:24 Done.
+
// Returns true if the primary pointerdown corresponding to the given
// |uniqueTouchEventId| was canceled. Also drops stale ids from
// |m_touchIdsForCanceledPointerdowns|.
bool primaryPointerdownCanceled(uint32_t uniqueTouchEventId);
- // Try to immediately send the got/lostpointercapture without boundary
- // events.
+ // Processes the assignment of |m_pointerCaptureTarget| from |m_pendingPointerCaptureTarget|
+ // and sends the got/lostpointercapture events, as per the spec:
+ // https://w3c.github.io/pointerevents/#process-pending-pointer-capture
// TODO(crbug.com/629935): This function should be private as soon as PointerEventManager
// a GC managed object and postTask can be done internally in this class.
- void immediatelyProcessPendingPointerCapture(int pointerId);
+ void processPendingPointerCapture(int pointerId);
private:
typedef HeapHashMap<int, Member<EventTarget>, WTF::IntHash<int>,
@@ -121,24 +125,14 @@ private:
const PlatformMouseEvent& = PlatformMouseEvent(),
bool sendMouseEvent = false);
void setNodeUnderPointer(PointerEvent*,
- EventTarget*, bool sendEvent = true);
-
- // Processes the assignment of |m_pointerCaptureTarget| from |m_pendingPointerCaptureTarget|
- // and sends the got/lostpointercapture events, as per the spec:
- // https://w3c.github.io/pointerevents/#process-pending-pointer-capture
- // Returns whether the pointer capture is changed. When pointer capture is changed,
- // this function will take care of boundary events.
- bool processPendingPointerCapture(
- PointerEvent*,
- EventTarget*,
- const PlatformMouseEvent& = PlatformMouseEvent(),
- bool sendMouseEvent = false);
+ EventTarget*);
// Processes the capture state of a pointer, updates node under
// pointer, and sends corresponding boundary events for pointer if
// setPointerPosition is true. It also sends corresponding boundary events
// for mouse if sendMouseEvent is true.
- void processCaptureAndPositionOfPointerEvent(
+ // Returns the target that the pointer event is supposed to be fired at.
+ EventTarget* processCaptureAndPositionOfPointerEvent(
PointerEvent*,
EventTarget* hitTestTarget,
EventTarget* lastNodeUnderMouse = nullptr,
@@ -150,7 +144,7 @@ private:
PointerCapturingMap&, const EventTarget*);
EventTarget* getEffectiveTargetForPointerEvent(
EventTarget*, int);
- EventTarget* getCapturingNode(int);
dtapuska 2016/07/22 15:57:39 ditto
Navid Zolghadr 2016/07/22 16:39:24 Done.
+ EventTarget* getCapturingNode(int) const;
void removePointer(PointerEvent*);
WebInputEventResult dispatchPointerEvent(
EventTarget*,

Powered by Google App Engine
This is Rietveld 408576698