summaryrefslogtreecommitdiffstats
path: root/layout/base/TouchManager.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /layout/base/TouchManager.h
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/TouchManager.h')
-rw-r--r--layout/base/TouchManager.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/layout/base/TouchManager.h b/layout/base/TouchManager.h
index 0e12c25c7d..40b9083bdb 100644
--- a/layout/base/TouchManager.h
+++ b/layout/base/TouchManager.h
@@ -12,6 +12,7 @@
#ifndef TouchManager_h_
#define TouchManager_h_
+#include "Units.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/dom/Touch.h"
#include "mozilla/StaticPtr.h"
@@ -20,6 +21,7 @@
namespace mozilla {
class PresShell;
+class TimeStamp;
class TouchManager {
public:
@@ -52,6 +54,8 @@ class TouchManager {
bool PreHandleEvent(mozilla::WidgetEvent* aEvent, nsEventStatus* aStatus,
bool& aTouchIsNew,
nsCOMPtr<nsIContent>& aCurrentEventContent);
+ void PostHandleEvent(const mozilla::WidgetEvent* aEvent,
+ const nsEventStatus* aStatus);
static already_AddRefed<nsIContent> GetAnyCapturedTouchTarget();
static bool HasCapturedTouch(int32_t aId);
@@ -59,6 +63,12 @@ class TouchManager {
static bool ShouldConvertTouchToPointer(const dom::Touch* aTouch,
const WidgetTouchEvent* aEvent);
+ // This should be called after PostHandleEvent() is called. Note that this
+ // cannot check touches outside this process. So, this should not be used for
+ // actual user input handling. This is designed for a fallback path to
+ // dispatch mouse events for touch events synthesized without APZ.
+ static bool IsSingleTapEndToDoDefault(const WidgetTouchEvent* aTouchEndEvent);
+
private:
void EvictTouches(dom::Document* aLimitToDocument = nullptr);
static void EvictTouchPoint(RefPtr<dom::Touch>& aTouch,
@@ -77,6 +87,12 @@ class TouchManager {
static StaticAutoPtr<nsTHashMap<nsUint32HashKey, TouchInfo>>
sCaptureTouchList;
static layers::LayersId sCaptureTouchLayersId;
+ // The last start of a single tap. This will be set to "Null" if the tap is
+ // consumed or becomes not a single tap.
+ static TimeStamp sSingleTouchStartTimeStamp;
+ // The last start point of the single tap tracked with
+ // sSingleTouchStartTimeStamp.
+ static LayoutDeviceIntPoint sSingleTouchStartPoint;
};
} // namespace mozilla