Flutter Engine
 
Loading...
Searching...
No Matches
ui::AXNodeData Struct Reference

#include <ax_node_data.h>

Public Types

using AXID = int32_t
 

Public Member Functions

 AXNodeData ()
 
virtual ~AXNodeData ()
 
 AXNodeData (const AXNodeData &other)
 
 AXNodeData (AXNodeData &&other)
 
AXNodeDataoperator= (AXNodeData other)
 
bool HasBoolAttribute (ax::mojom::BoolAttribute attribute) const
 
bool GetBoolAttribute (ax::mojom::BoolAttribute attribute) const
 
bool GetBoolAttribute (ax::mojom::BoolAttribute attribute, bool *value) const
 
bool HasFloatAttribute (ax::mojom::FloatAttribute attribute) const
 
float GetFloatAttribute (ax::mojom::FloatAttribute attribute) const
 
bool GetFloatAttribute (ax::mojom::FloatAttribute attribute, float *value) const
 
bool HasIntAttribute (ax::mojom::IntAttribute attribute) const
 
int GetIntAttribute (ax::mojom::IntAttribute attribute) const
 
bool GetIntAttribute (ax::mojom::IntAttribute attribute, int *value) const
 
bool HasStringAttribute (ax::mojom::StringAttribute attribute) const
 
const std::string & GetStringAttribute (ax::mojom::StringAttribute attribute) const
 
bool GetStringAttribute (ax::mojom::StringAttribute attribute, std::string *value) const
 
bool GetString16Attribute (ax::mojom::StringAttribute attribute, std::u16string *value) const
 
std::u16string GetString16Attribute (ax::mojom::StringAttribute attribute) const
 
bool HasIntListAttribute (ax::mojom::IntListAttribute attribute) const
 
const std::vector< int32_t > & GetIntListAttribute (ax::mojom::IntListAttribute attribute) const
 
bool GetIntListAttribute (ax::mojom::IntListAttribute attribute, std::vector< int32_t > *value) const
 
bool HasStringListAttribute (ax::mojom::StringListAttribute attribute) const
 
const std::vector< std::string > & GetStringListAttribute (ax::mojom::StringListAttribute attribute) const
 
bool GetStringListAttribute (ax::mojom::StringListAttribute attribute, std::vector< std::string > *value) const
 
bool GetHtmlAttribute (const char *attribute, std::u16string *value) const
 
bool GetHtmlAttribute (const char *attribute, std::string *value) const
 
void AddStringAttribute (ax::mojom::StringAttribute attribute, const std::string &value)
 
void AddIntAttribute (ax::mojom::IntAttribute attribute, int32_t value)
 
void AddFloatAttribute (ax::mojom::FloatAttribute attribute, float value)
 
void AddBoolAttribute (ax::mojom::BoolAttribute attribute, bool value)
 
void AddIntListAttribute (ax::mojom::IntListAttribute attribute, const std::vector< int32_t > &value)
 
void AddStringListAttribute (ax::mojom::StringListAttribute attribute, const std::vector< std::string > &value)
 
void RemoveStringAttribute (ax::mojom::StringAttribute attribute)
 
void RemoveIntAttribute (ax::mojom::IntAttribute attribute)
 
void RemoveFloatAttribute (ax::mojom::FloatAttribute attribute)
 
void RemoveBoolAttribute (ax::mojom::BoolAttribute attribute)
 
void RemoveIntListAttribute (ax::mojom::IntListAttribute attribute)
 
void RemoveStringListAttribute (ax::mojom::StringListAttribute attribute)
 
AXNodeTextStyles GetTextStyles () const
 
void SetName (const std::string &name)
 
void SetName (const std::u16string &name)
 
void SetNameExplicitlyEmpty ()
 
void SetDescription (const std::string &description)
 
void SetDescription (const std::u16string &description)
 
void SetValue (const std::string &value)
 
void SetValue (const std::u16string &value)
 
void SetTooltip (const std::string &value)
 
void SetTooltip (const std::u16string &value)
 
bool HasState (ax::mojom::State state) const
 
bool HasAction (ax::mojom::Action action) const
 
bool HasTextStyle (ax::mojom::TextStyle text_style) const
 
bool HasDropeffect (ax::mojom::Dropeffect dropeffect) const
 
void AddState (ax::mojom::State state)
 
void RemoveState (ax::mojom::State state)
 
void AddAction (ax::mojom::Action action)
 
void AddTextStyle (ax::mojom::TextStyle text_style)
 
void AddDropeffect (ax::mojom::Dropeffect dropeffect)
 
ax::mojom::CheckedState GetCheckedState () const
 
void SetCheckedState (ax::mojom::CheckedState checked_state)
 
bool HasCheckedState () const
 
ax::mojom::DefaultActionVerb GetDefaultActionVerb () const
 
void SetDefaultActionVerb (ax::mojom::DefaultActionVerb default_action_verb)
 
ax::mojom::HasPopup GetHasPopup () const
 
void SetHasPopup (ax::mojom::HasPopup has_popup)
 
ax::mojom::InvalidState GetInvalidState () const
 
void SetInvalidState (ax::mojom::InvalidState invalid_state)
 
ax::mojom::NameFrom GetNameFrom () const
 
void SetNameFrom (ax::mojom::NameFrom name_from)
 
ax::mojom::DescriptionFrom GetDescriptionFrom () const
 
void SetDescriptionFrom (ax::mojom::DescriptionFrom description_from)
 
ax::mojom::TextPosition GetTextPosition () const
 
void SetTextPosition (ax::mojom::TextPosition text_position)
 
ax::mojom::Restriction GetRestriction () const
 
void SetRestriction (ax::mojom::Restriction restriction)
 
ax::mojom::ListStyle GetListStyle () const
 
void SetListStyle (ax::mojom::ListStyle list_style)
 
ax::mojom::TextAlign GetTextAlign () const
 
void SetTextAlign (ax::mojom::TextAlign text_align)
 
ax::mojom::WritingDirection GetTextDirection () const
 
void SetTextDirection (ax::mojom::WritingDirection text_direction)
 
ax::mojom::ImageAnnotationStatus GetImageAnnotationStatus () const
 
void SetImageAnnotationStatus (ax::mojom::ImageAnnotationStatus status)
 
bool IsActivatable () const
 
bool IsButtonPressed () const
 
bool IsClickable () const
 
bool IsSelectable () const
 
bool IsIgnored () const
 
bool IsInvisible () const
 
bool IsInvisibleOrIgnored () const
 
bool IsInvocable () const
 
bool IsMenuButton () const
 
bool IsTextField () const
 
bool IsPasswordField () const
 
bool IsPlainTextField () const
 
bool IsRichTextField () const
 
bool IsReadOnlyOrDisabled () const
 
bool IsRangeValueSupported () const
 
bool SupportsExpandCollapse () const
 
virtual std::string ToString () const
 
std::string DropeffectBitfieldToString () const
 

Public Attributes

int32_t id = -1
 
ax::mojom::Role role
 
uint32_t state
 
uint64_t actions
 
std::vector< std::pair< ax::mojom::StringAttribute, std::string > > string_attributes
 
std::vector< std::pair< ax::mojom::IntAttribute, int32_t > > int_attributes
 
std::vector< std::pair< ax::mojom::FloatAttribute, float > > float_attributes
 
std::vector< std::pair< ax::mojom::BoolAttribute, bool > > bool_attributes
 
std::vector< std::pair< ax::mojom::IntListAttribute, std::vector< int32_t > > > intlist_attributes
 
std::vector< std::pair< ax::mojom::StringListAttribute, std::vector< std::string > > > stringlist_attributes
 
std::vector< std::pair< std::string, std::string > > html_attributes
 
std::vector< int32_t > child_ids
 
AXRelativeBounds relative_bounds
 

Detailed Description

Definition at line 33 of file ax_node_data.h.

Member Typedef Documentation

◆ AXID

using ui::AXNodeData::AXID = int32_t

Definition at line 35 of file ax_node_data.h.

Constructor & Destructor Documentation

◆ AXNodeData() [1/3]

ui::AXNodeData::AXNodeData ( )

Definition at line 208 of file ax_node_data.cc.

ax::mojom::Role role

◆ ~AXNodeData()

ui::AXNodeData::~AXNodeData ( )
virtualdefault

◆ AXNodeData() [2/3]

ui::AXNodeData::AXNodeData ( const AXNodeData other)

Definition at line 213 of file ax_node_data.cc.

213 {
214 id = other.id;
215 role = other.role;
216 state = other.state;
217 actions = other.actions;
218 string_attributes = other.string_attributes;
219 int_attributes = other.int_attributes;
220 float_attributes = other.float_attributes;
221 bool_attributes = other.bool_attributes;
222 intlist_attributes = other.intlist_attributes;
223 stringlist_attributes = other.stringlist_attributes;
224 html_attributes = other.html_attributes;
225 child_ids = other.child_ids;
226 relative_bounds = other.relative_bounds;
227}
AXRelativeBounds relative_bounds
std::vector< std::pair< ax::mojom::FloatAttribute, float > > float_attributes
std::vector< int32_t > child_ids
std::vector< std::pair< ax::mojom::IntAttribute, int32_t > > int_attributes
std::vector< std::pair< ax::mojom::IntListAttribute, std::vector< int32_t > > > intlist_attributes
std::vector< std::pair< ax::mojom::StringAttribute, std::string > > string_attributes
std::vector< std::pair< std::string, std::string > > html_attributes
std::vector< std::pair< ax::mojom::StringListAttribute, std::vector< std::string > > > stringlist_attributes
std::vector< std::pair< ax::mojom::BoolAttribute, bool > > bool_attributes

References actions, bool_attributes, child_ids, float_attributes, html_attributes, id, int_attributes, intlist_attributes, relative_bounds, role, state, string_attributes, and stringlist_attributes.

