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

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

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with ariaTextAlternative Created 5 years, 1 month 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') | ui/accessibility/platform/ax_platform_node_mac.mm » ('j') | 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 result += " sort_direction=ascending"; 382 result += " sort_direction=ascending";
383 break; 383 break;
384 case AX_SORT_DIRECTION_DESCENDING: 384 case AX_SORT_DIRECTION_DESCENDING:
385 result += " sort_direction=descending"; 385 result += " sort_direction=descending";
386 break; 386 break;
387 case AX_SORT_DIRECTION_OTHER: 387 case AX_SORT_DIRECTION_OTHER:
388 result += " sort_direction=other"; 388 result += " sort_direction=other";
389 break; 389 break;
390 } 390 }
391 break; 391 break;
392 case AX_ATTR_TITLE_UI_ELEMENT: 392 case AX_ATTR_NAME_FROM:
393 result += " title_elem=" + value; 393 result += " name_from=" + ui::ToString(
394 static_cast<ui::AXNameFrom>(int_attributes[i].second));
395 break;
396 case AX_ATTR_DESCRIPTION_FROM:
397 result += " description_from=" + ui::ToString(
398 static_cast<ui::AXDescriptionFrom>(int_attributes[i].second));
394 break; 399 break;
395 case AX_ATTR_ACTIVEDESCENDANT_ID: 400 case AX_ATTR_ACTIVEDESCENDANT_ID:
396 result += " activedescendant=" + value; 401 result += " activedescendant=" + value;
397 break; 402 break;
398 case AX_ATTR_CHILD_TREE_ID: 403 case AX_ATTR_CHILD_TREE_ID:
399 result += " child_tree_id=" + value; 404 result += " child_tree_id=" + value;
400 break; 405 break;
401 case AX_ATTR_COLOR_VALUE: 406 case AX_ATTR_COLOR_VALUE:
402 result += base::StringPrintf(" color_value=&%X", 407 result += base::StringPrintf(" color_value=&%X",
403 int_attributes[i].second); 408 int_attributes[i].second);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 break; 486 break;
482 case AX_ATTR_AUTO_COMPLETE: 487 case AX_ATTR_AUTO_COMPLETE:
483 result += " autocomplete=" + value; 488 result += " autocomplete=" + value;
484 break; 489 break;
485 case AX_ATTR_DESCRIPTION: 490 case AX_ATTR_DESCRIPTION:
486 result += " description=" + value; 491 result += " description=" + value;
487 break; 492 break;
488 case AX_ATTR_DISPLAY: 493 case AX_ATTR_DISPLAY:
489 result += " display=" + value; 494 result += " display=" + value;
490 break; 495 break;
491 case AX_ATTR_HELP:
492 result += " help=" + value;
493 break;
494 case AX_ATTR_HTML_TAG: 496 case AX_ATTR_HTML_TAG:
495 result += " html_tag=" + value; 497 result += " html_tag=" + value;
496 break; 498 break;
497 case AX_ATTR_ARIA_INVALID_VALUE: 499 case AX_ATTR_ARIA_INVALID_VALUE:
498 result += " aria_invalid_value=" + value; 500 result += " aria_invalid_value=" + value;
499 break; 501 break;
500 case AX_ATTR_LIVE_RELEVANT: 502 case AX_ATTR_LIVE_RELEVANT:
501 result += " relevant=" + value; 503 result += " relevant=" + value;
502 break; 504 break;
503 case AX_ATTR_LIVE_STATUS: 505 case AX_ATTR_LIVE_STATUS:
504 result += " live=" + value; 506 result += " live=" + value;
505 break; 507 break;
506 case AX_ATTR_CONTAINER_LIVE_RELEVANT: 508 case AX_ATTR_CONTAINER_LIVE_RELEVANT:
507 result += " container_relevant=" + value; 509 result += " container_relevant=" + value;
508 break; 510 break;
509 case AX_ATTR_CONTAINER_LIVE_STATUS: 511 case AX_ATTR_CONTAINER_LIVE_STATUS:
510 result += " container_live=" + value; 512 result += " container_live=" + value;
511 break; 513 break;
512 case AX_ATTR_PLACEHOLDER: 514 case AX_ATTR_PLACEHOLDER:
513 result += "placeholder" + value; 515 result += " placeholder=" + value;
514 break; 516 break;
515 case AX_ATTR_ROLE: 517 case AX_ATTR_ROLE:
516 result += " role=" + value; 518 result += " role=" + value;
517 break; 519 break;
518 case AX_ATTR_SHORTCUT: 520 case AX_ATTR_SHORTCUT:
519 result += " shortcut=" + value; 521 result += " shortcut=" + value;
520 break; 522 break;
521 case AX_ATTR_URL: 523 case AX_ATTR_URL:
522 result += " url=" + value; 524 result += " url=" + value;
523 break; 525 break;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 break; 600 break;
599 case AX_ATTR_DESCRIBEDBY_IDS: 601 case AX_ATTR_DESCRIBEDBY_IDS:
600 result += " describedby_ids=" + IntVectorToString(values); 602 result += " describedby_ids=" + IntVectorToString(values);
601 break; 603 break;
602 case AX_ATTR_FLOWTO_IDS: 604 case AX_ATTR_FLOWTO_IDS:
603 result += " flowto_ids=" + IntVectorToString(values); 605 result += " flowto_ids=" + IntVectorToString(values);
604 break; 606 break;
605 case AX_ATTR_LABELLEDBY_IDS: 607 case AX_ATTR_LABELLEDBY_IDS:
606 result += " labelledby_ids=" + IntVectorToString(values); 608 result += " labelledby_ids=" + IntVectorToString(values);
607 break; 609 break;
608 case AX_ATTR_OWNS_IDS:
609 result += " owns_ids=" + IntVectorToString(values);
610 break;
611 case AX_ATTR_LINE_BREAKS: 610 case AX_ATTR_LINE_BREAKS:
612 result += " line_breaks=" + IntVectorToString(values); 611 result += " line_breaks=" + IntVectorToString(values);
613 break; 612 break;
614 case AX_ATTR_CELL_IDS: 613 case AX_ATTR_CELL_IDS:
615 result += " cell_ids=" + IntVectorToString(values); 614 result += " cell_ids=" + IntVectorToString(values);
616 break; 615 break;
617 case AX_ATTR_UNIQUE_CELL_IDS: 616 case AX_ATTR_UNIQUE_CELL_IDS:
618 result += " unique_cell_ids=" + IntVectorToString(values); 617 result += " unique_cell_ids=" + IntVectorToString(values);
619 break; 618 break;
620 case AX_ATTR_CHARACTER_OFFSETS: 619 case AX_ATTR_CHARACTER_OFFSETS:
(...skipping 19 matching lines...) Expand all
640 bool AXNodeData::IsRoot() const { 639 bool AXNodeData::IsRoot() const {
641 return (role == AX_ROLE_ROOT_WEB_AREA || 640 return (role == AX_ROLE_ROOT_WEB_AREA ||
642 role == AX_ROLE_DESKTOP); 641 role == AX_ROLE_DESKTOP);
643 } 642 }
644 643
645 void AXNodeData::SetRoot() { 644 void AXNodeData::SetRoot() {
646 role = AX_ROLE_ROOT_WEB_AREA; 645 role = AX_ROLE_ROOT_WEB_AREA;
647 } 646 }
648 647
649 } // namespace ui 648 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | ui/accessibility/platform/ax_platform_node_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698