Bug 1098131 - Don't invalidate layers when simply changing SizeMode r=smaug,jimm
This commit is contained in:
@@ -5982,8 +5982,20 @@ nsDocShell::GetIsOffScreenBrowser(bool* aIsOffScreen)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetIsActiveAndForeground(bool aIsActive)
|
||||
{
|
||||
return SetIsActiveInternal(aIsActive, false);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetIsActive(bool aIsActive)
|
||||
{
|
||||
return SetIsActiveInternal(aIsActive, true);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocShell::SetIsActiveInternal(bool aIsActive, bool aIsHidden)
|
||||
{
|
||||
// We disallow setting active on chrome docshells.
|
||||
if (mItemType == nsIDocShellTreeItem::typeChrome) {
|
||||
@@ -5996,7 +6008,7 @@ nsDocShell::SetIsActive(bool aIsActive)
|
||||
// Tell the PresShell about it.
|
||||
nsCOMPtr<nsIPresShell> pshell = GetPresShell();
|
||||
if (pshell) {
|
||||
pshell->SetIsActive(aIsActive);
|
||||
pshell->SetIsActive(aIsActive, aIsHidden);
|
||||
}
|
||||
|
||||
// Tell the window about it
|
||||
@@ -6030,7 +6042,11 @@ nsDocShell::SetIsActive(bool aIsActive)
|
||||
}
|
||||
|
||||
if (!docshell->GetIsBrowserOrApp()) {
|
||||
docshell->SetIsActive(aIsActive);
|
||||
if (aIsHidden) {
|
||||
docshell->SetIsActive(aIsActive);
|
||||
} else {
|
||||
docshell->SetIsActiveAndForeground(aIsActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user