Bug 654941 - First tab in group has black thumbnail after 'Undo close group' is used; f=raymond, r=ehsan

This commit is contained in:
Tim Taubert 2011-05-11 16:13:58 +02:00
parent 627fac29d1
commit 24f4e4a4bf
4 changed files with 64 additions and 4 deletions

View File

@ -739,8 +739,6 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
this.droppable(true);
this.setTrenches(this.bounds);
UI.setActive(this);
iQ(this.container).show().animate({
"-moz-transform": "scale(1)",
"opacity": 1
@ -750,11 +748,13 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
self._children.forEach(function(child) {
iQ(child.container).show();
});
UI.setActive(self);
self._sendToSubscribers("groupShown", { groupItemId: self.id });
}
});
GroupItems.updateGroupCloseButtons();
self._sendToSubscribers("groupShown", { groupItemId: self.id });
},
// ----------

View File

@ -100,9 +100,10 @@ _BROWSER_FILES = \
browser_tabview_bug622872.js \
browser_tabview_bug623768.js \
browser_tabview_bug624265.js \
browser_tabview_bug624931.js \
browser_tabview_bug624692.js \
browser_tabview_bug624727.js \
browser_tabview_bug624847.js \
browser_tabview_bug624931.js \
browser_tabview_bug624953.js \
browser_tabview_bug625269.js \
browser_tabview_bug625424.js \
@ -135,6 +136,7 @@ _BROWSER_FILES = \
browser_tabview_bug649006.js \
browser_tabview_bug649307.js \
browser_tabview_bug651311.js \
browser_tabview_bug654941.js \
browser_tabview_dragdrop.js \
browser_tabview_exit_button.js \
browser_tabview_expander.js \

View File

@ -0,0 +1,25 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
newWindowWithTabView(function (win) {
registerCleanupFunction(function () win.close());
let cw = win.TabView.getContentWindow();
let groupItem = cw.GroupItems.groupItems[0];
let tabItem = groupItem.getChild(0);
hideGroupItem(groupItem, function () {
unhideGroupItem(groupItem, function () {
let bounds = tabItem.getBounds();
groupItem.arrange({immediately: true});
ok(bounds.equals(tabItem.getBounds()),
"tabItem bounds were correct after unhiding the groupItem");
finish();
});
});
});
}

View File

@ -0,0 +1,33 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
let compareCanvasSize = function (prefix, width, height, tabItem) {
let canvas = tabItem.$canvas[0];
is(canvas.width, width, prefix + ": canvas widths are equal (" + width + "px)");
is(canvas.height, height, prefix + ": canvas heights are equal (" + height + "px)");
};
newWindowWithTabView(function (win) {
registerCleanupFunction(function () win.close());
let cw = win.TabView.getContentWindow();
let groupItem = cw.GroupItems.groupItems[0];
let tabItem = groupItem.getChild(0);
afterAllTabItemsUpdated(function () {
let {width, height} = tabItem.$canvas[0];
hideGroupItem(groupItem, function () {
compareCanvasSize("hidden", width, height, tabItem);
unhideGroupItem(groupItem, function () {
compareCanvasSize("unhidden", width, height, tabItem);
finish();
});
});
}, win);
});
}