mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 906666, treat frozen windows as not visible, so that they don't get focused, r=smaug
This commit is contained in:
parent
35f59dc30c
commit
5631de9296
@ -1379,7 +1379,13 @@ nsFocusManager::AdjustWindowFocus(nsPIDOMWindow* aWindow,
|
||||
bool
|
||||
nsFocusManager::IsWindowVisible(nsPIDOMWindow* aWindow)
|
||||
{
|
||||
if (!aWindow)
|
||||
if (!aWindow || aWindow->IsFrozen())
|
||||
return false;
|
||||
|
||||
// Check if the inner window is frozen as well. This can happen when a focus change
|
||||
// occurs while restoring a previous page.
|
||||
nsPIDOMWindow* innerWindow = aWindow->GetCurrentInnerWindow();
|
||||
if (!innerWindow || innerWindow->IsFrozen())
|
||||
return false;
|
||||
|
||||
nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell();
|
||||
|
Loading…
Reference in New Issue
Block a user