◆ AXNodeData() [3/3]

ui::AXNodeData::AXNodeData ( AXNodeData &&  other)

Definition at line 229 of file ax_node_data.cc.

229 {
230 id = other.id;
231 role = other.role;
232 state = other.state;
233 actions = other.actions;
234 string_attributes.swap(other.string_attributes);
235 int_attributes.swap(other.int_attributes);
236 float_attributes.swap(other.float_attributes);
237 bool_attributes.swap(other.bool_attributes);
238 intlist_attributes.swap(other.intlist_attributes);
239 stringlist_attributes.swap(other.stringlist_attributes);
240 html_attributes.swap(other.html_attributes);
241 child_ids.swap(other.child_ids);
242 relative_bounds = other.relative_bounds;
243}

References actions, bool_attributes, child_ids, float_attributes, html_attributes, int_attributes, intlist_attributes, relative_bounds, role, state, string_attributes, and stringlist_attributes.

Member Function Documentation

◆ AddAction()

void ui::AXNodeData::AddAction ( ax::mojom::Action  action)

Definition at line 680 of file ax_node_data.cc.

680 {
681 switch (action_enum) {
684 break;
685
686 // Note: all of the attributes are included here explicitly, rather than
687 // using "default:", so that it's a compiler error to add a new action
688 // without explicitly considering whether there are mutually exclusive
689 // actions that can be performed on a UI control at the same time.
692 ax::mojom::Action excluded_action =
694 : ax::mojom::Action::kBlur;
695 BASE_DCHECK(!HasAction(excluded_action));
696 break;
697 }
698
730 break;
731 }
732
733 actions = ModifyFlag(actions, static_cast<uint32_t>(action_enum), true);
734}
@ kSetSequentialFocusNavigationStartingPoint
@ kBlur
Definition paint.cc:61
bool HasAction(ax::mojom::Action action) const
#define BASE_DCHECK(condition)
Definition logging.h:63
#define BASE_UNREACHABLE()
Definition logging.h:69

References actions, BASE_DCHECK, BASE_UNREACHABLE, HasAction(), ax::mojom::kAnnotatePageImages, ax::mojom::kBlur, ax::mojom::kClearAccessibilityFocus, ax::mojom::kCollapse, ax::mojom::kCustomAction, ax::mojom::kDecrement, ax::mojom::kDoDefault, ax::mojom::kExpand, ax::mojom::kFocus, ax::mojom::kGetImageData, ax::mojom::kGetTextLocation, ax::mojom::kHideTooltip, ax::mojom::kHitTest, ax::mojom::kIncrement, ax::mojom::kInternalInvalidateTree, ax::mojom::kLoadInlineTextBoxes, ax::mojom::kNone, ax::mojom::kReplaceSelectedText, ax::mojom::kScrollBackward, ax::mojom::kScrollDown, ax::mojom::kScrollForward, ax::mojom::kScrollLeft, ax::mojom::kScrollRight, ax::mojom::kScrollToMakeVisible, ax::mojom::kScrollToPoint, ax::mojom::kScrollUp, ax::mojom::kSetAccessibilityFocus, ax::mojom::kSetScrollOffset, ax::mojom::kSetSelection, ax::mojom::kSetSequentialFocusNavigationStartingPoint, ax::mojom::kSetValue, ax::mojom::kShowContextMenu, ax::mojom::kShowTooltip, and ax::mojom::kSignalEndOfTest.

◆ AddBoolAttribute()

void ui::AXNodeData::AddBoolAttribute ( ax::mojom::BoolAttribute  attribute,
bool  value 
)

Definition at line 470 of file ax_node_data.cc.

471 {
473 if (HasBoolAttribute(attribute))
474 RemoveBoolAttribute(attribute);
475 bool_attributes.push_back(std::make_pair(attribute, value));
476}
void RemoveBoolAttribute(ax::mojom::BoolAttribute attribute)
bool HasBoolAttribute(ax::mojom::BoolAttribute attribute) const

References BASE_DCHECK, bool_attributes, HasBoolAttribute(), ax::mojom::kNone, RemoveBoolAttribute(), and value.

