B2G/gecko/browser/components/tabview/tabitems.js
//   isNewBlankTab - boolean indicates whether it is a newly opened blank tab.
boolean indicates whether it is a newly opened blank tab.
boolean indicates whether it is a newly opened blank tab .
function TabItem_zoomIn(isNewBlankTab) {
    if (this.parent && this.parent.hidden)
      return;
    let self = this;
    let $tabEl = this.$container;
    let $canvas = this.$canvas;
    Search.hide();
    UI.setActive(this);
    TabItems._update(this.tab, {force: true});
    let tab = this.tab;
    function onZoomDone() {
      $canvas.css({ 'transform': null });
      $tabEl.removeClass("front");
      UI.goToTab(tab);
      if (tab != gBrowser.selectedTab) {
        UI.onTabSelect(gBrowser.selectedTab);
      } else { 
        if (isNewBlankTab)
          gWindow.gURLBar.focus();
      }
      if (self.parent && self.parent.expanded)
        self.parent.collapse();
      self._sendToSubscribers("zoomedIn");
    }
    let animateZoom = gPrefBranch.getBoolPref("animate_zoom");
    if (animateZoom) {
      let transform = this.getZoomTransform();
      TabItems.pausePainting();
      if (this.parent && this.parent.expanded)
        $tabEl.removeClass("stack-trayed");
      $tabEl.addClass("front");
      $canvas
        .css({ 'transform-origin': transform.transformOrigin })
        .animate({ 'transform': transform.transform }, {
          duration: 230,
          easing: 'fast',
          complete: function() {
            onZoomDone();
            setTimeout(function() {
              TabItems.resumePainting();
            }, 0);
          }
        });
    } else {
      setTimeout(onZoomDone, 0);
    }
  }
function TabItem_zoomIn ( isNewBlankTab ) { if ( this . parent && this . parent . hidden ) return ; let self = this ; let $tabEl = this . $container ; let $canvas = this . $canvas ; Search . hide ( ) ; UI . setActive ( this ) ; TabItems . _update ( this . tab , { force : true } ) ; let tab = this . tab ; function onZoomDone ( ) { $canvas . css ( { 'transform' : null } ) ; $tabEl . removeClass ( "front" ) ; UI . goToTab ( tab ) ; if ( tab != gBrowser . selectedTab ) { UI . onTabSelect ( gBrowser . selectedTab ) ; } else { if ( isNewBlankTab ) gWindow . gURLBar . focus ( ) ; } if ( self . parent && self . parent . expanded ) self . parent . collapse ( ) ; self . _sendToSubscribers ( "zoomedIn" ) ; } let animateZoom = gPrefBranch . getBoolPref ( "animate_zoom" ) ; if ( animateZoom ) { let transform = this . getZoomTransform ( ) ; TabItems . pausePainting ( ) ; if ( this . parent && this . parent . expanded ) $tabEl . removeClass ( "stack-trayed" ) ; $tabEl . addClass ( "front" ) ; $canvas . css ( { 'transform-origin' : transform . transformOrigin } ) . animate ( { 'transform' : transform . transform } , { duration : 230 , easing : 'fast' , complete : function ( ) { onZoomDone ( ) ; setTimeout ( function ( ) { TabItems . resumePainting ( ) ; } , 0 ) ; } } ) ; } else { setTimeout ( onZoomDone , 0 ) ; } }
isNewBlankTab - boolean indicates whether it is a newly opened blank tab.
isNewBlankTab - boolean indicates whether it is a newly opened blank tab .
// don't allow zoom in if its group is hidden // Zoom in! // tab might not be selected because hideTabView() is invoked after  // UI.goToTab() so we need to setup everything for the gBrowser.selectedTab