B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * Restore visibility and dimension features to a window
   * @param aWindow
   *        Window reference
   * @param aWinData
   *        Object containing session data for the window
   */
Restore visibility and dimension features to a window
@param aWindow
Window reference
@param aWinData
Object containing session data for the window
Restore visibility and dimension features to a window @param aWindow Window reference @param aWinData Object containing session data for the window
function ssi_restoreWindowFeatures(aWindow, aWinData) {
    var hidden = (aWinData.hidden)?aWinData.hidden.split(","):[];
    WINDOW_HIDEABLE_FEATURES.forEach(function(aItem) {
      aWindow[aItem].visible = hidden.indexOf(aItem) == -1;
    });
    if (aWinData.isPopup) {
      this._windows[aWindow.__SSi].isPopup = true;
      if (aWindow.gURLBar) {
        aWindow.gURLBar.readOnly = true;
        aWindow.gURLBar.setAttribute("enablehistory", "false");
      }
    }
    else {
      delete this._windows[aWindow.__SSi].isPopup;
      if (aWindow.gURLBar) {
        aWindow.gURLBar.readOnly = false;
        aWindow.gURLBar.setAttribute("enablehistory", "true");
      }
    }
    var _this = this;
    aWindow.setTimeout(function() {
      _this.restoreDimensions.apply(_this, [aWindow, aWinData.width || 0,
        aWinData.height || 0, "screenX" in aWinData ? aWinData.screenX : NaN,
        "screenY" in aWinData ? aWinData.screenY : NaN,
        aWinData.sizemode || "", aWinData.sidebar || ""]);
    }, 0);
  }
function ssi_restoreWindowFeatures ( aWindow , aWinData ) { var hidden = ( aWinData . hidden ) ? aWinData . hidden . split ( "," ) : [ ] ; WINDOW_HIDEABLE_FEATURES . forEach ( function ( aItem ) { aWindow [ aItem ] . visible = hidden . indexOf ( aItem ) == - 1 ; } ) ; if ( aWinData . isPopup ) { this . _windows [ aWindow . __SSi ] . isPopup = true ; if ( aWindow . gURLBar ) { aWindow . gURLBar . readOnly = true ; aWindow . gURLBar . setAttribute ( "enablehistory" , "false" ) ; } } else { delete this . _windows [ aWindow . __SSi ] . isPopup ; if ( aWindow . gURLBar ) { aWindow . gURLBar . readOnly = false ; aWindow . gURLBar . setAttribute ( "enablehistory" , "true" ) ; } } var _this = this ; aWindow . setTimeout ( function ( ) { _this . restoreDimensions . apply ( _this , [ aWindow , aWinData . width || 0 , aWinData . height || 0 , "screenX" in aWinData ? aWinData . screenX : NaN , "screenY" in aWinData ? aWinData . screenY : NaN , aWinData . sizemode || "" , aWinData . sidebar || "" ] ) ; } , 0 ) ; }
Restore visibility and dimension features to a window
 @param aWindow
        Window reference
 @param aWinData
        Object containing session data for the window
Restore visibility and dimension features to a window @param aWindow Window reference @param aWinData Object containing session data for the window