#include <ax_tree.h>
Classes | |
| struct | OrderedSetContent |
| struct | OrderedSetItemsMap |
Public Types | |
| using | IntReverseRelationMap = std::map< ax::mojom::IntAttribute, std::map< int32_t, std::set< int32_t > > > |
| using | IntListReverseRelationMap = std::map< ax::mojom::IntListAttribute, std::map< int32_t, std::set< int32_t > > > |
Public Member Functions | |
| AXTree () | |
| AXTree (const AXTreeUpdate &initial_state) | |
| virtual | ~AXTree () |
| AXTree (const AXTree &)=delete | |
| AXTree & | operator= (const AXTree &)=delete |
| void | AddObserver (AXTreeObserver *observer) |
| bool | HasObserver (AXTreeObserver *observer) |
| void | RemoveObserver (AXTreeObserver *observer) |
| std::vector< AXTreeObserver * > & | observers () |
| AXNode * | root () const |
| const AXTreeData & | data () const |
| void | Destroy () |
| AXTreeID | GetAXTreeID () const override |
| AXNode * | GetFromId (int32_t id) const override |
| virtual bool | Unserialize (const AXTreeUpdate &update) |
| virtual void | UpdateData (const AXTreeData &data) |
| gfx::RectF | RelativeToTreeBounds (const AXNode *node, gfx::RectF node_bounds, bool *offscreen=nullptr, bool clip_bounds=true) const |
| gfx::RectF | GetTreeBounds (const AXNode *node, bool *offscreen=nullptr, bool clip_bounds=true) const |
| std::set< int32_t > | GetReverseRelations (ax::mojom::IntAttribute attr, int32_t dst_id) const |
| std::set< int32_t > | GetReverseRelations (ax::mojom::IntListAttribute attr, int32_t dst_id) const |
| std::set< int32_t > | GetNodeIdsForChildTreeId (AXTreeID child_tree_id) const |
| const std::set< AXTreeID > | GetAllChildTreeIds () const |
| const IntReverseRelationMap & | int_reverse_relations () |
| const IntListReverseRelationMap & | intlist_reverse_relations () |
| std::string | ToString () const |
| const std::string & | error () const |
| int | size () |
| void | SetEnableExtraMacNodes (bool enabled) |
| bool | enable_extra_mac_nodes () const |
| int32_t | GetNextNegativeInternalNodeId () |
| std::optional< int > | GetPosInSet (const AXNode &node) override |
| std::optional< int > | GetSetSize (const AXNode &node) override |
| Selection | GetUnignoredSelection () const override |
| bool | GetTreeUpdateInProgressState () const override |
| void | SetTreeUpdateInProgressState (bool set_tree_update_value) |
| bool | HasPaginationSupport () const override |
| const std::vector< AXEventIntent > & | event_intents () const |
Friends | |
| class | AXTableInfoTest |
| using ui::AXTree::IntListReverseRelationMap = std::map<ax::mojom::IntListAttribute, std::map<int32_t, std::set<int32_t> >> |
| using ui::AXTree::IntReverseRelationMap = std::map<ax::mojom::IntAttribute, std::map<int32_t, std::set<int32_t> >> |
| ui::AXTree::AXTree | ( | ) |
Definition at line 684 of file ax_tree.cc.
References BASE_LOG, BASE_UNREACHABLE, error(), ui::AXNode::id(), ui::AXNode::kInvalidAXID, ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::nodes, root(), ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::root_id, and Unserialize().
|
explicit |
Definition at line 697 of file ax_tree.cc.
References BASE_LOG, BASE_UNREACHABLE, error(), and Unserialize().
|
virtual |
Definition at line 704 of file ax_tree.cc.
References Destroy().
|
delete |
| void ui::AXTree::AddObserver | ( | AXTreeObserver * | observer | ) |
Definition at line 708 of file ax_tree.cc.
Referenced by ui::AXEventGenerator::AXEventGenerator(), ui::TestAXNodeWrapper::GetOrCreate(), ui::TestAXNodeHelper::GetOrCreate(), and ui::AXEventGenerator::SetTree().
|
inline |
Definition at line 59 of file ax_tree.h.
Referenced by GetAXTreeID(), ui::TestAXNodeWrapper::GetTreeData(), GetUnignoredSelection(), ui::AXEventGenerator::OnAtomicUpdateFinished(), ui::TEST(), and Unserialize().
| void ui::AXTree::Destroy | ( | ) |
Definition at line 733 of file ax_tree.cc.
Referenced by ~AXTree().
|
inline |
Definition at line 141 of file ax_tree.h.
Referenced by ui::AXTableInfo::Update().
|
inline |
Definition at line 134 of file ax_tree.h.
Referenced by AXTree(), AXTree(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), and ui::TEST().
|
inline |
Definition at line 167 of file ax_tree.h.
Referenced by ui::AXEventGenerator::AddEvent(), and ui::AXEventGenerator::OnNodeDataChanged().
| const std::set< AXTreeID > ui::AXTree::GetAllChildTreeIds | ( | ) | const |
Definition at line 962 of file ax_tree.cc.
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 724 of file ax_tree.cc.
References data(), and ui::AXTreeData::tree_id.
Referenced by ui::TEST_F().
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 728 of file ax_tree.cc.
Referenced by GetSetSize(), GetUnignoredSelection(), ui::TestAXNodeWrapper::HasVisibleCaretOrSelection(), ui::AXEventGenerator::OnIntListAttributeChanged(), ui::AXEventGenerator::OnNodeDataChanged(), ui::AXEventGenerator::OnTreeDataChanged(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), and Unserialize().
| int32_t ui::AXTree::GetNextNegativeInternalNodeId | ( | ) |
Definition at line 1947 of file ax_tree.cc.
| std::set< int32_t > ui::AXTree::GetNodeIdsForChildTreeId | ( | AXTreeID | child_tree_id | ) | const |
Definition at line 952 of file ax_tree.cc.
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 2252 of file ax_tree.cc.
References ui::AXNode::data(), ui::AXNode::GetIntAttribute(), ui::AXNode::GetOrderedSet(), GetTreeUpdateInProgressState(), ui::AXNode::GetUnignoredChildCount(), ui::AXNode::HasIntAttribute(), ui::AXNode::id(), ui::AXNode::IsIgnored(), ui::AXNode::IsOrderedSetItem(), ax::mojom::kPopUpButton, ax::mojom::kPosInSet, and ui::AXNodeData::role.
| std::set< int32_t > ui::AXTree::GetReverseRelations | ( | ax::mojom::IntAttribute | attr, |
| int32_t | dst_id | ||
| ) | const |
Definition at line 922 of file ax_tree.cc.
References BASE_DCHECK, and ui::IsNodeIdIntAttribute().
Referenced by ui::TestAXNodeWrapper::GetReverseRelations(), ui::TestAXNodeWrapper::GetReverseRelations(), ui::TEST(), ui::TEST(), and ui::TEST().
| std::set< int32_t > ui::AXTree::GetReverseRelations | ( | ax::mojom::IntListAttribute | attr, |
| int32_t | dst_id | ||
| ) | const |
Definition at line 937 of file ax_tree.cc.
References BASE_DCHECK, and ui::IsNodeIdIntListAttribute().
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 2287 of file ax_tree.cc.
References ui::AXNode::data(), GetFromId(), ui::AXNode::GetIntAttribute(), ui::AXNodeData::GetIntListAttribute(), ui::AXNode::GetOrderedSet(), GetSetSize(), GetTreeUpdateInProgressState(), ui::AXNode::GetUnignoredChildCount(), ui::AXNode::HasIntAttribute(), ui::AXNode::id(), ui::AXNode::IsEmbeddedGroup(), ui::AXNode::IsIgnored(), ui::IsItemLike(), ui::AXNode::IsOrderedSet(), ui::AXNode::IsOrderedSetItem(), ax::mojom::kControlsIds, ax::mojom::kPopUpButton, ax::mojom::kSetSize, and ui::AXNodeData::role.
Referenced by GetSetSize().
| gfx::RectF ui::AXTree::GetTreeBounds | ( | const AXNode * | node, |
| bool * | offscreen = nullptr, |
||
| bool | clip_bounds = true |
||
| ) | const |
Definition at line 916 of file ax_tree.cc.
References RelativeToTreeBounds().
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 2463 of file ax_tree.cc.
Referenced by GetPosInSet(), and GetSetSize().
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 2345 of file ax_tree.cc.
References ui::AXNode::OwnerTree::Selection::anchor_affinity, ui::AXNode::OwnerTree::Selection::anchor_object_id, ui::AXNode::OwnerTree::Selection::anchor_offset, ui::AXPosition< AXNodePosition, AXNode >::CreateNullPosition(), ui::AXNodePosition::CreatePosition(), data(), ui::AXNode::OwnerTree::Selection::focus_affinity, ui::AXNode::OwnerTree::Selection::focus_object_id, ui::AXNode::OwnerTree::Selection::focus_offset, GetFromId(), ax::mojom::kDownstream, ax::mojom::kInlineTextBox, ui::AXNode::kInvalidAXID, ui::kMoveBackward, ui::kMoveForward, ui::NULL_POSITION, ui::AXTreeData::sel_anchor_affinity, ui::AXTreeData::sel_anchor_object_id, ui::AXTreeData::sel_anchor_offset, ui::AXTreeData::sel_focus_affinity, ui::AXTreeData::sel_focus_object_id, ui::AXTreeData::sel_focus_offset, ui::AXTreeData::sel_is_backward, ui::TEXT_POSITION, and ui::TREE_POSITION.
Referenced by ui::TestAXNodeWrapper::GetUnignoredSelection(), and ui::TEST().
| bool ui::AXTree::HasObserver | ( | AXTreeObserver * | observer | ) |
Definition at line 712 of file ax_tree.cc.
Referenced by ui::TestAXNodeWrapper::GetOrCreate(), and ui::TestAXNodeHelper::GetOrCreate().
|
overridevirtual |
Implements ui::AXNode::OwnerTree.
Definition at line 2471 of file ax_tree.cc.
|
inline |
Definition at line 122 of file ax_tree.h.
Referenced by ui::TEST().
|
inline |
Definition at line 125 of file ax_tree.h.
Referenced by ui::TEST().
|
inline |
Definition at line 55 of file ax_tree.h.
Referenced by ui::AXTableInfo::~AXTableInfo().
| gfx::RectF ui::AXTree::RelativeToTreeBounds | ( | const AXNode * | node, |
| gfx::RectF | node_bounds, | ||
| bool * | offscreen = nullptr, |
||
| bool | clip_bounds = true |
||
| ) | const |
Definition at line 907 of file ax_tree.cc.
Referenced by GetTreeBounds().
| void ui::AXTree::RemoveObserver | ( | AXTreeObserver * | observer | ) |
Definition at line 717 of file ax_tree.cc.
Referenced by ui::AXEventGenerator::ReleaseTree(), and ui::AXEventGenerator::SetTree().
|
inline |
Definition at line 57 of file ax_tree.h.
Referenced by AXTree(), ui::AXTableInfo::Create(), ui::AXEventGenerator::OnAtomicUpdateFinished(), ui::AXEventGenerator::OnStringAttributeChanged(), ui::AXEventGenerator::OnTreeDataChanged(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), and ui::TEST_F().
| void ui::AXTree::SetEnableExtraMacNodes | ( | bool | enabled | ) |
Definition at line 1933 of file ax_tree.cc.
References BASE_DCHECK, BASE_LOG, and BASE_UNREACHABLE.
Referenced by ui::TEST_F(), and ui::TEST_F().
| void ui::AXTree::SetTreeUpdateInProgressState | ( | bool | set_tree_update_value | ) |
Definition at line 2467 of file ax_tree.cc.
Referenced by ui::TEST(), and Unserialize().
|
inline |
| std::string ui::AXTree::ToString | ( | ) | const |
Definition at line 1240 of file ax_tree.cc.
References ui::AXTreeData::ToString().
Referenced by ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), and ui::TEST().
|
virtual |
Definition at line 969 of file ax_tree.cc.
References BASE_DCHECK, ui::AXNode::data(), data(), GetFromId(), ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::has_tree_data, i, ui::AXNode::id(), ui::AXNodeData::id, ui::AXTreeUpdateState::invalidate_unignored_cached_values_ids, ui::AXTreeUpdateState::IsCreatedNode(), ui::AXNodeData::IsIgnored(), ui::AXTreeUpdateState::IsRemovedNode(), ui::AXTreeUpdateState::IsReparentedNode(), ui::AXNode::kInvalidAXID, ui::AXTreeUpdateState::new_node_ids, ui::AXTreeObserver::NODE_CHANGED, ui::AXTreeObserver::NODE_CREATED, ui::AXTreeUpdateState::node_data_changed_ids, ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::node_id_to_clear, ui::AXTreeUpdateState::node_id_to_pending_data, ui::AXTreeObserver::NODE_REPARENTED, ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::nodes, ui::AXTreeUpdateState::old_node_id_to_data, ui::AXTreeUpdateState::old_tree_data, ui::AXNode::parent(), ui::AXTreeUpdateState::pending_nodes, ui::AXTreeUpdateState::removed_node_ids, ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::root_id, ui::AXTreeUpdateState::root_will_be_created, SetTreeUpdateInProgressState(), ui::AXTreeObserver::SUBTREE_CREATED, ui::AXTreeObserver::SUBTREE_REPARENTED, ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::tree_data, and ui::AXNode::UpdateUnignoredCachedValues().
Referenced by AXTree(), AXTree(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), ui::TEST_F(), and ui::TEST_F().
|
virtual |
Definition at line 744 of file ax_tree.cc.
|
friend |