Referenced by ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForBoundingRectangles(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMove(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMoveByFormat(), ui::AXPlatformNodeTest::BuildContentEditable(), ui::AXPlatformNodeTest::BuildContentEditableWithSelectionRange(), ui::AXPlatformNodeTest::BuildListBox(), ui::AXPlatformNodeTest::BuildTextFieldWithSelectionRange(), 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(), 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().

◆ AddDropeffect()

void ui::AXNodeData::AddDropeffect ( ax::mojom::Dropeffect  dropeffect)

Definition at line 748 of file ax_node_data.cc.

748 {
749 BASE_DCHECK(static_cast<int>(dropeffect_enum) >=
750 static_cast<int>(ax::mojom::Dropeffect::kMinValue));
751 BASE_DCHECK(static_cast<int>(dropeffect_enum) <=
752 static_cast<int>(ax::mojom::Dropeffect::kMaxValue));
754 dropeffect = ModifyFlag(static_cast<uint32_t>(dropeffect),
755 static_cast<uint32_t>(dropeffect_enum), true);
758}
void RemoveIntAttribute(ax::mojom::IntAttribute attribute)
void AddIntAttribute(ax::mojom::IntAttribute attribute, int32_t value)
int GetIntAttribute(ax::mojom::IntAttribute attribute) const

References AddIntAttribute(), BASE_DCHECK, GetIntAttribute(), ax::mojom::kDropeffect, ax::mojom::kMaxValue, ax::mojom::kMinValue, and RemoveIntAttribute().

◆ AddFloatAttribute()

void ui::AXNodeData::AddFloatAttribute ( ax::mojom::FloatAttribute  attribute,
float  value 
)

Definition at line 462 of file ax_node_data.cc.

463 {
465 if (HasFloatAttribute(attribute))
466 RemoveFloatAttribute(attribute);
467 float_attributes.push_back(std::make_pair(attribute, value));
468}
void RemoveFloatAttribute(ax::mojom::FloatAttribute attribute)
bool HasFloatAttribute(ax::mojom::FloatAttribute attribute) const

References BASE_DCHECK, float_attributes, HasFloatAttribute(), ax::mojom::kNone, RemoveFloatAttribute(), and value.

Referenced by ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMoveByFormat(), ui::TEST(), ui::TEST(), ui::TEST_F(), ui::TEST_F(), and ui::TEST_F().

◆ AddIntAttribute()

void ui::AXNodeData::AddIntAttribute ( ax::mojom::IntAttribute  attribute,
int32_t  value 
)

◆ AddIntListAttribute()

◆ AddState()

◆ AddStringAttribute()

void ui::AXNodeData::AddStringAttribute ( ax::mojom::StringAttribute  attribute,
const std::string &  value 
)

◆ AddStringListAttribute()

void ui::AXNodeData::AddStringListAttribute ( ax::mojom::StringListAttribute  attribute,
const std::vector< std::string > &  value 
)

Definition at line 486 of file ax_node_data.cc.

488 {
490 if (HasStringListAttribute(attribute))
491 RemoveStringListAttribute(attribute);
492 stringlist_attributes.push_back(std::make_pair(attribute, value));
493}
bool HasStringListAttribute(ax::mojom::StringListAttribute attribute) const
void RemoveStringListAttribute(ax::mojom::StringListAttribute attribute)

References BASE_DCHECK, HasStringListAttribute(), ax::mojom::kNone, RemoveStringListAttribute(), stringlist_attributes, and value.

Referenced by ui::TEST().

◆ AddTextStyle()

void ui::AXNodeData::AddTextStyle ( ax::mojom::TextStyle  text_style)

Definition at line 736 of file ax_node_data.cc.

736 {
737 BASE_DCHECK(static_cast<int>(text_style_enum) >=
738 static_cast<int>(ax::mojom::TextStyle::kMinValue));
739 BASE_DCHECK(static_cast<int>(text_style_enum) <=
740 static_cast<int>(ax::mojom::TextStyle::kMaxValue));
742 style = ModifyFlag(static_cast<uint32_t>(style),
743 static_cast<uint32_t>(text_style_enum), true);
746}

References AddIntAttribute(), BASE_DCHECK, GetIntAttribute(), ax::mojom::kMaxValue, ax::mojom::kMinValue, ax::mojom::kTextStyle, and RemoveIntAttribute().

Referenced by ui::TEST_F().

◆ DropeffectBitfieldToString()

std::string ui::AXNodeData::DropeffectBitfieldToString ( ) const

Definition at line 1729 of file ax_node_data.cc.

1729 {
1731 return "";
1732
1733 std::string str;
1734 for (int dropeffect_idx = static_cast<int>(ax::mojom::Dropeffect::kMinValue);
1735 dropeffect_idx <= static_cast<int>(ax::mojom::Dropeffect::kMaxValue);
1736 ++dropeffect_idx) {
1737 ax::mojom::Dropeffect dropeffect_enum =
1738 static_cast<ax::mojom::Dropeffect>(dropeffect_idx);
1739 if (HasDropeffect(dropeffect_enum))
1740 str += " " + std::string(ui::ToString(dropeffect_enum));
1741 }
1742
1743 // Removing leading space in final string.
1744 return str.substr(1);
1745}
const char * ToString(ax::mojom::Event event)
bool HasDropeffect(ax::mojom::Dropeffect dropeffect) const

References HasDropeffect(), HasIntAttribute(), ax::mojom::kDropeffect, ax::mojom::kMaxValue, ax::mojom::kMinValue, and ui::ToString().

Referenced by ui::AXPlatformNodeBase::ComputeAttributes().

◆ GetBoolAttribute() [1/2]

bool ui::AXNodeData::GetBoolAttribute ( ax::mojom::BoolAttribute  attribute) const

Definition at line 267 of file ax_node_data.cc.

267 {
268 bool result;
269 if (GetBoolAttribute(attribute, &result))
270 return result;
271 return false;
272}
bool GetBoolAttribute(ax::mojom::BoolAttribute attribute) const

References GetBoolAttribute().

Referenced by ui::TestAXNodeWrapper::AccessibilityPerformAction(), ui::AXPlatformNodeBase::GetBoolAttribute(), ui::AXPlatformNodeBase::GetBoolAttribute(), GetBoolAttribute(), ui::AXNode::IsLineBreak(), IsPlainTextField(), and IsRichTextField().

◆ GetBoolAttribute() [2/2]

bool ui::AXNodeData::GetBoolAttribute ( ax::mojom::BoolAttribute  attribute,
bool *  value 
) const

Definition at line 274 of file ax_node_data.cc.

275 {
276 auto iter = FindInVectorOfPairs(attribute, bool_attributes);
277 if (iter != bool_attributes.end()) {
278 *value = iter->second;
279 return true;
280 }
281
282 return false;
283}
int32_t value

References bool_attributes, and value.

◆ GetCheckedState()

ax::mojom::CheckedState ui::AXNodeData::GetCheckedState ( ) const

◆ GetDefaultActionVerb()

ax::mojom::DefaultActionVerb ui::AXNodeData::GetDefaultActionVerb ( ) const

◆ GetDescriptionFrom()

ax::mojom::DescriptionFrom ui::AXNodeData::GetDescriptionFrom ( ) const

◆ GetFloatAttribute() [1/2]

float ui::AXNodeData::GetFloatAttribute ( ax::mojom::FloatAttribute  attribute) const

Definition at line 290 of file ax_node_data.cc.

290 {
291 float result;
292 if (GetFloatAttribute(attribute, &result))
293 return result;
294 return 0.0;
295}
float GetFloatAttribute(ax::mojom::FloatAttribute attribute) const

References GetFloatAttribute().

Referenced by ui::AXPlatformNodeBase::GetFloatAttribute(), ui::AXPlatformNodeBase::GetFloatAttribute(), GetFloatAttribute(), and GetTextStyles().

◆ GetFloatAttribute() [2/2]

bool ui::AXNodeData::GetFloatAttribute ( ax::mojom::FloatAttribute  attribute,
float *  value 
) const

Definition at line 297 of file ax_node_data.cc.

298 {
299 auto iter = FindInVectorOfPairs(attribute, float_attributes);
300 if (iter != float_attributes.end()) {
301 *value = iter->second;
302 return true;
303 }
304
305 return false;
306}

References float_attributes, and value.

◆ GetHasPopup()

ax::mojom::HasPopup ui::AXNodeData::GetHasPopup ( ) const

◆ GetHtmlAttribute() [1/2]

bool ui::AXNodeData::GetHtmlAttribute ( const char *  attribute,
std::string *  value 
) const

Definition at line 424 of file ax_node_data.cc.

425 {
426 for (const std::pair<std::string, std::string>& html_attribute :
428 const std::string& attr = html_attribute.first;
429 if (base::LowerCaseEqualsASCII(attr, html_attr)) {
430 *value = html_attribute.second;
431 return true;
432 }
433 }
434
435 return false;
436}
bool LowerCaseEqualsASCII(std::string a, std::string b)

References html_attributes, base::LowerCaseEqualsASCII(), and value.

◆ GetHtmlAttribute() [2/2]

bool ui::AXNodeData::GetHtmlAttribute ( const char *  attribute,
std::u16string *  value 
) const

Definition at line 438 of file ax_node_data.cc.

439 {
440 std::string value_utf8;
441 if (!GetHtmlAttribute(html_attr, &value_utf8))
442 return false;
443 *value = base::UTF8ToUTF16(value_utf8);
444 return true;
445}
std::u16string UTF8ToUTF16(std::string src)
bool GetHtmlAttribute(const char *attribute, std::u16string *value) const

References GetHtmlAttribute(), base::UTF8ToUTF16(), and value.

Referenced by GetHtmlAttribute().

◆ GetImageAnnotationStatus()

ax::mojom::ImageAnnotationStatus ui::AXNodeData::GetImageAnnotationStatus ( ) const

◆ GetIntAttribute() [1/2]

◆ GetIntAttribute() [2/2]

bool ui::AXNodeData::GetIntAttribute ( ax::mojom::IntAttribute  attribute,
int *  value 
) const

Definition at line 320 of file ax_node_data.cc.

321 {
322 auto iter = FindInVectorOfPairs(attribute, int_attributes);
323 if (iter != int_attributes.end()) {
324 *value = static_cast<int>(iter->second);
325 return true;
326 }
327
328 return false;
329}

References int_attributes, and value.

◆ GetIntListAttribute() [1/2]

const std::vector< int32_t > & ui::AXNodeData::GetIntListAttribute ( ax::mojom::IntListAttribute  attribute) const

Definition at line 377 of file ax_node_data.cc.

378 {
379 static const base::NoDestructor<std::vector<int32_t>> empty_vector;
380 auto iter = FindInVectorOfPairs(attribute, intlist_attributes);
381 if (iter != intlist_attributes.end())
382 return iter->second;
383 return *empty_vector;
384}

References intlist_attributes.

Referenced by ui::AXPlatformNodeBase::GetIntListAttribute(), ui::AXPlatformNodeBase::GetIntListAttribute(), ui::AXTree::GetSetSize(), ui::AXNodePosition::GetWordEndOffsets(), ui::AXNodePosition::GetWordStartOffsets(), ui::TEST_F(), and ui::TEST_F().

◆ GetIntListAttribute() [2/2]

bool ui::AXNodeData::GetIntListAttribute ( ax::mojom::IntListAttribute  attribute,
std::vector< int32_t > *  value 
) const

Definition at line 386 of file ax_node_data.cc.

387 {
388 auto iter = FindInVectorOfPairs(attribute, intlist_attributes);
389 if (iter != intlist_attributes.end()) {
390 *value = iter->second;
391 return true;
392 }
393
394 return false;
395}

References intlist_attributes, and value.

◆ GetInvalidState()

ax::mojom::InvalidState ui::AXNodeData::GetInvalidState ( ) const

◆ GetListStyle()

ax::mojom::ListStyle ui::AXNodeData::GetListStyle ( ) const

Definition at line 893 of file ax_node_data.cc.

References GetIntAttribute(), and ax::mojom::kListStyle.

◆ GetNameFrom()

ax::mojom::NameFrom ui::AXNodeData::GetNameFrom ( ) const

◆ GetRestriction()

ax::mojom::Restriction ui::AXNodeData::GetRestriction ( ) const

◆ GetString16Attribute() [1/2]

std::u16string ui::AXNodeData::GetString16Attribute ( ax::mojom::StringAttribute  attribute) const

Definition at line 354 of file ax_node_data.cc.

355 {
356 std::string value_utf8;
357 if (!GetStringAttribute(attribute, &value_utf8))
358 return std::u16string();
359 return base::UTF8ToUTF16(value_utf8);
360}
const std::string & GetStringAttribute(ax::mojom::StringAttribute attribute) const

References GetStringAttribute(), and base::UTF8ToUTF16().

◆ GetString16Attribute() [2/2]

bool ui::AXNodeData::GetString16Attribute ( ax::mojom::StringAttribute  attribute,
std::u16string *  value 
) const

Definition at line 362 of file ax_node_data.cc.

363 {
364 std::string value_utf8;
365 if (!GetStringAttribute(attribute, &value_utf8))
366 return false;
367 *value = base::UTF8ToUTF16(value_utf8);
368 return true;
369}

References GetStringAttribute(), base::UTF8ToUTF16(), and value.

Referenced by ui::AXPlatformNodeDelegateBase::GetInnerText(), ui::AXPlatformNodeBase::GetString16Attribute(), ui::AXPlatformNodeBase::GetString16Attribute(), ui::AXNodePosition::GetText(), and ui::AXNodePosition::MaxTextOffset().

◆ GetStringAttribute() [1/2]

◆ GetStringAttribute() [2/2]

bool ui::AXNodeData::GetStringAttribute ( ax::mojom::StringAttribute  attribute,
std::string *  value 
) const

Definition at line 343 of file ax_node_data.cc.

344 {
345 auto iter = FindInVectorOfPairs(attribute, string_attributes);
346 if (iter != string_attributes.end()) {
347 *value = iter->second;
348 return true;
349 }
350
351 return false;
352}

References string_attributes, and value.

◆ GetStringListAttribute() [1/2]

const std::vector< std::string > & ui::AXNodeData::GetStringListAttribute ( ax::mojom::StringListAttribute  attribute) const

Definition at line 403 of file ax_node_data.cc.

404 {
405 static const base::NoDestructor<std::vector<std::string>> empty_vector;
406 auto iter = FindInVectorOfPairs(attribute, stringlist_attributes);
407 if (iter != stringlist_attributes.end())
408 return iter->second;
409 return *empty_vector;
410}

References stringlist_attributes.

◆ GetStringListAttribute() [2/2]

bool ui::AXNodeData::GetStringListAttribute ( ax::mojom::StringListAttribute  attribute,
std::vector< std::string > *  value 
) const

Definition at line 412 of file ax_node_data.cc.

414 {
415 auto iter = FindInVectorOfPairs(attribute, stringlist_attributes);
416 if (iter != stringlist_attributes.end()) {
417 *value = iter->second;
418 return true;
419 }
420
421 return false;
422}

References stringlist_attributes, and value.

◆ GetTextAlign()

ax::mojom::TextAlign ui::AXNodeData::GetTextAlign ( ) const

Definition at line 907 of file ax_node_data.cc.

References GetIntAttribute(), and ax::mojom::kTextAlign.

◆ GetTextDirection()

ax::mojom::WritingDirection ui::AXNodeData::GetTextDirection ( ) const

◆ GetTextPosition()

ax::mojom::TextPosition ui::AXNodeData::GetTextPosition ( ) const

◆ GetTextStyles()

AXNodeTextStyles ui::AXNodeData::GetTextStyles ( ) const

Definition at line 539 of file ax_node_data.cc.

539 {
540 AXNodeTextStyles style_attributes;
541
543 &style_attributes.background_color);
544 GetIntAttribute(ax::mojom::IntAttribute::kColor, &style_attributes.color);
546 &style_attributes.invalid_state);
548 &style_attributes.overline_style);
550 &style_attributes.text_direction);
552 &style_attributes.text_position);
554 &style_attributes.strikethrough_style);
556 &style_attributes.text_style);
558 &style_attributes.underline_style);
560 &style_attributes.font_size);
562 &style_attributes.font_weight);
564 &style_attributes.font_family);
565
566 return style_attributes;
567}

