B2G/gecko/browser/components/downloads/content/indicator.js
/**
   * Determines the position where the indicator should appear, and moves its
   * associated element to the new position.
   *
   * @return Anchor element, or null if the indicator is not visible.
   */
Determines the position where the indicator should appear, and moves its
associated element to the new position.

@return Anchor element, or null if the indicator is not visible.
Determines the position where the indicator should appear and moves its associated element to the new position . @return Anchor element or null if the indicator is not visible .
function DB_updatePositionInternal()
  {
    let indicator = DownloadsIndicatorView.indicator;
    if (!indicator) {
      return null;
    }
    let placeholder = this._placeholder;
    if (!placeholder) {
      indicator.collapsed = true;
      return null;
    }
    placeholder.parentNode.insertBefore(indicator, placeholder);
    placeholder.collapsed = true;
    indicator.collapsed = false;
    indicator.open = this._anchorRequested;
    if (!isElementVisible(placeholder.parentNode)) {
      return null;
    }
    return DownloadsIndicatorView.indicatorAnchor;
  }
function DB_updatePositionInternal ( ) { let indicator = DownloadsIndicatorView . indicator ; if ( ! indicator ) { return null ; } let placeholder = this . _placeholder ; if ( ! placeholder ) { indicator . collapsed = true ; return null ; } placeholder . parentNode . insertBefore ( indicator , placeholder ) ; placeholder . collapsed = true ; indicator . collapsed = false ; indicator . open = this . _anchorRequested ; if ( ! isElementVisible ( placeholder . parentNode ) ) { return null ; } return DownloadsIndicatorView . indicatorAnchor ; }
Determines the position where the indicator should appear, and moves its
 associated element to the new position.
Determines the position where the indicator should appear and moves its associated element to the new position .
// Exit now if the indicator overlay isn't loaded yet. // The placeholder has been removed from the browser window. // Position the indicator where the placeholder is located.  We should // update the position even if the placeholder is located on an invisible // toolbar, because the toolbar may be displayed later. // Determine if the placeholder is located on an invisible toolbar.