B2G/gecko/browser/components/thumbnails/PageThumbs.jsm
/**
   * Calculates the thumbnail size based on current desktop's dimensions.
   * @return The calculated thumbnail size or a default if unable to calculate.
   */
Calculates the thumbnail size based on current desktop's dimensions.
@return The calculated thumbnail size or a default if unable to calculate.
Calculates the thumbnail size based on current desktop ' s dimensions . @return The calculated thumbnail size or a default if unable to calculate .
function PageThumbs_getThumbnailSize() {
    if (!this._thumbnailWidth || !this._thumbnailHeight) {
      let screenManager = Cc["@mozilla.org/gfx/screenmanager;1"]
                            .getService(Ci.nsIScreenManager);
      let left = {}, top = {}, width = {}, height = {};
      screenManager.primaryScreen.GetRect(left, top, width, height);
      this._thumbnailWidth = Math.round(width.value / 3);
      this._thumbnailHeight = Math.round(height.value / 3);
    }
    return [this._thumbnailWidth, this._thumbnailHeight];
  }
function PageThumbs_getThumbnailSize ( ) { if ( ! this . _thumbnailWidth || ! this . _thumbnailHeight ) { let screenManager = Cc [ "@mozilla.org/gfx/screenmanager;1" ] . getService ( Ci . nsIScreenManager ) ; let left = { } , top = { } , width = { } , height = { } ; screenManager . primaryScreen . GetRect ( left , top , width , height ) ; this . _thumbnailWidth = Math . round ( width . value / 3 ) ; this . _thumbnailHeight = Math . round ( height . value / 3 ) ; } return [ this . _thumbnailWidth , this . _thumbnailHeight ] ; }
Calculates the thumbnail size based on current desktop's dimensions.
Calculates the thumbnail size based on current desktop ' s dimensions .