References ui::AXNodeTextStyles::background_color, ui::AXNodeTextStyles::color, ui::AXNodeTextStyles::font_family, ui::AXNodeTextStyles::font_size, ui::AXNodeTextStyles::font_weight, GetFloatAttribute(), GetIntAttribute(), GetStringAttribute(), ui::AXNodeTextStyles::invalid_state, ax::mojom::kBackgroundColor, ax::mojom::kColor, ax::mojom::kFontFamily, ax::mojom::kFontSize, ax::mojom::kFontWeight, ax::mojom::kInvalidState, ax::mojom::kTextDirection, ax::mojom::kTextOverlineStyle, ax::mojom::kTextPosition, ax::mojom::kTextStrikethroughStyle, ax::mojom::kTextStyle, ax::mojom::kTextUnderlineStyle, ui::AXNodeTextStyles::overline_style, ui::AXNodeTextStyles::strikethrough_style, ui::AXNodeTextStyles::text_direction, ui::AXNodeTextStyles::text_position, ui::AXNodeTextStyles::text_style, and ui::AXNodeTextStyles::underline_style.

Referenced by ui::AXNodePosition::GetTextStyles(), and ui::TEST().

◆ HasAction()

bool ui::AXNodeData::HasAction ( ax::mojom::Action  action) const

Definition at line 648 of file ax_node_data.cc.

648 {
649 return IsFlagSet(actions, static_cast<uint32_t>(action));
650}

References action, and actions.

Referenced by AddAction().

◆ HasBoolAttribute()

bool ui::AXNodeData::HasBoolAttribute ( ax::mojom::BoolAttribute  attribute) const

Definition at line 262 of file ax_node_data.cc.

262 {
263 auto iter = FindInVectorOfPairs(attribute, bool_attributes);
264 return iter != bool_attributes.end();
265}

References bool_attributes.

Referenced by AddBoolAttribute(), ui::AXPlatformNodeBase::HasBoolAttribute(), and IsSelectable().

◆ HasCheckedState()

bool ui::AXNodeData::HasCheckedState ( ) const

◆ HasDropeffect()

bool ui::AXNodeData::HasDropeffect ( ax::mojom::Dropeffect  dropeffect) const

Definition at line 658 of file ax_node_data.cc.

658 {
660 return IsFlagSet(static_cast<uint32_t>(dropeffect),
661 static_cast<uint32_t>(dropeffect_enum));
662}

References GetIntAttribute(), and ax::mojom::kDropeffect.

Referenced by DropeffectBitfieldToString().

◆ HasFloatAttribute()

bool ui::AXNodeData::HasFloatAttribute ( ax::mojom::FloatAttribute  attribute) const

Definition at line 285 of file ax_node_data.cc.

285 {
286 auto iter = FindInVectorOfPairs(attribute, float_attributes);
287 return iter != float_attributes.end();
288}

References float_attributes.

Referenced by AddFloatAttribute(), and ui::AXPlatformNodeBase::HasFloatAttribute().

◆ HasIntAttribute()

◆ HasIntListAttribute()

bool ui::AXNodeData::HasIntListAttribute ( ax::mojom::IntListAttribute  attribute) const

Definition at line 371 of file ax_node_data.cc.

372 {
373 auto iter = FindInVectorOfPairs(attribute, intlist_attributes);
374 return iter != intlist_attributes.end();
375}

References intlist_attributes.

Referenced by AddIntListAttribute(), and ui::AXPlatformNodeBase::HasIntListAttribute().

◆ HasState()

bool ui::AXNodeData::HasState ( ax::mojom::State  state) const

◆ HasStringAttribute()

◆ HasStringListAttribute()

bool ui::AXNodeData::HasStringListAttribute ( ax::mojom::StringListAttribute  attribute) const

Definition at line 397 of file ax_node_data.cc.

398 {
399 auto iter = FindInVectorOfPairs(attribute, stringlist_attributes);
400 return iter != stringlist_attributes.end();
401}

References stringlist_attributes.

Referenced by AddStringListAttribute().

◆ HasTextStyle()

bool ui::AXNodeData::HasTextStyle ( ax::mojom::TextStyle  text_style) const

Definition at line 652 of file ax_node_data.cc.

652 {
654 return IsFlagSet(static_cast<uint32_t>(style),
655 static_cast<uint32_t>(text_style_enum));
656}

References GetIntAttribute(), and ax::mojom::kTextStyle.

Referenced by ToString().

◆ IsActivatable()

bool ui::AXNodeData::IsActivatable ( ) const

Definition at line 933 of file ax_node_data.cc.

933 {
935}
bool IsTextField() const

References IsTextField(), ax::mojom::kListBox, and role.

Referenced by IsInvocable().

◆ IsButtonPressed()

bool ui::AXNodeData::IsButtonPressed ( ) const

Definition at line 937 of file ax_node_data.cc.

937 {
938 // Currently there is no internal representation for |aria-pressed|, and
939 // we map |aria-pressed="true"| to ax::mojom::CheckedState::kTrue for a native
940 // button or role="button".
941 // https://www.w3.org/TR/wai-aria-1.1/#aria-pressed
943 return true;
944 return false;
945}
bool IsButton(const ax::mojom::Role role)
ax::mojom::CheckedState GetCheckedState() const

References GetCheckedState(), ui::IsButton(), ax::mojom::kTrue, and role.

Referenced by ui::TEST().

◆ IsClickable()

bool ui::AXNodeData::IsClickable ( ) const

Definition at line 947 of file ax_node_data.cc.

947 {
948 // If it has a custom default action verb except for
949 // ax::mojom::DefaultActionVerb::kClickAncestor, it's definitely clickable.
950 // ax::mojom::DefaultActionVerb::kClickAncestor is used when an element with a
951 // click listener is present in its ancestry chain.
954 return true;
955
956 return ui::IsClickable(role);
957}
bool IsClickable(const ax::mojom::Role role)
ax::mojom::DefaultActionVerb GetDefaultActionVerb() const

References GetDefaultActionVerb(), HasIntAttribute(), ui::IsClickable(), ax::mojom::kClickAncestor, ax::mojom::kDefaultActionVerb, and role.

Referenced by IsInvocable(), and ui::TEST().

◆ IsIgnored()

bool ui::AXNodeData::IsIgnored ( ) const

Definition at line 965 of file ax_node_data.cc.

965 {
968}
bool HasState(ax::mojom::State state) const

References HasState(), ax::mojom::kIgnored, and role.

Referenced by ui::AXNode::IsIgnored(), IsInvisibleOrIgnored(), and ui::AXTree::Unserialize().

◆ IsInvisible()

bool ui::AXNodeData::IsInvisible ( ) const

Definition at line 970 of file ax_node_data.cc.

References HasState(), and ax::mojom::kInvisible.

Referenced by IsInvisibleOrIgnored().

◆ IsInvisibleOrIgnored()

bool ui::AXNodeData::IsInvisibleOrIgnored ( ) const

Definition at line 974 of file ax_node_data.cc.

974 {
975 return IsIgnored() || IsInvisible();
976}
bool IsInvisible() const
bool IsIgnored() const

References IsIgnored(), and IsInvisible().

Referenced by ui::AXPlatformNodeBase::IsInvisibleOrIgnored().

◆ IsInvocable()

bool ui::AXNodeData::IsInvocable ( ) const

Definition at line 978 of file ax_node_data.cc.

978 {
979 // A control is "invocable" if it initiates an action when activated but
980 // does not maintain any state. A control that maintains state when activated
981 // would be considered a toggle or expand-collapse element - these elements
982 // are "clickable" but not "invocable". Similarly, if the action only involves
983 // activating the control, such as when clicking a text field, the control is
984 // not considered "invocable".
985 return IsClickable() && !IsActivatable() && !SupportsExpandCollapse() &&
987}
bool SupportsToggle(const ax::mojom::Role role)
bool IsClickable() const
bool IsActivatable() const
bool SupportsExpandCollapse() const

References IsActivatable(), IsClickable(), role, SupportsExpandCollapse(), and ui::SupportsToggle().

◆ IsMenuButton()

bool ui::AXNodeData::IsMenuButton ( ) const

Definition at line 989 of file ax_node_data.cc.

989 {
990 // According to the WAI-ARIA spec, a menu button is a native button or an ARIA
991 // role="button" that opens a menu. Although ARIA does not include a role
992 // specifically for menu buttons, screen readers identify buttons that have
993 // aria-haspopup="true" or aria-haspopup="menu" as menu buttons, and Blink
994 // maps both to HasPopup::kMenu.
995 // https://www.w3.org/TR/wai-aria-practices/#menubutton
996 // https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup
998 return true;
999
1000 return false;
1001}
ax::mojom::HasPopup GetHasPopup() const

References GetHasPopup(), ui::IsButton(), ax::mojom::kMenu, and role.

Referenced by ui::TEST().

◆ IsPasswordField()

bool ui::AXNodeData::IsPasswordField ( ) const

Definition at line 1007 of file ax_node_data.cc.

References HasState(), IsTextField(), and ax::mojom::kProtected.

