B2G/gecko/browser/devtools/webconsole/AutocompletePopup.jsm
/**
   * Determine the scrollbar width in the current document.
   *
   * @private
   */
Determine the scrollbar width in the current document.
@private
Determine the scrollbar width in the current document . @private
get _scrollbarWidth()
  {
    if (this.__scrollbarWidth) {
      return this.__scrollbarWidth;
    }
    let hbox = this._document.createElementNS(XUL_NS, "hbox");
    hbox.setAttribute("style", "height: 0%; overflow: hidden");
    let scrollbar = this._document.createElementNS(XUL_NS, "scrollbar");
    scrollbar.setAttribute("orient", "vertical");
    hbox.appendChild(scrollbar);
    this._document.documentElement.appendChild(hbox);
    this.__scrollbarWidth = scrollbar.clientWidth;
    this._document.documentElement.removeChild(hbox);
    return this.__scrollbarWidth;
  }
get _scrollbarWidth ( ) { if ( this . __scrollbarWidth ) { return this . __scrollbarWidth ; } let hbox = this . _document . createElementNS ( XUL_NS , "hbox" ) ; hbox . setAttribute ( "style" , "height: 0%; overflow: hidden" ) ; let scrollbar = this . _document . createElementNS ( XUL_NS , "scrollbar" ) ; scrollbar . setAttribute ( "orient" , "vertical" ) ; hbox . appendChild ( scrollbar ) ; this . _document . documentElement . appendChild ( hbox ) ; this . __scrollbarWidth = scrollbar . clientWidth ; this . _document . documentElement . removeChild ( hbox ) ; return this . __scrollbarWidth ; }
Determine the scrollbar width in the current document.
Determine the scrollbar width in the current document .