mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 665502 - tabItems are resized when closing the active tab in a group; r=dietrich
This commit is contained in:
parent
457d121d41
commit
5652e30d81
@ -300,7 +300,9 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||
"tab must be null (if no children) or a TabItem");
|
||||
|
||||
this._activeTab = tab;
|
||||
this.arrange({immediately: true});
|
||||
|
||||
if (this.isStacked())
|
||||
this.arrange({immediately: true});
|
||||
},
|
||||
|
||||
// -----------
|
||||
|
@ -150,6 +150,7 @@ _BROWSER_FILES = \
|
||||
browser_tabview_bug656778.js \
|
||||
browser_tabview_bug656913.js \
|
||||
browser_tabview_bug662266.js \
|
||||
browser_tabview_bug665502.js \
|
||||
browser_tabview_dragdrop.js \
|
||||
browser_tabview_exit_button.js \
|
||||
browser_tabview_expander.js \
|
||||
|
@ -0,0 +1,33 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
let onLoad = function (win) {
|
||||
for (let i = 0; i < 2; i++)
|
||||
win.gBrowser.addTab();
|
||||
};
|
||||
|
||||
let onShow = function (win) {
|
||||
registerCleanupFunction(function () win.close());
|
||||
|
||||
let cw = win.TabView.getContentWindow();
|
||||
let groupItem = cw.GroupItems.groupItems[0];
|
||||
|
||||
groupItem.setSize(400, 200, true);
|
||||
|
||||
let tabItem = groupItem.getChild(0);
|
||||
let bounds = tabItem.getBounds();
|
||||
|
||||
is(groupItem.getActiveTab(), tabItem, "the first tab is active");
|
||||
tabItem.close();
|
||||
|
||||
is(groupItem.getChildren().indexOf(tabItem), -1, "tabItem got removed");
|
||||
ok(bounds.equals(groupItem.getChild(0).getBounds()), "tabItem bounds didn't change");
|
||||
|
||||
finish();
|
||||
};
|
||||
|
||||
newWindowWithTabView(onShow, onLoad);
|
||||
}
|
Loading…
Reference in New Issue
Block a user