third_party/gecko-16/win32/bin/modules/accessibility/Presenters.jsm
/*
   * This is a flattened list of the accessible's subtree in preorder.
   * It only includes the accessible's visible chidren.
   */
This is a flattened list of the accessible's subtree in preorder.
It only includes the accessible's visible chidren.
This is a flattened list of the accessible ' s subtree in preorder . It only includes the accessible ' s visible chidren .
get subtreePreorder() {
    function traversePreorder(aAccessible) {
      let list = [];
      let child = aAccessible.firstChild;
      while (child) {
        let state = {};
        child.getState(state, {});
        if (!(state.value & Ci.nsIAccessibleStates.STATE_INVISIBLE)) {
          list.push(child);
          list.push.apply(list, traversePreorder(child));
        }
        child = child.nextSibling;
      }
      return list;
    }
    if (!this._subtreePreOrder)
      this._subtreePreOrder = traversePreorder(this._accessible);
    return this._subtreePreOrder;
  }
get subtreePreorder ( ) { function traversePreorder ( aAccessible ) { let list = [ ] ; let child = aAccessible . firstChild ; while ( child ) { let state = { } ; child . getState ( state , { } ) ; if ( ! ( state . value & Ci . nsIAccessibleStates . STATE_INVISIBLE ) ) { list . push ( child ) ; list . push . apply ( list , traversePreorder ( child ) ) ; } child = child . nextSibling ; } return list ; } if ( ! this . _subtreePreOrder ) this . _subtreePreOrder = traversePreorder ( this . _accessible ) ; return this . _subtreePreOrder ; }
This is a flattened list of the accessible's subtree in preorder.
This is a flattened list of the accessible ' s subtree in preorder .