diff options
author | Gaming4JC <g4jc@bulletmail.org> | 2018-10-09 21:38:15 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@bulletmail.org> | 2018-10-09 21:38:15 -0400 |
commit | 976c0fcb0e2e89b3ded27aa3f281321c835910dc (patch) | |
tree | af5d1065d1bf8bbf12facbb3b8ba71a1115bc518 | |
parent | 1de8c6bc02a7602c4b22320e2b77fa31ebd47b7a (diff) | |
download | iceweasel-uxp-976c0fcb0e2e89b3ded27aa3f281321c835910dc.tar.gz |
backport: Skip notifications for background tabs when restoring a session
-rw-r--r-- | base/content/tabbrowser.xml | 13 | ||||
-rw-r--r-- | components/sessionstore/SessionStore.jsm | 1 | ||||
-rw-r--r-- | components/sessionstore/TabAttributes.jsm | 5 |
3 files changed, 17 insertions, 2 deletions
diff --git a/base/content/tabbrowser.xml b/base/content/tabbrowser.xml index 9cd9650..8a6d252 100644 --- a/base/content/tabbrowser.xml +++ b/base/content/tabbrowser.xml @@ -2077,6 +2077,7 @@ var aRelatedBrowser; var aOriginPrincipal; var aOpener; + var aSkipBackgroundNotify; if (arguments.length == 2 && typeof arguments[1] == "object" && !(arguments[1] instanceof Ci.nsIURI)) { @@ -2098,6 +2099,7 @@ aRelatedBrowser = params.relatedBrowser; aOriginPrincipal = params.originPrincipal; aOpener = params.opener; + aSkipBackgroundNotify = params.skipBackgroundNotify; } // if we're adding tabs, we're past interrupt mode, ditch the owner @@ -2121,6 +2123,11 @@ t.setAttribute("crop", "end"); t.setAttribute("onerror", "this.removeAttribute('image');"); + + if (aSkipBackgroundNotify) { + t.setAttribute("skipbackgroundnotify", true); + } + t.className = "tabbrowser-tab"; this.tabContainer._unlockTabSizing(); @@ -5814,7 +5821,11 @@ this._fillTrailingGap(); this._handleTabSelect(); } else { - this._notifyBackgroundTab(tab); + if (tab.hasAttribute("skipbackgroundnotify")) { + tab.removeAttribute("skipbackgroundnotify"); + } else { + this._notifyBackgroundTab(tab); + } } // XXXmano: this is a temporary workaround for bug 345399 diff --git a/components/sessionstore/SessionStore.jsm b/components/sessionstore/SessionStore.jsm index ed87256..086bb91 100644 --- a/components/sessionstore/SessionStore.jsm +++ b/components/sessionstore/SessionStore.jsm @@ -3104,6 +3104,7 @@ var SessionStoreInternal = { tabbrowser.addTab("about:blank", { skipAnimation: true, forceNotRemote: true, + skipBackgroundNotify: true })); if (winData.tabs[t].pinned) diff --git a/components/sessionstore/TabAttributes.jsm b/components/sessionstore/TabAttributes.jsm index 8a29680..c8e6d97 100644 --- a/components/sessionstore/TabAttributes.jsm +++ b/components/sessionstore/TabAttributes.jsm @@ -14,7 +14,10 @@ this.EXPORTED_SYMBOLS = ["TabAttributes"]; // 'pending' is used internal by sessionstore and managed accordingly. // 'iconLoadingPrincipal' is same as 'image' that it should be handled by // using the gBrowser.getIcon()/setIcon() methods. -const ATTRIBUTES_TO_SKIP = new Set(["image", "muted", "pending", "iconLoadingPrincipal"]); +// 'skipbackgroundnotify' is used internal by tabbrowser.xml. +const ATTRIBUTES_TO_SKIP = new Set(["image", "muted", "pending", + "iconLoadingPrincipal", + "skipbackgroundnotify"]); // A set of tab attributes to persist. We will read a given list of tab // attributes when collecting tab data and will re-set those attributes when |