зеркало из https://github.com/mozilla/gecko-dev.git
Bug 145827 - window.focus and window.blur not implemented in PPEmbed. r=adamlock/sr=sfraser
This commit is contained in:
Родитель
c23a2a8368
Коммит
a6aecbbf37
|
@ -109,11 +109,12 @@ void CBrowserChrome::SetBrowserShell(CBrowserShell *aShell)
|
||||||
// CBrowserChrome::nsISupports
|
// CBrowserChrome::nsISupports
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS7(CBrowserChrome,
|
NS_IMPL_ISUPPORTS8(CBrowserChrome,
|
||||||
nsIWebBrowserChrome,
|
nsIWebBrowserChrome,
|
||||||
nsIInterfaceRequestor,
|
nsIInterfaceRequestor,
|
||||||
nsIWebBrowserChromeFocus,
|
nsIWebBrowserChromeFocus,
|
||||||
nsIEmbeddingSiteWindow,
|
nsIEmbeddingSiteWindow,
|
||||||
|
nsIEmbeddingSiteWindow2,
|
||||||
nsIContextMenuListener,
|
nsIContextMenuListener,
|
||||||
nsITooltipListener,
|
nsITooltipListener,
|
||||||
nsISupportsWeakReference);
|
nsISupportsWeakReference);
|
||||||
|
@ -340,7 +341,7 @@ NS_IMETHODIMP CBrowserChrome::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32
|
||||||
|
|
||||||
NS_IMETHODIMP CBrowserChrome::SetFocus()
|
NS_IMETHODIMP CBrowserChrome::SetFocus()
|
||||||
{
|
{
|
||||||
// We're driving focus through CBrowserShell::BeTarget()
|
mBrowserWindow->Select();
|
||||||
return NS_OK;
|
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
|
// CBrowserChrome::nsIContextMenuListener
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "nsIWebBrowserChrome.h"
|
#include "nsIWebBrowserChrome.h"
|
||||||
#include "nsIWebBrowserChromeFocus.h"
|
#include "nsIWebBrowserChromeFocus.h"
|
||||||
#include "nsIEmbeddingSiteWindow.h"
|
#include "nsIEmbeddingSiteWindow.h"
|
||||||
|
#include "nsIEmbeddingSiteWindow2.h"
|
||||||
#include "nsIInterfaceRequestor.h"
|
#include "nsIInterfaceRequestor.h"
|
||||||
#include "nsIInterfaceRequestorUtils.h"
|
#include "nsIInterfaceRequestorUtils.h"
|
||||||
#include "nsIContextMenuListener.h"
|
#include "nsIContextMenuListener.h"
|
||||||
|
@ -64,7 +65,7 @@ class CBrowserShell;
|
||||||
|
|
||||||
class CBrowserChrome : public nsIWebBrowserChrome,
|
class CBrowserChrome : public nsIWebBrowserChrome,
|
||||||
public nsIWebBrowserChromeFocus,
|
public nsIWebBrowserChromeFocus,
|
||||||
public nsIEmbeddingSiteWindow,
|
public nsIEmbeddingSiteWindow2,
|
||||||
public nsIInterfaceRequestor,
|
public nsIInterfaceRequestor,
|
||||||
public nsIContextMenuListener,
|
public nsIContextMenuListener,
|
||||||
public nsITooltipListener,
|
public nsITooltipListener,
|
||||||
|
@ -78,6 +79,7 @@ public:
|
||||||
NS_DECL_NSIWEBBROWSERCHROME
|
NS_DECL_NSIWEBBROWSERCHROME
|
||||||
NS_DECL_NSIWEBBROWSERCHROMEFOCUS
|
NS_DECL_NSIWEBBROWSERCHROMEFOCUS
|
||||||
NS_DECL_NSIEMBEDDINGSITEWINDOW
|
NS_DECL_NSIEMBEDDINGSITEWINDOW
|
||||||
|
NS_DECL_NSIEMBEDDINGSITEWINDOW2
|
||||||
NS_DECL_NSIINTERFACEREQUESTOR
|
NS_DECL_NSIINTERFACEREQUESTOR
|
||||||
NS_DECL_NSICONTEXTMENULISTENER
|
NS_DECL_NSICONTEXTMENULISTENER
|
||||||
NS_DECL_NSITOOLTIPLISTENER
|
NS_DECL_NSITOOLTIPLISTENER
|
||||||
|
|
Загрузка…
Ссылка в новой задаче