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

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

Issue 2881723002: Fix TalkBack feedback for password fields in Android O (Closed)
Patch Set: Address feedback 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "content/browser/accessibility/browser_accessibility.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 return HasState(ui::AX_STATE_RICHLY_EDITABLE) && 1021 return HasState(ui::AX_STATE_RICHLY_EDITABLE) &&
1022 (!PlatformGetParent() || 1022 (!PlatformGetParent() ||
1023 !PlatformGetParent()->HasState(ui::AX_STATE_RICHLY_EDITABLE)); 1023 !PlatformGetParent()->HasState(ui::AX_STATE_RICHLY_EDITABLE));
1024 } 1024 }
1025 1025
1026 bool BrowserAccessibility::HasExplicitlyEmptyName() const { 1026 bool BrowserAccessibility::HasExplicitlyEmptyName() const {
1027 return GetIntAttribute(ui::AX_ATTR_NAME_FROM) == 1027 return GetIntAttribute(ui::AX_ATTR_NAME_FROM) ==
1028 ui::AX_NAME_FROM_ATTRIBUTE_EXPLICITLY_EMPTY; 1028 ui::AX_NAME_FROM_ATTRIBUTE_EXPLICITLY_EMPTY;
1029 } 1029 }
1030 1030
1031 std::string BrowserAccessibility::ComputeAccessibleNameFromDescendants() { 1031 std::string BrowserAccessibility::ComputeAccessibleNameFromDescendants() const {
1032 std::string name; 1032 std::string name;
1033 for (size_t i = 0; i < InternalChildCount(); ++i) { 1033 for (size_t i = 0; i < InternalChildCount(); ++i) {
1034 BrowserAccessibility* child = InternalGetChild(i); 1034 BrowserAccessibility* child = InternalGetChild(i);
1035 std::string child_name; 1035 std::string child_name;
1036 if (child->GetStringAttribute(ui::AX_ATTR_NAME, &child_name)) { 1036 if (child->GetStringAttribute(ui::AX_ATTR_NAME, &child_name)) {
1037 if (!name.empty()) 1037 if (!name.empty())
1038 name += " "; 1038 name += " ";
1039 name += child_name; 1039 name += child_name;
1040 } else if (!child->HasState(ui::AX_STATE_FOCUSABLE)) { 1040 } else if (!child->HasState(ui::AX_STATE_FOCUSABLE)) {
1041 child_name = child->ComputeAccessibleNameFromDescendants(); 1041 child_name = child->ComputeAccessibleNameFromDescendants();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 return gfx::kNullAcceleratedWidget; 1199 return gfx::kNullAcceleratedWidget;
1200 } 1200 }
1201 1201
1202 bool BrowserAccessibility::AccessibilityPerformAction( 1202 bool BrowserAccessibility::AccessibilityPerformAction(
1203 const ui::AXActionData& data) { 1203 const ui::AXActionData& data) {
1204 NOTREACHED(); 1204 NOTREACHED();
1205 return false; 1205 return false;
1206 } 1206 }
1207 1207
1208 } // namespace content 1208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | content/browser/accessibility/browser_accessibility_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698