diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:30:43 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:30:43 -0400 |
commit | 7e506bd98dab604062bfe12a44c096eb287721bf (patch) | |
tree | ebea23264b1fa0f9c23935b253c23bdc0b41c25d /dom/base/ShadowRoot.cpp | |
parent | 010f37f47b9c15935a6113cd82e43f0673122016 (diff) | |
download | UXP-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/ShadowRoot.cpp')
-rw-r--r-- | dom/base/ShadowRoot.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dom/base/ShadowRoot.cpp b/dom/base/ShadowRoot.cpp index 308f57cf7..e7f7ae93c 100644 --- a/dom/base/ShadowRoot.cpp +++ b/dom/base/ShadowRoot.cpp @@ -309,6 +309,7 @@ nsresult ShadowRoot::GetEventTargetParent(EventChainPreVisitor& aVisitor) { aVisitor.mCanHandle = true; + aVisitor.mRootOfClosedTree = IsClosed(); // https://dom.spec.whatwg.org/#ref-for-get-the-parent%E2%91%A6 if (!aVisitor.mEvent->mFlags.mComposed) { @@ -323,13 +324,13 @@ ShadowRoot::GetEventTargetParent(EventChainPreVisitor& aVisitor) EventTarget* parentTarget = win && aVisitor.mEvent->mMessage != eLoad ? win->GetParentTarget() : nullptr; - aVisitor.mParentTarget = parentTarget; + aVisitor.SetParentTarget(parentTarget, true); return NS_OK; } } nsIContent* shadowHost = GetHost(); - aVisitor.mParentTarget = shadowHost; + aVisitor.SetParentTarget(shadowHost, false); if (aVisitor.mOriginalTargetIsInAnon) { nsCOMPtr<nsIContent> content(do_QueryInterface(aVisitor.mEvent->mTarget)); |