Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(894)

Unified Diff: ui/accessibility/ax_node_data.cc

Issue 2694903010: AX checked state changes (Closed)
Patch Set: Fix compiler error Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/accessibility/ax_node_data.cc
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc
index 82e35d6fab3a4ddc97dc39ce03e8611f63ad6664..d688f7156de0815540ed3d089e8fdb4cded556cc 100644
--- a/ui/accessibility/ax_node_data.cc
+++ b/ui/accessibility/ax_node_data.cc
@@ -106,6 +106,7 @@ bool IsNodeIdIntAttribute(AXIntAttribute attr) {
case AX_ATTR_BACKGROUND_COLOR:
case AX_ATTR_COLOR:
case AX_ATTR_INVALID_STATE:
+ case AX_ATTR_CHECKED_STATE:
case AX_ATTR_TEXT_DIRECTION:
case AX_ATTR_TEXT_STYLE:
case AX_ATTR_ARIA_COL_COUNT:
@@ -435,8 +436,6 @@ std::string AXNodeData::ToString() const {
if (state & (1 << AX_STATE_BUSY))
result += " BUSY";
- if (state & (1 << AX_STATE_CHECKED))
- result += " CHECKED";
if (state & (1 << AX_STATE_COLLAPSED))
result += " COLLAPSED";
if (state & (1 << AX_STATE_EDITABLE))
@@ -705,6 +704,19 @@ std::string AXNodeData::ToString() const {
break;
}
break;
+ case AX_ATTR_CHECKED_STATE:
+ switch (int_attributes[i].second) {
+ case AX_CHECKED_STATE_FALSE:
+ result += " checked_state=false";
+ break;
+ case AX_CHECKED_STATE_TRUE:
+ result += " checked_state=true";
+ break;
+ case AX_CHECKED_STATE_MIXED:
+ result += " checked_state=mixed";
+ break;
+ }
+ break;
case AX_INT_ATTRIBUTE_NONE:
break;
}
@@ -808,9 +820,6 @@ std::string AXNodeData::ToString() const {
for (size_t i = 0; i < bool_attributes.size(); ++i) {
std::string value = bool_attributes[i].second ? "true" : "false";
switch (bool_attributes[i].first) {
- case AX_ATTR_STATE_MIXED:
- result += " mixed=" + value;
- break;
case AX_ATTR_LIVE_ATOMIC:
result += " atomic=" + value;
break;

Powered by Google App Engine
This is Rietveld 408576698