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

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

Issue 1511603002: Merge to m48: Stops using SYSTEM_STATE_INDETERMINATE as it makes radio buttons appear to have a mix… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: 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 <set> 7 #include <set>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (state & (1 << AX_STATE_EXPANDED)) 269 if (state & (1 << AX_STATE_EXPANDED))
270 result += " EXPANDED"; 270 result += " EXPANDED";
271 if (state & (1 << AX_STATE_FOCUSABLE)) 271 if (state & (1 << AX_STATE_FOCUSABLE))
272 result += " FOCUSABLE"; 272 result += " FOCUSABLE";
273 if (state & (1 << AX_STATE_FOCUSED)) 273 if (state & (1 << AX_STATE_FOCUSED))
274 result += " FOCUSED"; 274 result += " FOCUSED";
275 if (state & (1 << AX_STATE_HASPOPUP)) 275 if (state & (1 << AX_STATE_HASPOPUP))
276 result += " HASPOPUP"; 276 result += " HASPOPUP";
277 if (state & (1 << AX_STATE_HOVERED)) 277 if (state & (1 << AX_STATE_HOVERED))
278 result += " HOVERED"; 278 result += " HOVERED";
279 if (state & (1 << AX_STATE_INDETERMINATE))
280 result += " INDETERMINATE";
281 if (state & (1 << AX_STATE_INVISIBLE)) 279 if (state & (1 << AX_STATE_INVISIBLE))
282 result += " INVISIBLE"; 280 result += " INVISIBLE";
283 if (state & (1 << AX_STATE_LINKED)) 281 if (state & (1 << AX_STATE_LINKED))
284 result += " LINKED"; 282 result += " LINKED";
285 if (state & (1 << AX_STATE_MULTISELECTABLE)) 283 if (state & (1 << AX_STATE_MULTISELECTABLE))
286 result += " MULTISELECTABLE"; 284 result += " MULTISELECTABLE";
287 if (state & (1 << AX_STATE_OFFSCREEN)) 285 if (state & (1 << AX_STATE_OFFSCREEN))
288 result += " OFFSCREEN"; 286 result += " OFFSCREEN";
289 if (state & (1 << AX_STATE_PRESSED)) 287 if (state & (1 << AX_STATE_PRESSED))
290 result += " PRESSED"; 288 result += " PRESSED";
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 result += " font_size=" + value; 546 result += " font_size=" + value;
549 break; 547 break;
550 case AX_FLOAT_ATTRIBUTE_NONE: 548 case AX_FLOAT_ATTRIBUTE_NONE:
551 break; 549 break;
552 } 550 }
553 } 551 }
554 552
555 for (size_t i = 0; i < bool_attributes.size(); ++i) { 553 for (size_t i = 0; i < bool_attributes.size(); ++i) {
556 std::string value = bool_attributes[i].second ? "true" : "false"; 554 std::string value = bool_attributes[i].second ? "true" : "false";
557 switch (bool_attributes[i].first) { 555 switch (bool_attributes[i].first) {
558 case AX_ATTR_BUTTON_MIXED: 556 case AX_ATTR_STATE_MIXED:
559 result += " mixed=" + value; 557 result += " mixed=" + value;
560 break; 558 break;
561 case AX_ATTR_LIVE_ATOMIC: 559 case AX_ATTR_LIVE_ATOMIC:
562 result += " atomic=" + value; 560 result += " atomic=" + value;
563 break; 561 break;
564 case AX_ATTR_LIVE_BUSY: 562 case AX_ATTR_LIVE_BUSY:
565 result += " busy=" + value; 563 result += " busy=" + value;
566 break; 564 break;
567 case AX_ATTR_CONTAINER_LIVE_ATOMIC: 565 case AX_ATTR_CONTAINER_LIVE_ATOMIC:
568 result += " container_atomic=" + value; 566 result += " container_atomic=" + value;
(...skipping 71 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