diff options
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 6fbe04d251..e33d3c63a4 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) { |