summaryrefslogtreecommitdiffstats
path: root/dom/events/PointerEventHandler.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/events/PointerEventHandler.h
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/PointerEventHandler.h')
-rw-r--r--dom/events/PointerEventHandler.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/dom/events/PointerEventHandler.h b/dom/events/PointerEventHandler.h
index d1a5b31b5a..0211bfe0d8 100644
--- a/dom/events/PointerEventHandler.h
+++ b/dom/events/PointerEventHandler.h
@@ -168,11 +168,39 @@ class PointerEventHandler final {
static void PostHandlePointerEventsPreventDefault(
WidgetPointerEvent* aPointerEvent, WidgetGUIEvent* aMouseOrTouchEvent);
- MOZ_CAN_RUN_SCRIPT
- static void DispatchPointerFromMouseOrTouch(
- PresShell* aShell, nsIFrame* aFrame, nsIContent* aContent,
- WidgetGUIEvent* aEvent, bool aDontRetargetEvents, nsEventStatus* aStatus,
- nsIContent** aTargetContent);
+ /**
+ * Dispatch a pointer event for aMouseOrTouchEvent to aEventTargetContent.
+ *
+ * @param aShell The PresShell which is handling the event.
+ * @param aEventTargetFrame The frame for aEventTargetContent.
+ * @param aEventTargetContent The event target node.
+ * @param aMouseOrTouchEvent A mouse or touch event.
+ * @param aDontRetargetEvents If true, this won't dispatch event with
+ * different PresShell from aShell. Otherwise,
+ * pointer events may be fired on different
+ * document if and only if aMouseOrTOuchEvent is a
+ * touch event except eTouchStart.
+ * @param aState [out] The result of the pointer event.
+ * @param aMouseOrTouchEventTarget
+ * [out] The event target for the following mouse
+ * or touch event. If aEventTargetContent has not
+ * been removed from the tree, this is always set
+ * to it. If aEventTargetContent is removed from
+ * the tree and aMouseOrTouchEvent is a mouse
+ * event, this is set to inclusive ancestor of
+ * aEventTargetContent which is still connected.
+ * If aEventTargetContent is removed from the tree
+ * and aMouseOrTouchEvent is a touch event, this is
+ * set to aEventTargetContent because touch event
+ * should be dispatched even on disconnected node.
+ * FIXME: If the event is a touch event but the
+ * message is not eTouchStart, this won't be set.
+ */
+ MOZ_CAN_RUN_SCRIPT static void DispatchPointerFromMouseOrTouch(
+ PresShell* aShell, nsIFrame* aEventTargetFrame,
+ nsIContent* aEventTargetContent, WidgetGUIEvent* aMouseOrTouchEvent,
+ bool aDontRetargetEvents, nsEventStatus* aStatus,
+ nsIContent** aMouseOrTouchEventTarget = nullptr);
static void InitPointerEventFromMouse(WidgetPointerEvent* aPointerEvent,
WidgetMouseEvent* aMouseEvent,