mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 145827 - window.focus and window.blur not implemented in PPEmbed. r=adamlock/sr=sfraser
This commit is contained in:
parent
c23a2a8368
commit
a6aecbbf37
@ -109,11 +109,12 @@ void CBrowserChrome::SetBrowserShell(CBrowserShell *aShell)
|
||||
// CBrowserChrome::nsISupports
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMPL_ISUPPORTS7(CBrowserChrome,
|
||||
NS_IMPL_ISUPPORTS8(CBrowserChrome,
|
||||
nsIWebBrowserChrome,
|
||||
nsIInterfaceRequestor,
|
||||
nsIWebBrowserChromeFocus,
|
||||
nsIEmbeddingSiteWindow,
|
||||
nsIEmbeddingSiteWindow2,
|
||||
nsIContextMenuListener,
|
||||
nsITooltipListener,
|
||||
nsISupportsWeakReference);
|
||||
@ -340,7 +341,7 @@ NS_IMETHODIMP CBrowserChrome::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32
|
||||
|
||||
NS_IMETHODIMP CBrowserChrome::SetFocus()
|
||||
{
|
||||
// We're driving focus through CBrowserShell::BeTarget()
|
||||
mBrowserWindow->Select();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -416,6 +417,26 @@ NS_IMETHODIMP CBrowserChrome::GetSiteWindow(void * *aSiteWindow)
|
||||
}
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
// CBrowserChrome::nsIEmbeddingSiteWindow2
|
||||
//*****************************************************************************
|
||||
|
||||
NS_IMETHODIMP CBrowserChrome::Blur(void)
|
||||
{
|
||||
WindowPtr currWindow = ::GetWindowList();
|
||||
WindowPtr nextWindow;
|
||||
|
||||
// Find the rearmost window and put ourselves behind it
|
||||
while (currWindow && ((nextWindow = ::MacGetNextWindow(currWindow)) != nsnull))
|
||||
currWindow = nextWindow;
|
||||
|
||||
WindowPtr ourWindow = mBrowserWindow->GetMacWindow();
|
||||
if (ourWindow != currWindow)
|
||||
::SendBehind(ourWindow, currWindow);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
// CBrowserChrome::nsIContextMenuListener
|
||||
//*****************************************************************************
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "nsIWebBrowserChromeFocus.h"
|
||||
#include "nsIEmbeddingSiteWindow.h"
|
||||
#include "nsIEmbeddingSiteWindow2.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIContextMenuListener.h"
|
||||
@ -64,7 +65,7 @@ class CBrowserShell;
|
||||
|
||||
class CBrowserChrome : public nsIWebBrowserChrome,
|
||||
public nsIWebBrowserChromeFocus,
|
||||
public nsIEmbeddingSiteWindow,
|
||||
public nsIEmbeddingSiteWindow2,
|
||||
public nsIInterfaceRequestor,
|
||||
public nsIContextMenuListener,
|
||||
public nsITooltipListener,
|
||||
@ -78,6 +79,7 @@ public:
|
||||
NS_DECL_NSIWEBBROWSERCHROME
|
||||
NS_DECL_NSIWEBBROWSERCHROMEFOCUS
|
||||
NS_DECL_NSIEMBEDDINGSITEWINDOW
|
||||
NS_DECL_NSIEMBEDDINGSITEWINDOW2
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSICONTEXTMENULISTENER
|
||||
NS_DECL_NSITOOLTIPLISTENER
|
||||
|
Loading…
Reference in New Issue
Block a user