TabItem has incorrect close handler after unsuccessful TabItem.close() call

RESOLVED FIXED in Firefox 8

Status

Firefox Graveyard
Panorama
RESOLVED FIXED
6 years ago
a year ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

Trunk
Firefox 8

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
GroupItem.destroy() re-adds the following "close" event handler when a TabItem could not be closed:

>  child.addSubscriber(self, "close", function() {
>    self.remove(child);
>  });

https://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabview/groupitems.js#828

This is very different from the normal close handler:

>  item.addSubscriber(this, "close", function() {
>    let count = self._children.length;
>    let dontArrange = self.expanded || !self.shouldStack(count);
>    let dontClose = !item.closedManually && gBrowser._numPinnedTabs > 0;
>    self.remove(item, {dontArrange: dontArrange, dontClose: dontClose});
>
>    if (dontArrange)
>      self._freezeItemSize(count);
>
>    if (self._children.length > 0 && self._activeTab)
>      UI.setActive(self);
>  });

https://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabview/groupitems.js#1013

We should re-add the same close handler when a TabItem could not be closed.
(Assignee)

Comment 1

6 years ago
Created attachment 544364 [details] [diff] [review]
patch v1
Attachment #544364 - Flags: feedback?(raymond)
Comment on attachment 544364 [details] [diff] [review]
patch v1

Looks good
Attachment #544364 - Flags: feedback?(raymond) → feedback+
(Assignee)

Updated

6 years ago
Attachment #544364 - Flags: review?(ehsan)
(Assignee)

Comment 3

6 years ago
Comment on attachment 544364 [details] [diff] [review]
patch v1

Passed try:

http://tbpl.mozilla.org/?tree=Try&pusher=tim.taubert@gmx.de&rev=3efc59543378
Attachment #544364 - Flags: review?(ehsan) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/integration/fx-team/rev/8c1f92fdd9fb
Whiteboard: [fixed-in-fx-team]
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/mozilla-central/rev/8c1f92fdd9fb
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 8
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.