B2G/gecko/browser/components/places/content/treeView.js
/**
   * This counts how many rows a node takes in the tree.  For containers it
   * will count the node itself plus any child node following it.
   */
This counts how many rows a node takes in the tree.  For containers it
will count the node itself plus any child node following it.
This counts how many rows a node takes in the tree . For containers it will count the node itself plus any child node following it .
function PTV__countVisibleRowsForNodeAtRow(aNodeRow) {
    let node = this._rows[aNodeRow];
    if (!(node instanceof Ci.nsINavHistoryContainerResultNode))
      return 1;
    let outerLevel = node.indentLevel;
    for (let i = aNodeRow + 1; i < this._rows.length; i++) {
      let rowNode = this._rows[i];
      if (rowNode && rowNode.indentLevel <= outerLevel)
        return i - aNodeRow;
    }
    return this._rows.length - aNodeRow;
  }
function PTV__countVisibleRowsForNodeAtRow ( aNodeRow ) { let node = this . _rows [ aNodeRow ] ; if ( ! ( node instanceof Ci . nsINavHistoryContainerResultNode ) ) return 1 ; let outerLevel = node . indentLevel ; for ( let i = aNodeRow + 1 ; i < this . _rows . length ; i ++ ) { let rowNode = this . _rows [ i ] ; if ( rowNode && rowNode . indentLevel <= outerLevel ) return i - aNodeRow ; } return this . _rows . length - aNodeRow ; }
This counts how many rows a node takes in the tree.
This counts how many rows a node takes in the tree .
// If it's not listed yet, we know that it's a leaf node (instanceof also // null-checks). // This node plus its children take up the bottom of the list.