Position info (item n of m) incorrect if hidden focusable items in list

Bug: 836997
Change-Id: I971fa7076f72d51829b36af8e379260d48ca25ec
Reviewed-on: https://chromium-review.googlesource.com/c/1450235
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628890}
AXNode* AXTree::CreateNode(AXNode* parent,
                           int32_t id,
                           int32_t index_in_parent,
                           AXTreeUpdateState* update_state) {
  AXNode* new_node = new AXNode(this, parent, id, index_in_parent);
  id_map_[new_node->id()] = new_node;
  for (AXTreeObserver& observer : observers_) {
    if (update_state->IsChangedNode(new_node) &&
        !update_state->IsRemovedNode(new_node))
      observer.OnNodeCreated(this, new_node);
    else
      observer.OnNodeReparented(this, new_node);
  }
  return new_node;
}

AXNode* AXTree::CreateNode(AXNode* parent,
                           int32_t id,
                           int32_t index_in_parent,
                           AXTreeUpdateState* update_state) {
  AXNode* new_node = new AXNode(this, parent, id, index_in_parent);
  id_map_[new_node->id()] = new_node;
  for (AXTreeObserver& observer : observers_) {
    if (update_state->IsChangedNode(new_node) &&
        !update_state->IsRemovedNode(new_node))
      observer.OnNodeCreated(this, new_node);
    else
      observer.OnNodeReparented(this, new_node);
  }
  return new_node;
}
