Bug 1367830 - Allow setting chrome docshells as inactive. r=nika
authorL. David Baron <dbaron@dbaron.org>
Tue, 31 Oct 2017 09:14:17 -0700
changeset 488079 6692575191f32991dd8ceb2b108dd2adaba576f0
parent 488078 f8e99bd2a193f00d159581d9dffeb5cd634ad624
child 488080 6be9318b094dccdad2bf3c903b8e2c583ed26c78
push id36435
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:46:49 +0000
treeherdermozilla-central@0db07ff50ab5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1367830, 343515
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367830 - Allow setting chrome docshells as inactive. r=nika This is to allow the hidden window to become inactive. The code being removed dates to the origin of the function in bug 343515 (changeset b7836c3a63dba95c983bde1ae4402386c877640b, August 2010). MANUAL PUSH: patch and review predate phabricator MozReview-Commit-ID: Edf2zcINpiA
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -5250,21 +5250,16 @@ nsDocShell::SetIsOffScreenBrowser(bool a
 NS_IMETHODIMP
 nsDocShell::GetIsOffScreenBrowser(bool* aIsOffScreen) {
   *aIsOffScreen = mIsOffScreenBrowser;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::SetIsActive(bool aIsActive) {
-  // We disallow setting active on chrome docshells.
-  if (mItemType == nsIDocShellTreeItem::typeChrome) {
-    return NS_ERROR_INVALID_ARG;
-  }
-
   // Keep track ourselves.
   mIsActive = aIsActive;
 
   // Tell the PresShell about it.
   if (RefPtr<PresShell> presShell = GetPresShell()) {
     presShell->SetIsActive(aIsActive);
   }