diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-06-13 08:23:21 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-06-13 08:23:21 -0400 |
commit | 5e7917e2c8bd50754535652014c1de0054841912 (patch) | |
tree | ead6813f00c5ff538adad2b2aa8406732ffeb2b4 /dom/base/FragmentOrElement.cpp | |
parent | 43725c7264ca3f63de348d1d1596ce1fe9e64d2d (diff) | |
download | UXP-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.cpp | 9 |
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) { |