mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 15:57:31 +09:00
parent
ca09afd0b0
commit
2ee3ce62fc
24 changed files with 194 additions and 131 deletions
|
|
@ -124,6 +124,9 @@ public:
|
|||
, mWantsWillHandleEvent(false)
|
||||
, mMayHaveListenerManager(true)
|
||||
, mWantsPreHandleEvent(false)
|
||||
, mRootOfClosedTree(false)
|
||||
, mParentIsSlotInClosedTree(false)
|
||||
, mParentIsChromeHandler(false)
|
||||
, mParentTarget(nullptr)
|
||||
, mEventTargetAtParent(nullptr)
|
||||
{
|
||||
|
|
@ -139,10 +142,26 @@ public:
|
|||
mWantsWillHandleEvent = false;
|
||||
mMayHaveListenerManager = true;
|
||||
mWantsPreHandleEvent = false;
|
||||
mRootOfClosedTree = false;
|
||||
mParentIsSlotInClosedTree = false;
|
||||
mParentIsChromeHandler = false;
|
||||
mParentTarget = nullptr;
|
||||
mEventTargetAtParent = nullptr;
|
||||
}
|
||||
|
||||
dom::EventTarget* GetParentTarget()
|
||||
{
|
||||
return mParentTarget;
|
||||
}
|
||||
|
||||
void SetParentTarget(dom::EventTarget* aParentTarget, bool aIsChromeHandler)
|
||||
{
|
||||
mParentTarget = aParentTarget;
|
||||
if (mParentTarget) {
|
||||
mParentIsChromeHandler = aIsChromeHandler;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Member that must be set in GetEventTargetParent by event targets. If set to
|
||||
* false, indicates that this event target will not be handling the event and
|
||||
|
|
@ -194,11 +213,30 @@ public:
|
|||
*/
|
||||
bool mWantsPreHandleEvent;
|
||||
|
||||
/**
|
||||
* True if the current target is either closed ShadowRoot or root of
|
||||
* chrome only access tree (for example native anonymous content).
|
||||
*/
|
||||
bool mRootOfClosedTree;
|
||||
|
||||
/**
|
||||
* True if mParentTarget is HTMLSlotElement in a closed shadow tree and the
|
||||
* current target is assigned to that slot.
|
||||
*/
|
||||
bool mParentIsSlotInClosedTree;
|
||||
|
||||
/**
|
||||
* True if mParentTarget is a chrome handler in the event path.
|
||||
*/
|
||||
bool mParentIsChromeHandler;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Parent item in the event target chain.
|
||||
*/
|
||||
dom::EventTarget* mParentTarget;
|
||||
|
||||
public:
|
||||
/**
|
||||
* If the event needs to be retargeted, this is the event target,
|
||||
* which should be used when the event is handled at mParentTarget.
|
||||
|
|
@ -281,6 +319,9 @@ public:
|
|||
WidgetEvent* aEvent,
|
||||
const nsAString& aEventType);
|
||||
|
||||
static void GetComposedPathFor(WidgetEvent* aEvent,
|
||||
nsTArray<RefPtr<dom::EventTarget>>& aPath);
|
||||
|
||||
/**
|
||||
* Called at shutting down.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue