summaryrefslogtreecommitdiffstats
path: root/dom/events/EventStateManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/events/EventStateManager.h')
-rw-r--r--dom/events/EventStateManager.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/dom/events/EventStateManager.h b/dom/events/EventStateManager.h
index b3bb3b5170..a4e709d507 100644
--- a/dom/events/EventStateManager.h
+++ b/dom/events/EventStateManager.h
@@ -56,10 +56,11 @@ class RemoteDragStartData;
} // namespace dom
class OverOutElementsWrapper final : public nsISupports {
- ~OverOutElementsWrapper();
+ ~OverOutElementsWrapper() = default;
public:
- OverOutElementsWrapper();
+ enum class BoundaryEventType : bool { Mouse, Pointer };
+ explicit OverOutElementsWrapper(BoundaryEventType aType) : mType(aType) {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(OverOutElementsWrapper)
@@ -72,7 +73,8 @@ class OverOutElementsWrapper final : public nsISupports {
mDispatchingOverEventTarget = aOverEventTarget;
mDeepestEnterEventTargetIsOverEventTarget = true;
}
- void DidDispatchOverAndEnterEvent() { mDispatchingOverEventTarget = nullptr; }
+ void DidDispatchOverAndEnterEvent(
+ nsIContent* aOriginalOverTargetInComposedDoc);
[[nodiscard]] bool IsDispatchingOverEventOn(
nsIContent* aOverEventTarget) const {
MOZ_ASSERT(aOverEventTarget);
@@ -135,6 +137,8 @@ class OverOutElementsWrapper final : public nsISupports {
// the DOM tree, this is set to nullptr.
nsCOMPtr<nsIContent> mDispatchingOutOrDeepestLeaveEventTarget;
+ const BoundaryEventType mType;
+
// Once the last "over" element is removed from the tree, this is set
// to false. Then, mDeepestEnterEventTarget may be an ancestor of the
// "over" element which should be the deepest target of next "leave"