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

Side by Side Diff: ui/accessibility/ax_node_data.cc

Issue 1488893002: Stops using SYSTEM_STATE_INDETERMINATE as it makes radio buttons appear to have a mixed state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few test expectations. Created 5 years 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 unified diff | Download patch
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/accessibility/ax_node_data.h" 5 #include "ui/accessibility/ax_node_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 if (state & (1 << AX_STATE_EXPANDED)) 270 if (state & (1 << AX_STATE_EXPANDED))
271 result += " EXPANDED"; 271 result += " EXPANDED";
272 if (state & (1 << AX_STATE_FOCUSABLE)) 272 if (state & (1 << AX_STATE_FOCUSABLE))
273 result += " FOCUSABLE"; 273 result += " FOCUSABLE";
274 if (state & (1 << AX_STATE_FOCUSED)) 274 if (state & (1 << AX_STATE_FOCUSED))
275 result += " FOCUSED"; 275 result += " FOCUSED";
276 if (state & (1 << AX_STATE_HASPOPUP)) 276 if (state & (1 << AX_STATE_HASPOPUP))
277 result += " HASPOPUP"; 277 result += " HASPOPUP";
278 if (state & (1 << AX_STATE_HOVERED)) 278 if (state & (1 << AX_STATE_HOVERED))
279 result += " HOVERED"; 279 result += " HOVERED";
280 if (state & (1 << AX_STATE_INDETERMINATE))
281 result += " INDETERMINATE";
282 if (state & (1 << AX_STATE_INVISIBLE)) 280 if (state & (1 << AX_STATE_INVISIBLE))
283 result += " INVISIBLE"; 281 result += " INVISIBLE";
284 if (state & (1 << AX_STATE_LINKED)) 282 if (state & (1 << AX_STATE_LINKED))
285 result += " LINKED"; 283 result += " LINKED";
286 if (state & (1 << AX_STATE_MULTISELECTABLE)) 284 if (state & (1 << AX_STATE_MULTISELECTABLE))
287 result += " MULTISELECTABLE"; 285 result += " MULTISELECTABLE";
288 if (state & (1 << AX_STATE_OFFSCREEN)) 286 if (state & (1 << AX_STATE_OFFSCREEN))
289 result += " OFFSCREEN"; 287 result += " OFFSCREEN";
290 if (state & (1 << AX_STATE_PRESSED)) 288 if (state & (1 << AX_STATE_PRESSED))
291 result += " PRESSED"; 289 result += " PRESSED";
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 result += " font_size=" + value; 549 result += " font_size=" + value;
552 break; 550 break;
553 case AX_FLOAT_ATTRIBUTE_NONE: 551 case AX_FLOAT_ATTRIBUTE_NONE:
554 break; 552 break;
555 } 553 }
556 } 554 }
557 555
558 for (size_t i = 0; i < bool_attributes.size(); ++i) { 556 for (size_t i = 0; i < bool_attributes.size(); ++i) {
559 std::string value = bool_attributes[i].second ? "true" : "false"; 557 std::string value = bool_attributes[i].second ? "true" : "false";
560 switch (bool_attributes[i].first) { 558 switch (bool_attributes[i].first) {
561 case AX_ATTR_BUTTON_MIXED: 559 case AX_ATTR_STATE_MIXED:
562 result += " mixed=" + value; 560 result += " mixed=" + value;
563 break; 561 break;
564 case AX_ATTR_LIVE_ATOMIC: 562 case AX_ATTR_LIVE_ATOMIC:
565 result += " atomic=" + value; 563 result += " atomic=" + value;
566 break; 564 break;
567 case AX_ATTR_LIVE_BUSY: 565 case AX_ATTR_LIVE_BUSY:
568 result += " busy=" + value; 566 result += " busy=" + value;
569 break; 567 break;
570 case AX_ATTR_CONTAINER_LIVE_ATOMIC: 568 case AX_ATTR_CONTAINER_LIVE_ATOMIC:
571 result += " container_atomic=" + value; 569 result += " container_atomic=" + value;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 bool AXNodeData::IsRoot() const { 638 bool AXNodeData::IsRoot() const {
641 return (role == AX_ROLE_ROOT_WEB_AREA || 639 return (role == AX_ROLE_ROOT_WEB_AREA ||
642 role == AX_ROLE_DESKTOP); 640 role == AX_ROLE_DESKTOP);
643 } 641 }
644 642
645 void AXNodeData::SetRoot() { 643 void AXNodeData::SetRoot() {
646 role = AX_ROLE_ROOT_WEB_AREA; 644 role = AX_ROLE_ROOT_WEB_AREA;
647 } 645 }
648 646
649 } // namespace ui 647 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698