diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 647e666dd50..4bbff9ee07e 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -1406,6 +1406,16 @@ nsDocShell::TabToTreeOwner(PRBool aForward, PRBool* aTookFocus) return NS_OK; } +NS_IMETHODIMP +nsDocShell::Blur() +{ + nsCOMPtr window = do_GetInterface(mTreeOwner); + if (window) + return window->Blur(); + + return NS_ERROR_FAILURE; +} + //***************************************************************************** // nsDocShell::nsIDocShellTreeItem diff --git a/mozilla/docshell/base/nsIDocShell.idl b/mozilla/docshell/base/nsIDocShell.idl index 3871fe4fcc7..2e5bd4ed142 100644 --- a/mozilla/docshell/base/nsIDocShell.idl +++ b/mozilla/docshell/base/nsIDocShell.idl @@ -263,6 +263,12 @@ interface nsIDocShell : nsISupports void tabToTreeOwner(in boolean forward, out boolean tookFocus); + /** + Tells the docshell to unfocus itself. This is the where nsIDOMWindow::blur + comes for its implementation. + */ + void blur(); + /** * Current busy state for DocShell */ diff --git a/mozilla/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl b/mozilla/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl index de3c2ed20a0..b14dbbffab1 100644 --- a/mozilla/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl +++ b/mozilla/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl @@ -87,6 +87,11 @@ interface nsIEmbeddingSiteWindow : nsISupports */ void setFocus(); + /** + * Blur the window + */ + void blur(); + /** * Visibility of the window. */