This commit is contained in:
Cameron Kaiser 2018-09-23 17:42:27 -07:00
parent 3c3b61b6f0
commit 47b8abd553
4 changed files with 15 additions and 6 deletions

View File

@ -1763,6 +1763,7 @@ let remote = false;
var aForceNotRemote; var aForceNotRemote;
var aNoReferrer; var aNoReferrer;
var aUserContextId; var aUserContextId;
var aSkipBackgroundNotify;
if (arguments.length == 2 && if (arguments.length == 2 &&
typeof arguments[1] == "object" && typeof arguments[1] == "object" &&
!(arguments[1] instanceof Ci.nsIURI)) { !(arguments[1] instanceof Ci.nsIURI)) {
@ -1780,6 +1781,7 @@ let remote = false;
aForceNotRemote = params.forceNotRemote; aForceNotRemote = params.forceNotRemote;
aNoReferrer = params.noReferrer; aNoReferrer = params.noReferrer;
aUserContextId = params.userContextId; aUserContextId = params.userContextId;
aSkipBackgroundNotify = params.skipBackgroundNotify;
} }
// if we're adding tabs, we're past interrupt mode, ditch the owner // if we're adding tabs, we're past interrupt mode, ditch the owner
@ -1794,6 +1796,11 @@ let remote = false;
t.setAttribute("usercontextid", aUserContextId); t.setAttribute("usercontextid", aUserContextId);
t.setAttribute("crop", "end"); t.setAttribute("crop", "end");
t.setAttribute("onerror", "this.removeAttribute('image');"); t.setAttribute("onerror", "this.removeAttribute('image');");
if (aSkipBackgroundNotify) {
t.setAttribute("skipbackgroundnotify", true);
}
t.className = "tabbrowser-tab"; t.className = "tabbrowser-tab";
// The new browser should be remote if this is an e10s window and // The new browser should be remote if this is an e10s window and
@ -5184,10 +5191,10 @@ let remote = false;
selected.left - scrollRect.left); selected.left - scrollRect.left);
} }
if (!this._animateElement.hasAttribute("notifybgtab")) { if (!this._animateElement.hasAttribute("highlight")) {
this._animateElement.setAttribute("notifybgtab", "true"); this._animateElement.setAttribute("highlight", "true");
setTimeout(function (ele) { setTimeout(function (ele) {
ele.removeAttribute("notifybgtab"); ele.removeAttribute("highlight");
}, 150, this._animateElement); }, 150, this._animateElement);
} }
]]></body> ]]></body>
@ -5278,7 +5285,7 @@ let remote = false;
if (tab.getAttribute("selected") == "true") { if (tab.getAttribute("selected") == "true") {
//this._fillTrailingGap(); //this._fillTrailingGap();
this._handleTabSelect(); this._handleTabSelect();
} else { } else if (!tab.hasAttribute("skipbackgroundnotify")) {
this._notifyBackgroundTab(tab); this._notifyBackgroundTab(tab);
} }

View File

@ -2932,6 +2932,7 @@ var SessionStoreInternal = {
tabbrowser.addTab("about:blank", { tabbrowser.addTab("about:blank", {
skipAnimation: true, skipAnimation: true,
forceNotRemote: true, forceNotRemote: true,
skipBackgroundNotify: true,
})); }));
if (winData.tabs[t].pinned) if (winData.tabs[t].pinned)

View File

@ -32,7 +32,8 @@ var TabAttributesInternal = {
// 'muted' should not be accessed directly but handled by using the // 'muted' should not be accessed directly but handled by using the
// tab.linkedBrowser.audioMuted/toggleMuteAudio methods. // tab.linkedBrowser.audioMuted/toggleMuteAudio methods.
// 'pending' is used internal by sessionstore and managed accordingly. // 'pending' is used internal by sessionstore and managed accordingly.
_skipAttrs: new Set(["image", "muted", "pending"]), // 'skipbackgroundnotify' is used to speed up startup time (bug 1342849).
_skipAttrs: new Set(["image", "muted", "pending", "skipbackgroundnotify"]),
persist: function (name) { persist: function (name) {
if (this._attrs.has(name) || this._skipAttrs.has(name)) { if (this._attrs.has(name) || this._skipAttrs.has(name)) {

View File

@ -2645,7 +2645,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
transition: 1s background-color ease-out; transition: 1s background-color ease-out;
} }
.tabbrowser-arrowscrollbox > .scrollbutton-down[notifybgtab] { .tabbrowser-arrowscrollbox > .scrollbutton-down[highlight] {
background-color: Highlight; background-color: Highlight;
transition: none; transition: none;
} }