Bug 1425441 - Move relatedTarget to WidgetEvent

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 07:34:35 -04:00 committed by Roy Tam
commit 907e210445
7 changed files with 11 additions and 39 deletions

View file

@ -423,6 +423,9 @@ public:
nsCOMPtr<dom::EventTarget> mCurrentTarget;
nsCOMPtr<dom::EventTarget> mOriginalTarget;
/// The possible related target
nsCOMPtr<dom::EventTarget> mRelatedTarget;
nsTArray<EventTargetChainItem>* mPath;
dom::EventTarget* GetDOMEventTarget() const;
@ -442,6 +445,7 @@ public:
mTarget = aCopyTargets ? aEvent.mTarget : nullptr;
mCurrentTarget = aCopyTargets ? aEvent.mCurrentTarget : nullptr;
mOriginalTarget = aCopyTargets ? aEvent.mOriginalTarget : nullptr;
mRelatedTarget = aCopyTargets ? aEvent.mRelatedTarget : nullptr;
}
/**

View file

@ -212,9 +212,6 @@ public:
return result;
}
/// The possible related target
nsCOMPtr<dom::EventTarget> mRelatedTarget;
bool mFromRaise;
bool mIsRefocus;
@ -222,7 +219,6 @@ public:
{
AssignUIEventData(aEvent, aCopyTargets);
mRelatedTarget = aCopyTargets ? aEvent.mRelatedTarget : nullptr;
mFromRaise = aEvent.mFromRaise;
mIsRefocus = aEvent.mIsRefocus;
}

View file

@ -110,9 +110,6 @@ public:
MOZ_CRASH("WidgetMouseEventBase must not be most-subclass");
}
/// The possible related target
nsCOMPtr<nsISupports> relatedTarget;
enum buttonType
{
eLeftButton = 0,
@ -162,7 +159,6 @@ public:
{
AssignInputEventData(aEvent, aCopyTargets);
relatedTarget = aCopyTargets ? aEvent.relatedTarget : nullptr;
button = aEvent.button;
buttons = aEvent.buttons;
pressure = aEvent.pressure;