B2G/gecko/accessible/src/jsat/Presenters.jsm
/*
   * This is a list of the accessible's ancestry up to the common ancestor
   * of the accessible and the old accessible. It is useful for giving the
   * user context as to where they are in the heirarchy.
   */
This is a list of the accessible's ancestry up to the common ancestor
of the accessible and the old accessible. It is useful for giving the
user context as to where they are in the heirarchy.
This is a list of the accessible ' s ancestry up to the common ancestor of the accessible and the old accessible . It is useful for giving the user context as to where they are in the heirarchy .
get newAncestry() {
    if (!this._newAncestry) {
      let newLineage = [];
      let oldLineage = [];
      let parent = this._accessible;
      while (parent && (parent = parent.parent))
        newLineage.push(parent);
      parent = this._oldAccessible;
      while (parent && (parent = parent.parent))
        oldLineage.push(parent);
      this._newAncestry = [];
      while (true) {
        let newAncestor = newLineage.pop();
        let oldAncestor = oldLineage.pop();
        if (newAncestor == undefined)
          break;
        if (newAncestor != oldAncestor)
          this._newAncestry.push(newAncestor);
      }
    }
    return this._newAncestry;
  }
get newAncestry ( ) { if ( ! this . _newAncestry ) { let newLineage = [ ] ; let oldLineage = [ ] ; let parent = this . _accessible ; while ( parent && ( parent = parent . parent ) ) newLineage . push ( parent ) ; parent = this . _oldAccessible ; while ( parent && ( parent = parent . parent ) ) oldLineage . push ( parent ) ; this . _newAncestry = [ ] ; while ( true ) { let newAncestor = newLineage . pop ( ) ; let oldAncestor = oldLineage . pop ( ) ; if ( newAncestor == undefined ) break ; if ( newAncestor != oldAncestor ) this . _newAncestry . push ( newAncestor ) ; } } return this . _newAncestry ; }
This is a list of the accessible's ancestry up to the common ancestor
 of the accessible and the old accessible.
This is a list of the accessible ' s ancestry up to the common ancestor of the accessible and the old accessible .