mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 585785 - Skip the tab closing animation if the tab has the minimal width due to the opening animation not having moved yet. r=gavin a=b
This commit is contained in:
parent
4258453d03
commit
b00a9b4134
@ -1366,19 +1366,12 @@
|
||||
if (!this._beginRemoveTab(aTab, false, null, true))
|
||||
return;
|
||||
|
||||
/* Don't animate if:
|
||||
- the caller didn't opt in
|
||||
- this is the last tab in the window
|
||||
- this is a pinned tab
|
||||
- a bunch of other tabs are already closing (arbitrary threshold)
|
||||
- the fadein attribute hasn't been set yet
|
||||
- browser.tabs.animate is false */
|
||||
|
||||
if (!animate ||
|
||||
if (!animate /* the caller didn't opt in */ ||
|
||||
isLastTab ||
|
||||
aTab.pinned ||
|
||||
this._removingTabs.length > 3 ||
|
||||
aTab.getAttribute("fadein") != "true" ||
|
||||
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 == "1px" /* fade-in transition hasn't moved yet */ ||
|
||||
!Services.prefs.getBoolPref("browser.tabs.animate")) {
|
||||
this._endRemoveTab(aTab);
|
||||
return;
|
||||
|
@ -151,6 +151,7 @@ _BROWSER_FILES = \
|
||||
browser_bug581242.js \
|
||||
browser_bug581253.js \
|
||||
browser_bug581947.js \
|
||||
browser_bug585785.js \
|
||||
browser_bug585830.js \
|
||||
browser_bug592338.js \
|
||||
browser_bug594131.js \
|
||||
|
9
browser/base/content/test/browser_bug585785.js
Normal file
9
browser/base/content/test/browser_bug585785.js
Normal file
@ -0,0 +1,9 @@
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
var tab = gBrowser.addTab();
|
||||
executeSoon(function () {
|
||||
gBrowser.removeTab(tab, {animate:true});
|
||||
ok(!tab.parentNode, "tab successfully removed");
|
||||
finish();
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user