mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 00:07:37 +09:00
Issue #2135 - Bug 1413102 (Follow-up): Ignore current target because of shadow DOM retargeting
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1466581
This commit is contained in:
parent
24572438a0
commit
1bb2009f61
3 changed files with 18 additions and 4 deletions
|
|
@ -128,6 +128,7 @@ public:
|
|||
, mParentIsSlotInClosedTree(false)
|
||||
, mParentIsChromeHandler(false)
|
||||
, mRelatedTargetRetargetedInCurrentScope(false)
|
||||
, mIgnoreBecauseOfShadowDOM(false)
|
||||
, mParentTarget(nullptr)
|
||||
, mEventTargetAtParent(nullptr)
|
||||
, mRetargetedRelatedTarget(nullptr)
|
||||
|
|
@ -151,6 +152,7 @@ public:
|
|||
// Note, we don't clear mRelatedTargetRetargetedInCurrentScope explicitly,
|
||||
// since it is used during event path creation to indicate whether
|
||||
// relatedTarget may need to be retargeted.
|
||||
mIgnoreBecauseOfShadowDOM = false;
|
||||
mParentTarget = nullptr;
|
||||
mEventTargetAtParent = nullptr;
|
||||
mRetargetedRelatedTarget = nullptr;
|
||||
|
|
@ -169,9 +171,10 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void IgnoreCurrentTarget()
|
||||
void IgnoreCurrentTargetBecauseOfShadowDOMRetargeting()
|
||||
{
|
||||
mCanHandle = false;
|
||||
mIgnoreBecauseOfShadowDOM = true;
|
||||
SetParentTarget(nullptr, false);
|
||||
mEventTargetAtParent = nullptr;
|
||||
}
|
||||
|
|
@ -251,6 +254,12 @@ public:
|
|||
*/
|
||||
bool mRelatedTargetRetargetedInCurrentScope;
|
||||
|
||||
/**
|
||||
* True if Shadow DOM relatedTarget retargeting causes the current item
|
||||
* to not show up in the event path.
|
||||
*/
|
||||
bool mIgnoreBecauseOfShadowDOM;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Parent item in the event target chain.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue