summaryrefslogtreecommitdiffstats
path: root/dom/events/PointerEventHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/events/PointerEventHandler.h')
-rw-r--r--dom/events/PointerEventHandler.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/dom/events/PointerEventHandler.h b/dom/events/PointerEventHandler.h
index 0211bfe0d8..87b41f9d94 100644
--- a/dom/events/PointerEventHandler.h
+++ b/dom/events/PointerEventHandler.h
@@ -50,13 +50,16 @@ class PointerInfo final {
uint16_t mPointerType;
bool mActiveState;
bool mPrimaryState;
+ bool mFromTouchEvent;
bool mPreventMouseEventByContent;
WeakPtr<dom::Document> mActiveDocument;
explicit PointerInfo(bool aActiveState, uint16_t aPointerType,
- bool aPrimaryState, dom::Document* aActiveDocument)
+ bool aPrimaryState, bool aFromTouchEvent,
+ dom::Document* aActiveDocument)
: mPointerType(aPointerType),
mActiveState(aActiveState),
mPrimaryState(aPrimaryState),
+ mFromTouchEvent(aFromTouchEvent),
mPreventMouseEventByContent(false),
mActiveDocument(aActiveDocument) {}
};
@@ -208,8 +211,7 @@ class PointerEventHandler final {
static void InitPointerEventFromTouch(WidgetPointerEvent& aPointerEvent,
const WidgetTouchEvent& aTouchEvent,
- const mozilla::dom::Touch& aTouch,
- bool aIsPrimary);
+ const mozilla::dom::Touch& aTouch);
static bool ShouldGeneratePointerEventFromMouse(WidgetGUIEvent* aEvent) {
return aEvent->mMessage == eMouseDown || aEvent->mMessage == eMouseUp ||
@@ -250,6 +252,10 @@ class PointerEventHandler final {
// event with pointerId
static bool GetPointerPrimaryState(uint32_t aPointerId);
+ // HasActiveTouchPointer returns true if there is active pointer event that is
+ // generated from touch event.
+ static bool HasActiveTouchPointer();
+
MOZ_CAN_RUN_SCRIPT
static void DispatchGotOrLostPointerCaptureEvent(
bool aIsGotCapture, const WidgetPointerEvent* aPointerEvent,