summaryrefslogtreecommitdiffstats
path: root/dom/base/FragmentOrElement.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-06-13 08:23:21 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-06-13 08:23:21 -0400
commit5e7917e2c8bd50754535652014c1de0054841912 (patch)
treeead6813f00c5ff538adad2b2aa8406732ffeb2b4 /dom/base/FragmentOrElement.cpp
parent43725c7264ca3f63de348d1d1596ce1fe9e64d2d (diff)
downloadUXP-5e7917e2c8bd50754535652014c1de0054841912.tar
UXP-5e7917e2c8bd50754535652014c1de0054841912.tar.gz
UXP-5e7917e2c8bd50754535652014c1de0054841912.tar.lz
UXP-5e7917e2c8bd50754535652014c1de0054841912.tar.xz
UXP-5e7917e2c8bd50754535652014c1de0054841912.zip
Bug 1429656 - Implement ShadowRoot.activeElement
Tag #1375
Diffstat (limited to 'dom/base/FragmentOrElement.cpp')
-rw-r--r--dom/base/FragmentOrElement.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp
index 6fbe04d25..e33d3c63a 100644
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -1138,6 +1138,15 @@ FragmentOrElement::GetAssignedSlot() const
return slots ? slots->mAssignedSlot.get() : nullptr;
}
+nsIContent*
+nsIContent::GetContainingShadowHost() const
+{
+ if (mozilla::dom::ShadowRoot* shadow = GetContainingShadow()) {
+ return shadow->GetHost();
+ }
+ return nullptr;
+}
+
void
FragmentOrElement::SetAssignedSlot(HTMLSlotElement* aSlot)
{