summaryrefslogtreecommitdiffstats
path: root/dom/base/nsInProcessTabChildGlobal.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 07:30:43 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 07:30:43 -0400
commit7e506bd98dab604062bfe12a44c096eb287721bf (patch)
treeebea23264b1fa0f9c23935b253c23bdc0b41c25d /dom/base/nsInProcessTabChildGlobal.cpp
parent010f37f47b9c15935a6113cd82e43f0673122016 (diff)
downloadUXP-7e506bd98dab604062bfe12a44c096eb287721bf.tar
UXP-7e506bd98dab604062bfe12a44c096eb287721bf.tar.gz
UXP-7e506bd98dab604062bfe12a44c096eb287721bf.tar.lz
UXP-7e506bd98dab604062bfe12a44c096eb287721bf.tar.xz
UXP-7e506bd98dab604062bfe12a44c096eb287721bf.zip
Bug 1412775 - Implement Event.composedPath
Tag #1375
Diffstat (limited to 'dom/base/nsInProcessTabChildGlobal.cpp')
-rw-r--r--dom/base/nsInProcessTabChildGlobal.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/dom/base/nsInProcessTabChildGlobal.cpp b/dom/base/nsInProcessTabChildGlobal.cpp
index 547bb8d36..9885b41a8 100644
--- a/dom/base/nsInProcessTabChildGlobal.cpp
+++ b/dom/base/nsInProcessTabChildGlobal.cpp
@@ -270,7 +270,7 @@ nsInProcessTabChildGlobal::GetEventTargetParent(EventChainPreVisitor& aVisitor)
#endif
if (mPreventEventsEscaping) {
- aVisitor.mParentTarget = nullptr;
+ aVisitor.SetParentTarget(nullptr, false);
return NS_OK;
}
@@ -278,11 +278,13 @@ nsInProcessTabChildGlobal::GetEventTargetParent(EventChainPreVisitor& aVisitor)
(!mOwner || !nsContentUtils::IsInChromeDocshell(mOwner->OwnerDoc()))) {
if (mOwner) {
if (nsPIDOMWindowInner* innerWindow = mOwner->OwnerDoc()->GetInnerWindow()) {
- aVisitor.mParentTarget = innerWindow->GetParentTarget();
+ // 'this' is already a "chrome handler", so we consider window's
+ // parent target to be part of that same part of the event path.
+ aVisitor.SetParentTarget(innerWindow->GetParentTarget(), false);
}
}
} else {
- aVisitor.mParentTarget = mOwner;
+ aVisitor.SetParentTarget(mOwner, false);
}
return NS_OK;