diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index f961ba75a71..bf8579fc8dd 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -414,14 +414,6 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID & aIID, void **aSink) NS_ADDREF((nsISupports*)*aSink); return NS_OK; } - else if (aIID.Equals(NS_GET_IID(nsIWebBrowserSpellCheck))) { - nsresult rv = EnsureSpellCheck(); - if (NS_FAILED(rv)) return rv; - - *aSink = mSpellCheck; - NS_ADDREF((nsISupports*)*aSink); - return NS_OK; - } else if (aIID.Equals(NS_GET_IID(nsIEditingSession)) && NS_SUCCEEDED(EnsureEditorData())) { nsCOMPtr editingSession; mEditorData->GetEditingSession(getter_AddRefs(editingSession)); @@ -6614,50 +6606,6 @@ NS_IMETHODIMP nsDocShell::EnsureFind() return NS_OK; } -NS_IMETHODIMP nsDocShell::EnsureSpellCheck() -{ - nsresult rv; - if (!mSpellCheck) - { - mSpellCheck = do_CreateInstance("@mozilla.org/embedcomp/spellcheck;1", &rv); - if (NS_FAILED(rv)) return rv; - } - - // we promise that the nsIWebBrowserFind that we return has been set - // up to point to the focussed, or content window, so we have to - // set that up each time. - nsCOMPtr scriptGO; - rv = GetScriptGlobalObject(getter_AddRefs(scriptGO)); - if (NS_FAILED(rv)) return rv; - - // default to our window - nsCOMPtr rootWindow = do_QueryInterface(scriptGO); - nsCOMPtr windowToSearch = rootWindow; - - // if we can, search the focussed window - nsCOMPtr ourWindow = do_QueryInterface(scriptGO); - nsCOMPtr focusController; - if (ourWindow) - ourWindow->GetRootFocusController(getter_AddRefs(focusController)); - if (focusController) - { - nsCOMPtr focussedWindow; - focusController->GetFocusedWindow(getter_AddRefs(focussedWindow)); - if (focussedWindow) - windowToSearch = focussedWindow; - } - - nsCOMPtr spellCheckInFrames = do_QueryInterface(mSpellCheck); - if (!spellCheckInFrames) return NS_ERROR_NO_INTERFACE; - - rv = spellCheckInFrames->SetRootSearchFrame(rootWindow); - if (NS_FAILED(rv)) return rv; - rv = spellCheckInFrames->SetCurrentSearchFrame(windowToSearch); - if (NS_FAILED(rv)) return rv; - - return NS_OK; -} - PRBool nsDocShell::IsFrame() { diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h index fdd34ce7b68..e186e457af8 100644 --- a/mozilla/docshell/base/nsDocShell.h +++ b/mozilla/docshell/base/nsDocShell.h @@ -78,7 +78,6 @@ #include "nsIDocShellHistory.h" #include "nsIURIFixup.h" #include "nsIWebBrowserFind.h" -#include "nsIWebBrowserSpellCheck.h" #include "nsIHttpChannel.h" @@ -248,7 +247,6 @@ protected: NS_IMETHOD EnsureScriptEnvironment(); NS_IMETHOD EnsureEditorData(); NS_IMETHOD EnsureFind(); - NS_IMETHOD EnsureSpellCheck(); NS_IMETHOD RefreshURIFromQueue(); NS_IMETHOD DisplayLoadError(nsresult aError, nsIURI *aURI, const PRUnichar *aURL); NS_IMETHOD LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL, const PRUnichar *aPage, const PRUnichar *aDescription); @@ -304,7 +302,6 @@ protected: nsCOMPtr mLoadCookie; // the load cookie associated with the window context. nsCOMPtr mURIFixup; nsCOMPtr mFind; - nsCOMPtr mSpellCheck; PRInt32 mMarginWidth; PRInt32 mMarginHeight; PRInt32 mItemType;