◆ IsPlainTextField()

bool ui::AXNodeData::IsPlainTextField ( ) const

◆ IsRangeValueSupported()

bool ui::AXNodeData::IsRangeValueSupported ( ) const

Definition at line 1046 of file ax_node_data.cc.

1046 {
1048 // According to the ARIA spec, role="separator" acts as a splitter only
1049 // when focusable, and supports a range only in that case.
1051 }
1053}
bool IsRangeValueSupported(const ax::mojom::Role role)

References HasState(), ui::IsRangeValueSupported(), ax::mojom::kFocusable, ax::mojom::kSplitter, and role.

Referenced by ui::IsValuePatternSupported().

◆ IsReadOnlyOrDisabled()

bool ui::AXNodeData::IsReadOnlyOrDisabled ( ) const

Definition at line 1027 of file ax_node_data.cc.

1027 {
1028 switch (GetRestriction()) {
1031 return true;
1035 return false;
1036 }
1037
1038 // By default, when readonly is not supported, we assume the node is never
1039 // editable - then always readonly.
1042 }
1043 }
1044}
bool IsReadOnlySupported(const ax::mojom::Role role)
bool ShouldHaveReadonlyStateByDefault(const ax::mojom::Role role)
ax::mojom::Restriction GetRestriction() const

References GetRestriction(), HasState(), ui::IsReadOnlySupported(), ax::mojom::kDisabled, ax::mojom::kEditable, ax::mojom::kNone, ax::mojom::kReadOnly, ax::mojom::kRichlyEditable, role, and ui::ShouldHaveReadonlyStateByDefault().

◆ IsRichTextField()

◆ IsSelectable()

bool ui::AXNodeData::IsSelectable ( ) const

Definition at line 959 of file ax_node_data.cc.

959 {
960 // It's selectable if it has the attribute, whether it's true or false.
963}

References GetRestriction(), HasBoolAttribute(), ax::mojom::kDisabled, and ax::mojom::kSelected.

◆ IsTextField()

bool ui::AXNodeData::IsTextField ( ) const

◆ operator=()

AXNodeData & ui::AXNodeData::operator= ( AXNodeData  other)

Definition at line 245 of file ax_node_data.cc.

245 {
246 id = other.id;
247 role = other.role;
248 state = other.state;
249 actions = other.actions;
250 string_attributes = other.string_attributes;
251 int_attributes = other.int_attributes;
252 float_attributes = other.float_attributes;
253 bool_attributes = other.bool_attributes;
254 intlist_attributes = other.intlist_attributes;
255 stringlist_attributes = other.stringlist_attributes;
256 html_attributes = other.html_attributes;
257 child_ids = other.child_ids;
258 relative_bounds = other.relative_bounds;
259 return *this;
260}

References actions, bool_attributes, child_ids, float_attributes, html_attributes, id, int_attributes, intlist_attributes, relative_bounds, role, state, string_attributes, and stringlist_attributes.

◆ RemoveBoolAttribute()

void ui::AXNodeData::RemoveBoolAttribute ( ax::mojom::BoolAttribute  attribute)

Definition at line 516 of file ax_node_data.cc.

516 {
518 base::EraseIf(bool_attributes, [attribute](const auto& bool_attribute) {
519 return bool_attribute.first == attribute;
520 });
521}
size_t EraseIf(std::vector< T, Allocator > &container, Predicate pred)

References BASE_DCHECK, bool_attributes, base::EraseIf(), and ax::mojom::kNone.

Referenced by AddBoolAttribute().

◆ RemoveFloatAttribute()

void ui::AXNodeData::RemoveFloatAttribute ( ax::mojom::FloatAttribute  attribute)

Definition at line 509 of file ax_node_data.cc.

509 {
511 base::EraseIf(float_attributes, [attribute](const auto& float_attribute) {
512 return float_attribute.first == attribute;
513 });
514}

References BASE_DCHECK, base::EraseIf(), float_attributes, and ax::mojom::kNone.

Referenced by AddFloatAttribute().

◆ RemoveIntAttribute()

void ui::AXNodeData::RemoveIntAttribute ( ax::mojom::IntAttribute  attribute)

◆ RemoveIntListAttribute()

void ui::AXNodeData::RemoveIntListAttribute ( ax::mojom::IntListAttribute  attribute)

Definition at line 523 of file ax_node_data.cc.

523 {
525 base::EraseIf(intlist_attributes, [attribute](const auto& intlist_attribute) {
526 return intlist_attribute.first == attribute;
527 });
528}

References BASE_DCHECK, base::EraseIf(), intlist_attributes, and ax::mojom::kNone.

Referenced by AddIntListAttribute().

◆ RemoveState()

void ui::AXNodeData::RemoveState ( ax::mojom::State  state)

Definition at line 672 of file ax_node_data.cc.

672 {
673 BASE_DCHECK(static_cast<int>(state_enum) >
674 static_cast<int>(ax::mojom::State::kNone));
675 BASE_DCHECK(static_cast<int>(state_enum) <=
676 static_cast<int>(ax::mojom::State::kMaxValue));
677 state = ModifyFlag(state, static_cast<uint32_t>(state_enum), false);
678}

References BASE_DCHECK, ax::mojom::kMaxValue, ax::mojom::kNone, and state.

Referenced by ui::TEST(), and ui::TEST_F().

◆ RemoveStringAttribute()

void ui::AXNodeData::RemoveStringAttribute ( ax::mojom::StringAttribute  attribute)

Definition at line 495 of file ax_node_data.cc.

495 {
497 base::EraseIf(string_attributes, [attribute](const auto& string_attribute) {
498 return string_attribute.first == attribute;
499 });
500}

References BASE_DCHECK, base::EraseIf(), ax::mojom::kNone, and string_attributes.

Referenced by AddStringAttribute(), and ui::TEST().

◆ RemoveStringListAttribute()

void ui::AXNodeData::RemoveStringListAttribute ( ax::mojom::StringListAttribute  attribute)

Definition at line 530 of file ax_node_data.cc.

531 {
534 [attribute](const auto& stringlist_attribute) {
535 return stringlist_attribute.first == attribute;
536 });
537}

References BASE_DCHECK, base::EraseIf(), ax::mojom::kNone, and stringlist_attributes.

Referenced by AddStringListAttribute().

◆ SetCheckedState()

◆ SetDefaultActionVerb()

void ui::AXNodeData::SetDefaultActionVerb ( ax::mojom::DefaultActionVerb  default_action_verb)

◆ SetDescription() [1/2]

void ui::AXNodeData::SetDescription ( const std::string &  description)

Definition at line 620 of file ax_node_data.cc.

620 {
622}
void AddStringAttribute(ax::mojom::StringAttribute attribute, const std::string &value)

References AddStringAttribute(), and ax::mojom::kDescription.

Referenced by SetDescription(), and flutter::AlertPlatformNodeDelegate::SetText().

◆ SetDescription() [2/2]

void ui::AXNodeData::SetDescription ( const std::u16string &  description)

Definition at line 624 of file ax_node_data.cc.

624 {
625 SetDescription(base::UTF16ToUTF8(description));
626}
std::string UTF16ToUTF8(std::u16string src)
void SetDescription(const std::string &description)

References SetDescription(), and base::UTF16ToUTF8().

◆ SetDescriptionFrom()

◆ SetHasPopup()

◆ SetImageAnnotationStatus()

◆ SetInvalidState()

◆ SetListStyle()

void ui::AXNodeData::SetListStyle ( ax::mojom::ListStyle  list_style)

◆ SetName() [1/2]

void ui::AXNodeData::SetName ( const std::string &  name)

Definition at line 569 of file ax_node_data.cc.

569 {
571 BASE_LOG()
572 << "A valid role is required before setting the name attribute, "
573 "because "
574 "the role is used for setting the required NameFrom attribute.";
576 }
577
578 auto iter = std::find_if(string_attributes.begin(), string_attributes.end(),
579 [](const auto& string_attribute) {
580 return string_attribute.first ==
581 ax::mojom::StringAttribute::kName;
582 });
583
584 if (iter == string_attributes.end()) {
585 string_attributes.push_back(
586 std::make_pair(ax::mojom::StringAttribute::kName, name));
587 } else {
588 iter->second = name;
589 }
590
592 return;
593 // Since this method is mostly used by tests which don't always set the
594 // "NameFrom" attribute, we need to set it here to the most likely value if
595 // not set, otherwise code that tries to calculate the node's inner text, its
596 // hypertext, or even its value, might not know whether to include the name in
597 // the result or not.
598 //
599 // For example, if there is a text field, but it is empty, i.e. it has no
600 // value, its value could be its name if "NameFrom" is set to "kPlaceholder"
601 // or to "kContents" but not if it's set to "kAttribute". Similarly, if there
602 // is a button without any unignored children, it's name can only be
603 // equivalent to its inner text if "NameFrom" is set to "kContents" or to
604 // "kValue", but not if it is set to "kAttribute".
605 if (IsText(role)) {
607 } else {
609 }
610}
const char * name
Definition fuchsia.cc:49
bool IsText(ax::mojom::Role role)
void SetNameFrom(ax::mojom::NameFrom name_from)
#define BASE_LOG()
Definition logging.h:54

References BASE_LOG, BASE_UNREACHABLE, HasIntAttribute(), ui::IsText(), ax::mojom::kAttribute, ax::mojom::kContents, ax::mojom::kName, ax::mojom::kNameFrom, ax::mojom::kNone, name, role, SetNameFrom(), and string_attributes.

