summaryrefslogtreecommitdiffstats
path: root/dom/base/nsContentUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/nsContentUtils.cpp')
-rw-r--r--dom/base/nsContentUtils.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp
index 62be71b4a..502c40977 100644
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -4955,17 +4955,7 @@ nsContentUtils::IsInSameAnonymousTree(const nsINode* aNode,
return aContent->GetBindingParent() == nullptr;
}
- const nsIContent* nodeAsContent = static_cast<const nsIContent*>(aNode);
-
- // For nodes in a shadow tree, it is insufficient to simply compare
- // the binding parent because a node may host multiple ShadowRoots,
- // thus nodes in different shadow tree may have the same binding parent.
- if (aNode->IsInShadowTree()) {
- return nodeAsContent->GetContainingShadow() ==
- aContent->GetContainingShadow();
- }
-
- return nodeAsContent->GetBindingParent() == aContent->GetBindingParent();
+ return aNode->AsContent()->GetBindingParent() == aContent->GetBindingParent();
}
class AnonymousContentDestroyer : public Runnable {