B2G/gecko/browser/components/tabview/groupitems.js
// Arranges the given xul:tab as an app tab in the group's apptab tray
Arranges the given xul:tab as an app tab in the group's apptab tray
Arranges the given xul : tab as an app tab in the group ' s apptab tray
function GroupItem_arrangeAppTab(xulTab) {
    let self = this;
    let elements = iQ(".appTabIcon", this.$appTabTray);
    let length = elements.length;
    elements.each(function(icon) {
      let $icon = iQ(icon);
      if ($icon.data("xulTab") != xulTab)
        return true;
      let targetIndex = xulTab._tPos;
      $icon.remove({ preserveEventHandlers: true });
      if (targetIndex < (length - 1))
        self.$appTabTray[0].insertBefore(
          icon,
          iQ(".appTabIcon:nth-child(" + (targetIndex + 1) + ")", self.$appTabTray)[0]);
      else
        $icon.appendTo(self.$appTabTray);
      return false;
    });
  }
function GroupItem_arrangeAppTab ( xulTab ) { let self = this ; let elements = iQ ( ".appTabIcon" , this . $appTabTray ) ; let length = elements . length ; elements . each ( function ( icon ) { let $icon = iQ ( icon ) ; if ( $icon . data ( "xulTab" ) != xulTab ) return true ; let targetIndex = xulTab . _tPos ; $icon . remove ( { preserveEventHandlers : true } ) ; if ( targetIndex < ( length - 1 ) ) self . $appTabTray [ 0 ] . insertBefore ( icon , iQ ( ".appTabIcon:nth-child(" + ( targetIndex + 1 ) + ")" , self . $appTabTray ) [ 0 ] ) ; else $icon . appendTo ( self . $appTabTray ) ; return false ; } ) ; }
Arranges the given xul:tab as an app tab in the group's apptab tray
Arranges the given xul : tab as an app tab in the group ' s apptab tray