Bug 1098131 - Don't invalidate layers when simply changing SizeMode r=smaug,jimm

This commit is contained in:
George Wright
2015-11-09 21:38:21 -05:00
parent a8b1c07837
commit 1fa75f94b8
14 changed files with 95 additions and 28 deletions

View File

@@ -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);
}
}
}