mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-04 14:27:30 +09:00
Issue #2285 - Ensure we don't try to treat non-DOM-Node event targets as such, https://bugzilla.mozilla.org/show_bug.cgi?id=1440809 Fix crash on https://beeper.notion.site
This commit is contained in:
parent
6464b061c3
commit
42b2de6fe9
1 changed files with 6 additions and 1 deletions
|
|
@ -1026,7 +1026,12 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||||
nsContentUtils::Retarget(relatedTargetAsNode, this);
|
nsContentUtils::Retarget(relatedTargetAsNode, this);
|
||||||
nsCOMPtr<nsINode> targetInKnownToBeHandledScope =
|
nsCOMPtr<nsINode> targetInKnownToBeHandledScope =
|
||||||
FindChromeAccessOnlySubtreeOwner(aVisitor.mTargetInKnownToBeHandledScope);
|
FindChromeAccessOnlySubtreeOwner(aVisitor.mTargetInKnownToBeHandledScope);
|
||||||
if (nsContentUtils::ContentIsShadowIncludingDescendantOf(
|
// If aVisitor.mTargetInKnownToBeHandledScope wasn't nsINode,
|
||||||
|
// targetInKnownToBeHandledScope will be null. This may happen when
|
||||||
|
// dispatching event to Window object in a content page and
|
||||||
|
// propagating the event to a chrome Element.
|
||||||
|
if (targetInKnownToBeHandledScope &&
|
||||||
|
nsContentUtils::ContentIsShadowIncludingDescendantOf(
|
||||||
this, targetInKnownToBeHandledScope->SubtreeRoot())) {
|
this, targetInKnownToBeHandledScope->SubtreeRoot())) {
|
||||||
// Part of step 11.4.
|
// Part of step 11.4.
|
||||||
// "If target's root is a shadow-including inclusive ancestor of
|
// "If target's root is a shadow-including inclusive ancestor of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue