diff options
Diffstat (limited to 'layout/generic/nsSelection.cpp')
-rw-r--r-- | layout/generic/nsSelection.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index 994ec4852..919ab0815 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -3521,6 +3521,18 @@ Selection::GetParentObject() const return nullptr; } +DocGroup* +Selection::GetDocGroup() const +{ + nsIPresShell* shell = GetPresShell(); + if (!shell) { + return nullptr; + } + + nsIDocument* doc = shell->GetDocument(); + return doc ? doc->GetDocGroup() : nullptr; +} + NS_IMPL_CYCLE_COLLECTION_CLASS(Selection) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(Selection) |