B2G/gecko/browser/components/tabview/groupitems.js
// Removes the group item, its children and its container.
Removes the group item, its children and its container.
Removes the group item its children and its container .
function GroupItem_closeHidden() {
    let self = this;
    this._cancelFadeAwayUndoButtonTimer();
    let remainingGroups = GroupItems.groupItems.filter(function (groupItem) {
      return (groupItem != self && groupItem.getChildren().length);
    });
    let tab = null;
    if (!gBrowser._numPinnedTabs && !remainingGroups.length) {
      let emptyGroups = GroupItems.groupItems.filter(function (groupItem) {
        return (groupItem != self && !groupItem.getChildren().length);
      });
      let group = (emptyGroups.length ? emptyGroups[0] : GroupItems.newGroup());
      tab = group.newTab(null, {dontZoomIn: true});
    }
    let closed = this.destroy();
    if (!tab)
      return;
    if (closed) {
      UI.goToTab(tab);
    } else {
      tab._tabViewTabItem.parent.destroy({immediately: true});
    }
  }
function GroupItem_closeHidden ( ) { let self = this ; this . _cancelFadeAwayUndoButtonTimer ( ) ; let remainingGroups = GroupItems . groupItems . filter ( function ( groupItem ) { return ( groupItem != self && groupItem . getChildren ( ) . length ) ; } ) ; let tab = null ; if ( ! gBrowser . _numPinnedTabs && ! remainingGroups . length ) { let emptyGroups = GroupItems . groupItems . filter ( function ( groupItem ) { return ( groupItem != self && ! groupItem . getChildren ( ) . length ) ; } ) ; let group = ( emptyGroups . length ? emptyGroups [ 0 ] : GroupItems . newGroup ( ) ) ; tab = group . newTab ( null , { dontZoomIn : true } ) ; } let closed = this . destroy ( ) ; if ( ! tab ) return ; if ( closed ) { UI . goToTab ( tab ) ; } else { tab . _tabViewTabItem . parent . destroy ( { immediately : true } ) ; } }
Removes the group item, its children and its container.
Removes the group item its children and its container .
// When the last non-empty groupItem is closed and there are no // pinned tabs then create a new group with a blank tab. // Let's make the new tab the selected tab. // Remove the new tab and group, if this group is no longer closed.