summaryrefslogtreecommitdiffstats
path: root/layout/base/TouchManager.h
diff options
context:
space:
mode:
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