Referenced by ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForBoundingRectangles(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMove(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMoveByFormat(), ui::AXPlatformNodeTest::BuildListBox(), ui::AXPlatformNodeTextRangeProviderTest::BuildTextDocument(), SetName(), flutter::AlertPlatformNodeDelegate::SetText(), 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(), 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(), 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(), 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(), 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().

◆ SetName() [2/2]

void ui::AXNodeData::SetName ( const std::u16string &  name)

Definition at line 612 of file ax_node_data.cc.

612 {
614}
void SetName(const std::string &name)

References name, SetName(), and base::UTF16ToUTF8().

◆ SetNameExplicitlyEmpty()

void ui::AXNodeData::SetNameExplicitlyEmpty ( )

◆ SetNameFrom()

void ui::AXNodeData::SetNameFrom ( ax::mojom::NameFrom  name_from)

◆ SetRestriction()

void ui::AXNodeData::SetRestriction ( ax::mojom::Restriction  restriction)

◆ SetTextAlign()

void ui::AXNodeData::SetTextAlign ( ax::mojom::TextAlign  text_align)

◆ SetTextDirection()

◆ SetTextPosition()

void ui::AXNodeData::SetTextPosition ( ax::mojom::TextPosition  text_position)

◆ SetTooltip() [1/2]

void ui::AXNodeData::SetTooltip ( const std::string &  value)

◆ SetTooltip() [2/2]

void ui::AXNodeData::SetTooltip ( const std::u16string &  value)

Definition at line 640 of file ax_node_data.cc.

640 {
642}
void SetTooltip(const std::string &value)

References SetTooltip(), base::UTF16ToUTF8(), and value.

◆ SetValue() [1/2]

◆ SetValue() [2/2]

void ui::AXNodeData::SetValue ( const std::u16string &  value)

Definition at line 632 of file ax_node_data.cc.

632 {
634}
void SetValue(const std::string &value)

References SetValue(), base::UTF16ToUTF8(), and value.

◆ SupportsExpandCollapse()

bool ui::AXNodeData::SupportsExpandCollapse ( ) const

◆ ToString()

std::string ui::AXNodeData::ToString ( ) const
virtual

Definition at line 1064 of file ax_node_data.cc.

1064 {
1065 std::string result;
1066
1067 result += "id=" + base::NumberToString(id);
1068 result += " ";
1069 result += ui::ToString(role);
1070
1071 result += StateBitfieldToString(state);
1072
1073 result += " " + relative_bounds.ToString();
1074
1075 for (const std::pair<ax::mojom::IntAttribute, int32_t>& int_attribute :
1077 std::string value = base::NumberToString(int_attribute.second);
1078 switch (int_attribute.first) {
1080 result += std::string(" action=") +
1082 int_attribute.second));
1083 break;
1085 result += " scroll_x=" + value;
1086 break;
1088 result += " scroll_x_min=" + value;
1089 break;
1091 result += " scroll_x_max=" + value;
1092 break;
1094 result += " scroll_y=" + value;
1095 break;
1097 result += " scroll_y_min=" + value;
1098 break;
1100 result += " scroll_y_max=" + value;
1101 break;
1103 result += " level=" + value;
1104 break;
1106 result += " sel_start=" + value;
1107 break;
1109 result += " sel_end=" + value;
1110 break;
1112 result += " aria_column_count=" + value;
1113 break;
1115 result += " aria_cell_column_index=" + value;
1116 break;
1118 result += " aria_cell_column_span=" + value;
1119 break;
1121 result += " aria_row_count=" + value;
1122 break;
1124 result += " aria_cell_row_index=" + value;
1125 break;
1127 result += " aria_cell_row_span=" + value;
1128 break;
1130 result += " rows=" + value;
1131 break;
1133 result += " cols=" + value;
1134 break;
1136 result += " col=" + value;
1137 break;
1139 result += " row=" + value;
1140 break;
1142 result += " colspan=" + value;
1143 break;
1145 result += " rowspan=" + value;
1146 break;
1148 result += " column_header_id=" + value;
1149 break;
1151 result += " column_index=" + value;
1152 break;
1154 result += " header_id=" + value;
1155 break;
1157 result += " row_header_id=" + value;
1158 break;
1160 result += " row_index=" + value;
1161 break;
1163 switch (static_cast<ax::mojom::SortDirection>(int_attribute.second)) {
1165 result += " sort_direction=none";
1166 break;
1168 result += " sort_direction=ascending";
1169 break;
1171 result += " sort_direction=descending";
1172 break;
1174 result += " sort_direction=other";
1175 break;
1176 default:
1177 break;
1178 }
1179 break;
1181 result += " name_from=";
1182 result += ui::ToString(
1183 static_cast<ax::mojom::NameFrom>(int_attribute.second));
1184 break;
1186 result += " description_from=";
1187 result += ui::ToString(
1188 static_cast<ax::mojom::DescriptionFrom>(int_attribute.second));
1189 break;
1191 result += " activedescendant=" + value;
1192 break;
1194 result += " errormessage=" + value;
1195 break;
1197 result += " in_page_link_target_id=" + value;
1198 break;
1200 result += " member_of_id=" + value;
1201 break;
1203 result += " next_on_line_id=" + value;
1204 break;
1206 result += " popup_for_id=" + value;
1207 break;
1209 result += " previous_on_line_id=" + value;
1210 break;
1212 result += base::StringPrintf(" color_value=&%X", int_attribute.second);
1213 break;
1215 switch (
1216 static_cast<ax::mojom::AriaCurrentState>(int_attribute.second)) {
1218 result += " aria_current_state=false";
1219 break;
1221 result += " aria_current_state=true";
1222 break;
1224 result += " aria_current_state=page";
1225 break;
1227 result += " aria_current_state=step";
1228 break;
1230 result += " aria_current_state=location";
1231 break;
1233 result += " aria_current_state=date";
1234 break;
1236 result += " aria_current_state=time";
1237 break;
1238 default:
1239 break;
1240 }
1241 break;
1243 result +=
1244 base::StringPrintf(" background_color=&%X", int_attribute.second);
1245 break;
1247 result += base::StringPrintf(" color=&%X", int_attribute.second);
1248 break;
1250 switch (static_cast<ax::mojom::ListStyle>(int_attribute.second)) {
1252 result += " list_style=circle";
1253 break;
1255 result += " list_style=disc";
1256 break;
1258 result += " list_style=image";
1259 break;
1261 result += " list_style=numeric";
1262 break;
1264 result += " list_style=other";
1265 break;
1267 result += " list_style=square";
1268 break;
1269 default:
1270 break;
1271 }
1272 break;
1274 result += " text_align=";
1275 result += ui::ToString(
1276 static_cast<ax::mojom::TextAlign>(int_attribute.second));
1277 break;
1279 switch (
1280 static_cast<ax::mojom::WritingDirection>(int_attribute.second)) {
1282 result += " text_direction=ltr";
1283 break;
1285 result += " text_direction=rtl";
1286 break;
1288 result += " text_direction=ttb";
1289 break;
1291 result += " text_direction=btt";
1292 break;
1293 default:
1294 break;
1295 }
1296 break;
1298 switch (static_cast<ax::mojom::TextPosition>(int_attribute.second)) {
1300 result += " text_position=none";
1301 break;
1303 result += " text_position=subscript";
1304 break;
1306 result += " text_position=superscript";
1307 break;
1308 default:
1309 break;
1310 }
1311 break;
1313 std::string text_style_value;
1315 text_style_value += "bold,";
1317 text_style_value += "italic,";
1319 text_style_value += "underline,";
1321 text_style_value += "line-through,";
1323 text_style_value += "overline,";
1324 result += text_style_value.substr(0, text_style_value.size() - 1);
1325 break;
1326 }
1328 result += std::string(" text_overline_style=") +
1330 int_attribute.second));
1331 break;
1333 result += std::string(" text_strikethrough_style=") +
1335 int_attribute.second));
1336 break;
1338 result += std::string(" text_underline_style=") +
1340 int_attribute.second));
1341 break;
1343 result += " setsize=" + value;
1344 break;
1346 result += " posinset=" + value;
1347 break;
1349 switch (static_cast<ax::mojom::HasPopup>(int_attribute.second)) {
1351 result += " haspopup=true";
1352 break;
1354 result += " haspopup=menu";
1355 break;
1357 result += " haspopup=listbox";
1358 break;
1360 result += " haspopup=tree";
1361 break;
1363 result += " haspopup=grid";
1364 break;
1366 result += " haspopup=dialog";
1367 break;
1369 default:
1370 break;
1371 }
1372 break;
1374 switch (static_cast<ax::mojom::InvalidState>(int_attribute.second)) {
1376 result += " invalid_state=false";
1377 break;
1379 result += " invalid_state=true";
1380 break;
1382 result += " invalid_state=other";
1383 break;
1384 default:
1385 break;
1386 }
1387 break;
1389 switch (static_cast<ax::mojom::CheckedState>(int_attribute.second)) {
1391 result += " checked_state=false";
1392 break;
1394 result += " checked_state=true";
1395 break;
1397 result += " checked_state=mixed";
1398 break;
1399 default:
1400 break;
1401 }
1402 break;
1404 switch (static_cast<ax::mojom::Restriction>(int_attribute.second)) {
1406 result += " restriction=readonly";
1407 break;
1409 result += " restriction=disabled";
1410 break;
1411 default:
1412 break;
1413 }
1414 break;
1416 result += " next_focus_id=" + value;
1417 break;
1419 result += " previous_focus_id=" + value;
1420 break;
1422 result += std::string(" image_annotation_status=") +
1424 int_attribute.second));
1425 break;
1427 result += " dropeffect=" + value;
1428 break;
1430 result += " dom_node_id=" + value;
1431 break;
1433 break;
1434 }
1435 }
1436
1437 for (const std::pair<ax::mojom::StringAttribute, std::string>&
1438 string_attribute : string_attributes) {
1439 std::string value = string_attribute.second;
1440 switch (string_attribute.first) {
1442 result += " access_key=" + value;
1443 break;
1445 result += " aria_invalid_value=" + value;
1446 break;
1448 result += " autocomplete=" + value;
1449 break;
1451 result += " child_tree_id=" + value.substr(0, 8);
1452 break;
1454 result += " class_name=" + value;
1455 break;
1457 result += " description=" + value;
1458 break;
1460 result += " display=" + value;
1461 break;
1463 result += " font-family=" + value;
1464 break;
1466 result += " html_tag=" + value;
1467 break;
1469 result += " identifer=" + value;
1470 break;
1472 result += " image_annotation=" + value;
1473 break;
1475 result += " image_data_url=(" +
1476 base::NumberToString(static_cast<int>(value.size())) +
1477 " bytes)";
1478 break;
1480 result += " inner_html=" + value;
1481 break;
1483 result += " input_type=" + value;
1484 break;
1486 result += " key_shortcuts=" + value;
1487 break;
1489 result += " language=" + value;
1490 break;
1492 result += " relevant=" + value;
1493 break;
1495 result += " live=" + value;
1496 break;
1498 result += " container_relevant=" + value;
1499 break;
1501 result += " container_live=" + value;
1502 break;
1504 result += " placeholder=" + value;
1505 break;
1507 result += " role=" + value;
1508 break;
1510 result += " role_description=" + value;
1511 break;
1513 result += " tooltip=" + value;
1514 break;
1516 result += " url=" + value;
1517 break;
1519 result += " name=" + value;
1520 break;
1522 result += " value=" + value;
1523 break;
1525 break;
1526 }
1527 }
1528
1529 for (const std::pair<ax::mojom::FloatAttribute, float>& float_attribute :
1531 std::string value = base::NumberToString(float_attribute.second);
1532 switch (float_attribute.first) {
1534 result += " value_for_range=" + value;
1535 break;
1537 result += " max_value=" + value;
1538 break;
1540 result += " min_value=" + value;
1541 break;
1543 result += " step_value=" + value;
1544 break;
1546 result += " font_size=" + value;
1547 break;
1549 result += " font_weight=" + value;
1550 break;
1552 result += " text_indent=" + value;
1553 break;
1555 break;
1556 }
1557 }
1558
1559 for (const std::pair<ax::mojom::BoolAttribute, bool>& bool_attribute :
1561 std::string value = bool_attribute.second ? "true" : "false";
1562 switch (bool_attribute.first) {
1564 result += " editable_root=" + value;
1565 break;
1567 result += " atomic=" + value;
1568 break;
1570 result += " busy=" + value;
1571 break;
1573 result += " container_atomic=" + value;
1574 break;
1576 result += " container_busy=" + value;
1577 break;
1579 result += " update_location_only=" + value;
1580 break;
1582 result += " has_fallback=" + value;
1583 break;
1585 result += " modal=" + value;
1586 break;
1588 result += " scrollable=" + value;
1589 break;
1591 result += " clickable=" + value;
1592 break;
1594 result += " clips_children=" + value;
1595 break;
1597 result += " not_user_selectable=" + value;
1598 break;
1600 result += " selected=" + value;
1601 break;
1603 result += " selected_from_focus=" + value;
1604 break;
1606 result += " supports_text_location=" + value;
1607 break;
1609 result += " grabbed=" + value;
1610 break;
1612 result += " is_line_breaking_object=" + value;
1613 break;
1615 result += " is_page_breaking_object=" + value;
1616 break;
1618 result += " has_aria_attribute=" + value;
1619 break;
1621 break;
1622 }
1623 }
1624
1625 for (const std::pair<ax::mojom::IntListAttribute, std::vector<int32_t>>&
1626 intlist_attribute : intlist_attributes) {
1627 const std::vector<int32_t>& values = intlist_attribute.second;
1628 switch (intlist_attribute.first) {
1630 result += " indirect_child_ids=" + IntVectorToString(values);
1631 break;
1633 result += " controls_ids=" + IntVectorToString(values);
1634 break;
1636 result += " describedby_ids=" + IntVectorToString(values);
1637 break;
1639 result += " details_ids=" + IntVectorToString(values);
1640 break;
1642 result += " flowto_ids=" + IntVectorToString(values);
1643 break;
1645 result += " labelledby_ids=" + IntVectorToString(values);
1646 break;
1648 result += " radio_group_ids=" + IntVectorToString(values);
1649 break;
1651 std::string types_str;
1652 for (size_t i = 0; i < values.size(); ++i) {
1653 int32_t type = values[i];
1654 if (type == static_cast<int32_t>(ax::mojom::MarkerType::kNone))
1655 continue;
1656
1657 if (i > 0)
1658 types_str += ',';
1659
1660 if (type & static_cast<int32_t>(ax::mojom::MarkerType::kSpelling))
1661 types_str += "spelling&";
1662 if (type & static_cast<int32_t>(ax::mojom::MarkerType::kGrammar))
1663 types_str += "grammar&";
1664 if (type & static_cast<int32_t>(ax::mojom::MarkerType::kTextMatch))
1665 types_str += "text_match&";
1666 if (type &
1667 static_cast<int32_t>(ax::mojom::MarkerType::kActiveSuggestion))
1668 types_str += "active_suggestion&";
1669 if (type & static_cast<int32_t>(ax::mojom::MarkerType::kSuggestion))
1670 types_str += "suggestion&";
1671
1672 if (!types_str.empty())
1673 types_str = types_str.substr(0, types_str.size() - 1);
1674 }
1675
1676 if (!types_str.empty())
1677 result += " marker_types=" + types_str;
1678 break;
1679 }
1681 result += " marker_starts=" + IntVectorToString(values);
1682 break;
1684 result += " marker_ends=" + IntVectorToString(values);
1685 break;
1687 result += " character_offsets=" + IntVectorToString(values);
1688 break;
1690 result += " cached_line_start_offsets=" + IntVectorToString(values);
1691 break;
1693 result += " word_starts=" + IntVectorToString(values);
1694 break;
1696 result += " word_ends=" + IntVectorToString(values);
1697 break;
1699 result += " custom_action_ids=" + IntVectorToString(values);
1700 break;
1702 break;
1703 }
1704 }
1705
1706 for (const std::pair<ax::mojom::StringListAttribute,
1707 std::vector<std::string>>& stringlist_attribute :
1709 const std::vector<std::string>& values = stringlist_attribute.second;
1710 switch (stringlist_attribute.first) {
1712 result +=
1713 " custom_action_descriptions: " + base::JoinString(values, ",");
1714 break;
1716 break;
1717 }
1718 }
1719
1720 if (actions)
1721 result += " actions=" + ActionsBitfieldToString(actions);
1722
1723 if (!child_ids.empty())
1724 result += " child_ids=" + IntVectorToString(child_ids);
1725
1726 return result;
1727}
GLenum type
StringListAttribute
Definition ax_enums.h:851
TextDecorationStyle
Definition ax_enums.h:996
std::string StringPrintf(const std::string &format, Args... args)
std::string JoinString(std::vector< std::string > tokens, std::string delimiter)
std::string NumberToString(int32_t number)
bool HasTextStyle(ax::mojom::TextStyle text_style) const
std::string ToString() const

