B2G/gecko/browser/base/content/newtab/updater.js
/**
   * Updates the current grid according to its pinned and blocked sites.
   * This removes old, moves existing and creates new sites to fill gaps.
   * @param aCallback The callback to call when finished.
   */
Updates the current grid according to its pinned and blocked sites.
This removes old, moves existing and creates new sites to fill gaps.
@param aCallback The callback to call when finished.
Updates the current grid according to its pinned and blocked sites . This removes old moves existing and creates new sites to fill gaps . @param aCallback The callback to call when finished .
function Updater_updateGrid(aCallback) {
    let links = gLinks.getLinks().slice(0, gGrid.cells.length);
    let sites = this._findRemainingSites(links);
    let self = this;
    this._removeLegacySites(sites, function () {
      self._freezeSitePositions(sites);
      self._moveSiteNodes(sites);
      self._rearrangeSites(sites, function () {
        self._fillEmptyCells(links, aCallback);
        gAllPages.update(gPage);
      });
    });
  }
function Updater_updateGrid ( aCallback ) { let links = gLinks . getLinks ( ) . slice ( 0 , gGrid . cells . length ) ; let sites = this . _findRemainingSites ( links ) ; let self = this ; this . _removeLegacySites ( sites , function ( ) { self . _freezeSitePositions ( sites ) ; self . _moveSiteNodes ( sites ) ; self . _rearrangeSites ( sites , function ( ) { self . _fillEmptyCells ( links , aCallback ) ; gAllPages . update ( gPage ) ; } ) ; } ) ; }
Updates the current grid according to its pinned and blocked sites.
Updates the current grid according to its pinned and blocked sites .
// Find all sites that remain in the grid. // Remove sites that are no longer in the grid. // Freeze all site positions so that we can move their DOM nodes around // without any visual impact. // Move the sites' DOM nodes to their new position in the DOM. This will // have no visual effect as all the sites have been frozen and will // remain in their current position. // Now it's time to animate the sites actually moving to their new // positions. // Try to fill empty cells and finish. // Update other pages that might be open to keep them synced.