diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/events/PointerEventHandler.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/PointerEventHandler.h')
-rw-r--r-- | dom/events/PointerEventHandler.h | 12 |
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, |