References actions, bool_attributes, child_ids, float_attributes, HasTextStyle(), i, int_attributes, intlist_attributes, base::JoinString(), ax::mojom::kAccessKey, ax::mojom::kActivedescendantId, ax::mojom::kActiveSuggestion, ax::mojom::kAriaCellColumnIndex, ax::mojom::kAriaCellColumnSpan, ax::mojom::kAriaCellRowIndex, ax::mojom::kAriaCellRowSpan, ax::mojom::kAriaColumnCount, ax::mojom::kAriaCurrentState, ax::mojom::kAriaInvalidValue, ax::mojom::kAriaRowCount, ax::mojom::kAscending, ax::mojom::kAutoComplete, ax::mojom::kBackgroundColor, ax::mojom::kBold, ax::mojom::kBtt, ax::mojom::kBusy, ax::mojom::kCachedLineStarts, ax::mojom::kCanvasHasFallback, ax::mojom::kCharacterOffsets, ax::mojom::kCheckedState, ax::mojom::kChildTreeId, ax::mojom::kCircle, ax::mojom::kClassName, ax::mojom::kClickable, ax::mojom::kClipsChildren, ax::mojom::kColor, ax::mojom::kColorValue, ax::mojom::kContainerLiveAtomic, ax::mojom::kContainerLiveBusy, ax::mojom::kContainerLiveRelevant, ax::mojom::kContainerLiveStatus, ax::mojom::kControlsIds, ax::mojom::kCustomActionDescriptions, ax::mojom::kCustomActionIds, ax::mojom::kDate, ax::mojom::kDefaultActionVerb, ax::mojom::kDescending, ax::mojom::kDescribedbyIds, ax::mojom::kDescription, ax::mojom::kDescriptionFrom, ax::mojom::kDetailsIds, ax::mojom::kDialog, ax::mojom::kDisabled, ax::mojom::kDisc, ax::mojom::kDisplay, ax::mojom::kDOMNodeId, ax::mojom::kDropeffect, ax::mojom::kEditableRoot, ax::mojom::kErrormessageId, ax::mojom::kFalse, ax::mojom::kFlowtoIds, ax::mojom::kFontFamily, ax::mojom::kFontSize, ax::mojom::kFontWeight, ax::mojom::kGrabbed, ax::mojom::kGrammar, ax::mojom::kGrid, ax::mojom::kHasAriaAttribute, ax::mojom::kHasPopup, ax::mojom::kHierarchicalLevel, ax::mojom::kHtmlTag, ax::mojom::kIdentifier, ax::mojom::kImage, ax::mojom::kImageAnnotation, ax::mojom::kImageAnnotationStatus, ax::mojom::kImageDataUrl, ax::mojom::kIndirectChildIds, ax::mojom::kInnerHtml, ax::mojom::kInPageLinkTargetId, ax::mojom::kInputType, ax::mojom::kInvalidState, ax::mojom::kIsLineBreakingObject, ax::mojom::kIsPageBreakingObject, ax::mojom::kItalic, ax::mojom::kKeyShortcuts, ax::mojom::kLabelledbyIds, ax::mojom::kLanguage, ax::mojom::kLineThrough, ax::mojom::kListbox, ax::mojom::kListStyle, ax::mojom::kLiveAtomic, ax::mojom::kLiveRelevant, ax::mojom::kLiveStatus, ax::mojom::kLocation, ax::mojom::kLtr, ax::mojom::kMarkerEnds, ax::mojom::kMarkerStarts, ax::mojom::kMarkerTypes, ax::mojom::kMaxValueForRange, ax::mojom::kMemberOfId, ax::mojom::kMenu, ax::mojom::kMinValueForRange, ax::mojom::kMixed, ax::mojom::kModal, ax::mojom::kName, ax::mojom::kNameFrom, ax::mojom::kNextFocusId, ax::mojom::kNextOnLineId, ax::mojom::kNone, ax::mojom::kNotUserSelectableStyle, ax::mojom::kNumeric, ax::mojom::kOther, ax::mojom::kOverline, ax::mojom::kPage, ax::mojom::kPlaceholder, ax::mojom::kPopupForId, ax::mojom::kPosInSet, ax::mojom::kPreviousFocusId, ax::mojom::kPreviousOnLineId, ax::mojom::kRadioGroupIds, ax::mojom::kReadOnly, ax::mojom::kRestriction, ax::mojom::kRole, ax::mojom::kRoleDescription, ax::mojom::kRtl, ax::mojom::kScrollable, ax::mojom::kScrollX, ax::mojom::kScrollXMax, ax::mojom::kScrollXMin, ax::mojom::kScrollY, ax::mojom::kScrollYMax, ax::mojom::kScrollYMin, ax::mojom::kSelected, ax::mojom::kSelectedFromFocus, ax::mojom::kSetSize, ax::mojom::kSortDirection, ax::mojom::kSpelling, ax::mojom::kSquare, ax::mojom::kStep, ax::mojom::kStepValueForRange, ax::mojom::kSubscript, ax::mojom::kSuggestion, ax::mojom::kSuperscript, ax::mojom::kSupportsTextLocation, ax::mojom::kTableCellColumnIndex, ax::mojom::kTableCellColumnSpan, ax::mojom::kTableCellRowIndex, ax::mojom::kTableCellRowSpan, ax::mojom::kTableColumnCount, ax::mojom::kTableColumnHeaderId, ax::mojom::kTableColumnIndex, ax::mojom::kTableHeaderId, ax::mojom::kTableRowCount, ax::mojom::kTableRowHeaderId, ax::mojom::kTableRowIndex, ax::mojom::kTextAlign, ax::mojom::kTextDirection, ax::mojom::kTextIndent, ax::mojom::kTextMatch, ax::mojom::kTextOverlineStyle, ax::mojom::kTextPosition, ax::mojom::kTextSelEnd, ax::mojom::kTextSelStart, ax::mojom::kTextStrikethroughStyle, ax::mojom::kTextStyle, ax::mojom::kTextUnderlineStyle, ax::mojom::kTime, ax::mojom::kTooltip, ax::mojom::kTree, ax::mojom::kTrue, ax::mojom::kTtb, ax::mojom::kUnderline, ax::mojom::kUnsorted, ax::mojom::kUpdateLocationOnly, ax::mojom::kUrl, ax::mojom::kValue, ax::mojom::kValueForRange, ax::mojom::kWordEnds, ax::mojom::kWordStarts, base::NumberToString(), relative_bounds, role, state, string_attributes, stringlist_attributes, base::StringPrintf(), ui::AXRelativeBounds::ToString(), ui::ToString(), type, and value.

