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

Side by Side Diff: content/browser/accessibility/browser_accessibility_android.cc

Issue 2867073003: Name calculation should not include nameFrom:author descendants. (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
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 "content/browser/accessibility/browser_accessibility_android.h" 5 #include "content/browser/accessibility/browser_accessibility_android.h"
6 6
7 #include "base/i18n/break_iterator.h" 7 #include "base/i18n/break_iterator.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 break; 543 break;
544 case ui::AX_ROLE_DIALOG: 544 case ui::AX_ROLE_DIALOG:
545 message_id = IDS_AX_ROLE_DIALOG; 545 message_id = IDS_AX_ROLE_DIALOG;
546 break; 546 break;
547 case ui::AX_ROLE_DIRECTORY: 547 case ui::AX_ROLE_DIRECTORY:
548 message_id = IDS_AX_ROLE_DIRECTORY; 548 message_id = IDS_AX_ROLE_DIRECTORY;
549 break; 549 break;
550 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: 550 case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
551 message_id = IDS_AX_ROLE_DISCLOSURE_TRIANGLE; 551 message_id = IDS_AX_ROLE_DISCLOSURE_TRIANGLE;
552 break; 552 break;
553 case ui::AX_ROLE_DIV:
554 // No role description.
555 break;
556 case ui::AX_ROLE_DOCUMENT: 553 case ui::AX_ROLE_DOCUMENT:
557 message_id = IDS_AX_ROLE_DOCUMENT; 554 message_id = IDS_AX_ROLE_DOCUMENT;
558 break; 555 break;
559 case ui::AX_ROLE_EMBEDDED_OBJECT: 556 case ui::AX_ROLE_EMBEDDED_OBJECT:
560 message_id = IDS_AX_ROLE_EMBEDDED_OBJECT; 557 message_id = IDS_AX_ROLE_EMBEDDED_OBJECT;
561 break; 558 break;
562 case ui::AX_ROLE_FEED: 559 case ui::AX_ROLE_FEED:
563 message_id = IDS_AX_ROLE_FEED; 560 message_id = IDS_AX_ROLE_FEED;
564 break; 561 break;
565 case ui::AX_ROLE_FIGCAPTION: 562 case ui::AX_ROLE_FIGCAPTION:
566 // No role description. 563 // No role description.
567 break; 564 break;
568 case ui::AX_ROLE_FIGURE: 565 case ui::AX_ROLE_FIGURE:
569 message_id = IDS_AX_ROLE_GRAPHIC; 566 message_id = IDS_AX_ROLE_GRAPHIC;
570 break; 567 break;
571 case ui::AX_ROLE_FOOTER: 568 case ui::AX_ROLE_FOOTER:
572 message_id = IDS_AX_ROLE_FOOTER; 569 message_id = IDS_AX_ROLE_FOOTER;
573 break; 570 break;
574 case ui::AX_ROLE_FORM: 571 case ui::AX_ROLE_FORM:
575 // No role description. 572 // No role description.
576 break; 573 break;
574 case ui::AX_ROLE_GENERIC_CONTAINER:
575 // No role description.
576 break;
577 case ui::AX_ROLE_GRID: 577 case ui::AX_ROLE_GRID:
578 message_id = IDS_AX_ROLE_TABLE; 578 message_id = IDS_AX_ROLE_TABLE;
579 break; 579 break;
580 case ui::AX_ROLE_GROUP: 580 case ui::AX_ROLE_GROUP:
581 // No role description. 581 // No role description.
582 break; 582 break;
583 case ui::AX_ROLE_HEADING: 583 case ui::AX_ROLE_HEADING:
584 // Note that code above this switch statement handles headings with 584 // Note that code above this switch statement handles headings with
585 // a level, returning a string like "heading level 1", etc. 585 // a level, returning a string like "heading level 1", etc.
586 message_id = IDS_AX_ROLE_HEADING; 586 message_id = IDS_AX_ROLE_HEADING;
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 1426 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
1427 int count = 0; 1427 int count = 0;
1428 for (uint32_t i = 0; i < PlatformChildCount(); i++) { 1428 for (uint32_t i = 0; i < PlatformChildCount(); i++) {
1429 if (PlatformGetChild(i)->GetRole() == role) 1429 if (PlatformGetChild(i)->GetRole() == role)
1430 count++; 1430 count++;
1431 } 1431 }
1432 return count; 1432 return count;
1433 } 1433 }
1434 1434
1435 } // namespace content 1435 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698