third_party/js/mozmill/shared-modules/localization.js
function filterAccessKeys(node) {
  // Menus will need a separate filter set
  var notAllowedLocalNames = ["menu", "menubar", "menupopup", "popupset"];

  if (!node.disabled && !node.collapsed && !node.hidden &&
      notAllowedLocalNames.indexOf(node.localName) == -1) {
    // Code specific to the preferences panes to reject out not visible nodes
    // in the panes.
    if (node.parentNode && (node.parentNode.localName == "prefwindow" &&
                            node.parentNode.currentPane.id != node.id) ||
        ((node.parentNode.localName == "tabpanels" ||
          node.parentNode.localName == "deck") &&
          node.parentNode.selectedPanel.id != node.id)) {
      return domUtils.DOMWalker.FILTER_REJECT;
      // end of the specific code
    } else if (node.accessKey) {
      return domUtils.DOMWalker.FILTER_ACCEPT;
    } else {
      return domUtils.DOMWalker.FILTER_SKIP;
    }
  } else {
    // we don't want to test not visible elements
    return domUtils.DOMWalker.FILTER_REJECT;
  }
}
function filterAccessKeys(node) {
  // Menus will need a separate filter set
  var notAllowedLocalNames = ["menu", "menubar", "menupopup", "popupset"];

  if (!node.disabled && !node.collapsed && !node.hidden &&
      notAllowedLocalNames.indexOf(node.localName) == -1) {
    // Code specific to the preferences panes to reject out not visible nodes
    // in the panes.
    if (node.parentNode && (node.parentNode.localName == "prefwindow" &&
                            node.parentNode.currentPane.id != node.id) ||
        ((node.parentNode.localName == "tabpanels" ||
          node.parentNode.localName == "deck") &&
          node.parentNode.selectedPanel.id != node.id)) {
      return domUtils.DOMWalker.FILTER_REJECT;
      // end of the specific code
    } else if (node.accessKey) {
      return domUtils.DOMWalker.FILTER_ACCEPT;
    } else {
      return domUtils.DOMWalker.FILTER_SKIP;
    }
  } else {
    // we don't want to test not visible elements
    return domUtils.DOMWalker.FILTER_REJECT;
  }
}
function filterAccessKeys ( node ) { // Menus will need a separate filter set var notAllowedLocalNames = [ "menu" , "menubar" , "menupopup" , "popupset" ] ; if ( ! node . disabled && ! node . collapsed && ! node . hidden && notAllowedLocalNames . indexOf ( node . localName ) == - 1 ) { // Code specific to the preferences panes to reject out not visible nodes // in the panes. if ( node . parentNode && ( node . parentNode . localName == "prefwindow" && node . parentNode . currentPane . id != node . id ) || ( ( node . parentNode . localName == "tabpanels" || node . parentNode . localName == "deck" ) && node . parentNode . selectedPanel . id != node . id ) ) { return domUtils . DOMWalker . FILTER_REJECT ; // end of the specific code } else if ( node . accessKey ) { return domUtils . DOMWalker . FILTER_ACCEPT ; } else { return domUtils . DOMWalker . FILTER_SKIP ; } } else { // we don't want to test not visible elements return domUtils . DOMWalker . FILTER_REJECT ; } }
Filters out nodes which should not be tested because they are not in the
current access key scope.

@param {node} node
@returns Filter status of the given node
@type {array of array of int}
Filters out nodes which should not be tested because they are not in the current access key scope .