B2G/gecko/browser/devtools/debugger/debugger-view.js
/**
   * Scrolls a match into view.
   * @param nsIDOMElement aTarget
   */
Scrolls a match into view.
Scrolls a match into view .
function DVGS__scrollMatchIntoViewIfNeeded(aTarget) {
    let { clientHeight } = this._pane;
    let { top, height } = aTarget.getBoundingClientRect();
    let style = window.getComputedStyle(aTarget);
    let topBorderSize = window.parseInt(style.getPropertyValue("border-top-width"));
    let bottomBorderSize = window.parseInt(style.getPropertyValue("border-bottom-width"));
    let marginY = top - (height + topBorderSize + bottomBorderSize) * 2;
    if (marginY <= 0) {
      this._pane.scrollTop += marginY;
    }
    if (marginY + height > clientHeight) {
      this._pane.scrollTop += height - (clientHeight - marginY);
    }
  }
function DVGS__scrollMatchIntoViewIfNeeded ( aTarget ) { let { clientHeight } = this . _pane ; let { top , height } = aTarget . getBoundingClientRect ( ) ; let style = window . getComputedStyle ( aTarget ) ; let topBorderSize = window . parseInt ( style . getPropertyValue ( "border-top-width" ) ) ; let bottomBorderSize = window . parseInt ( style . getPropertyValue ( "border-bottom-width" ) ) ; let marginY = top - ( height + topBorderSize + bottomBorderSize ) * 2 ; if ( marginY <= 0 ) { this . _pane . scrollTop += marginY ; } if ( marginY + height > clientHeight ) { this . _pane . scrollTop += height - ( clientHeight - marginY ) ; } }
Scrolls a match into view.
Scrolls a match into view .