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/EventStateManager.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/EventStateManager.h')
-rw-r--r-- | dom/events/EventStateManager.h | 10 |
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" |