Referenced by ui::operator<<(), ui::TestAXNodeDataSetter(), and ui::TestAXNodeDataSetter().

Member Data Documentation

◆ actions

uint64_t ui::AXNodeData::actions

Definition at line 279 of file ax_node_data.h.

Referenced by AddAction(), AXNodeData(), AXNodeData(), HasAction(), operator=(), ui::TEST(), and ToString().

◆ bool_attributes

std::vector<std::pair<ax::mojom::BoolAttribute, bool> > ui::AXNodeData::bool_attributes

◆ child_ids

std::vector<int32_t> ui::AXNodeData::child_ids

Definition at line 291 of file ax_node_data.h.

Referenced by AXNodeData(), AXNodeData(), ui::AXPlatformNodeTest::BuildAriaColumnAndRowCountGrids(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForBoundingRectangles(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMove(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMoveByFormat(), ui::AXPlatformNodeTest::BuildListBox(), ui::AXPlatformNodeTextRangeProviderTest::BuildTextDocument(), flutter::FlutterPlatformNodeDelegateMac::GetLiveRegionText(), ui::AXEventGenerator::OnNodeDataChanged(), operator=(), 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(), 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(), 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(), 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(), 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(), 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 ToString().

◆ float_attributes

std::vector<std::pair<ax::mojom::FloatAttribute, float> > ui::AXNodeData::float_attributes

◆ html_attributes

std::vector<std::pair<std::string, std::string> > ui::AXNodeData::html_attributes

◆ id

int32_t ui::AXNodeData::id = -1

Definition at line 276 of file ax_node_data.h.

Referenced by flutter::AlertPlatformNodeDelegate::AlertPlatformNodeDelegate(), ui::AXNode::AXNode(), AXNodeData(), ui::AXPlatformNodeTest::BuildAriaColumnAndRowCountGrids(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForBoundingRectangles(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMove(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMoveByFormat(), ui::AXPlatformNodeTest::BuildContentEditable(), ui::AXPlatformNodeTest::BuildContentEditableWithSelectionRange(), ui::AXPlatformNodeTest::BuildListBox(), ui::AXPlatformNodeTextRangeProviderTest::BuildTextDocument(), ui::AXPlatformNodeTest::BuildTextField(), ui::AXPlatformNodeTest::BuildTextFieldWithSelectionRange(), ui::AXPlatformRelationWin::EnumerateRelationships(), ui::AXPlatformNodeTest::Init(), ui::AXEventGenerator::OnNodeDataChanged(), operator=(), ui::AXPlatformNodeBase::ScrollToNode(), ui::AXPlatformNodeDelegateBase::SetHypertextSelection(), ui::AXTreeUpdateState::SetLastKnownPendingNodeData(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), ui::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::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(), 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(), 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(), 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(), 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(), 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(), 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(), 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 ui::AXTree::Unserialize().

◆ int_attributes

◆ intlist_attributes

◆ relative_bounds

◆ role

ax::mojom::Role ui::AXNodeData::role

Definition at line 277 of file ax_node_data.h.

Referenced by ui::AXEventGenerator::AddEvent(), flutter::AlertPlatformNodeDelegate::AlertPlatformNodeDelegate(), AXNodeData(), AXNodeData(), ui::AXPlatformNodeTest::BuildAriaColumnAndRowCountGrids(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForBoundingRectangles(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMove(), ui::AXPlatformNodeTextRangeProviderTest::BuildAXTreeForMoveByFormat(), ui::AXPlatformNodeTest::BuildContentEditable(), ui::AXPlatformNodeTest::BuildContentEditableWithSelectionRange(), ui::AXPlatformNodeTest::BuildListBox(), ui::AXPlatformNodeTextRangeProviderTest::BuildTextDocument(), ui::AXPlatformNodeTest::BuildTextField(), ui::AXPlatformNodeTest::BuildTextFieldWithSelectionRange(), ui::AXTableInfo::Create(), ui::AXNode::GetCollapsedMenuListPopUpButtonAncestor(), ui::TestAXNodeHelper::GetInnerTextRangeBoundsRect(), ui::TestAXNodeWrapper::GetInnerTextRangeBoundsRect(), ui::AXTree::GetPosInSet(), ui::AXNodePosition::GetRole(), ui::AXPlatformNodeBase::GetSelectionContainer(), ui::AXTree::GetSetSize(), ui::TestAXNodeWrapper::GetStyleNameAttributeAsLocalizedString(), ui::AXPlatformNodeBase::GetTable(), IsActivatable(), IsButtonPressed(), ui::AXNode::IsCellOrHeaderOfARIAGrid(), ui::AXNode::IsCellOrHeaderOfARIATable(), IsClickable(), ui::AXNode::IsCollapsedMenuListPopUpButton(), IsIgnored(), ui::AXNode::IsIgnoredContainerForOrderedSet(), ui::AXNodePosition::IsInLineBreakingObject(), ui::AXNode::IsInListMarker(), IsInvocable(), ui::AXNode::IsLineBreak(), IsMenuButton(), IsPlainTextField(), IsRangeValueSupported(), IsReadOnlyOrDisabled(), ui::AXPlatformNodeBase::IsSelectionItemSupported(), ui::IsValuePatternSupported(), ui::AXPlatformNodeMac::NotifyAccessibilityEvent(), ui::AXEventGenerator::OnBoolAttributeChanged(), ui::AXEventGenerator::OnIntAttributeChanged(), ui::AXEventGenerator::OnNodeDataChanged(), ui::AXEventGenerator::OnStateChanged(), ui::AXEventGenerator::OnStringAttributeChanged(), operator=(), SetName(), ui::AXNode::SetRoleMatchesItemRole(), SupportsExpandCollapse(), 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(), 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(), 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(), 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(), 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(), 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(), 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 ToString().

◆ state

uint32_t ui::AXNodeData::state

◆ string_attributes

std::vector<std::pair<ax::mojom::StringAttribute, std::string> > ui::AXNodeData::string_attributes

◆ stringlist_attributes

std::vector< std::pair<ax::mojom::StringListAttribute, std::vector<std::string> > > ui::AXNodeData::stringlist_attributes

The documentation for this struct was generated from the following files: