Bug 731556 - When closing a hidden tab, don't attempt to animate it. r=gavin
authorDão Gottwald <dao@mozilla.com>
Wed, 29 Feb 2012 23:02:34 +0100
changeset 88012 a0ca4d85ad6e002b5ef9cb0b4328eadaba8a60db
parent 88011 7309f41d24f9afb8f16755407648744d922aea27
child 88013 31af9742004c6e05fe6e7c094c14e7d7ebe29cca
push id22167
push usermak77@bonardo.net
push dateThu, 01 Mar 2012 13:28:21 +0000
treeherdermozilla-central@04caf36509e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs731556
milestone13.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 731556 - When closing a hidden tab, don't attempt to animate it. r=gavin
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1521,16 +1521,17 @@
             if (!aTab.pinned && !aTab.hidden && aTab._fullyOpen && byMouse)
               this.tabContainer._lockTabSizing(aTab);
             else
               this.tabContainer._unlockTabSizing();
 
             if (!animate /* the caller didn't opt in */ ||
                 isLastTab ||
                 aTab.pinned ||
+                aTab.hidden ||
                 this._removingTabs.length > 3 /* don't want lots of concurrent animations */ ||
                 aTab.getAttribute("fadein") != "true" /* fade-in transition hasn't been triggered yet */ ||
                 window.getComputedStyle(aTab).maxWidth == "0.1px" /* fade-in transition hasn't moved yet */ ||
                 !Services.prefs.getBoolPref("browser.tabs.animate")) {
               this._endRemoveTab(aTab);
               return;
             }