diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index e4d2e03ff98d..afe2d9963072 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -109,6 +109,8 @@ #include "prlog.h" +#include "nsISelectionDisplay.h" + // this is going away - see // #include "nsIBrowserHistory.h" @@ -382,6 +384,12 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID & aIID, void **aSink) return NS_NOINTERFACE; } + else if (aIID.Equals(NS_GET_IID(nsISelectionDisplay))) { + nsCOMPtr shell; + nsresult rv = GetPresShell(getter_AddRefs(shell)); + if (NS_SUCCEEDED(rv) && shell) + return shell->QueryInterface(aIID,aSink); + } else { return QueryInterface(aIID, aSink); }