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

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

Issue 825853002: Expose br tag in AX Tree as ROLE_SYSTEM_WHITESPACE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding br as platform leaf Created 5 years, 11 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 "base/logging.h" 7 #include "base/logging.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/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 bool BrowserAccessibility::PlatformIsLeaf() const { 46 bool BrowserAccessibility::PlatformIsLeaf() const {
47 if (InternalChildCount() == 0) 47 if (InternalChildCount() == 0)
48 return true; 48 return true;
49 49
50 // All of these roles may have children that we use as internal 50 // All of these roles may have children that we use as internal
51 // implementation details, but we want to expose them as leaves 51 // implementation details, but we want to expose them as leaves
52 // to platform accessibility APIs. 52 // to platform accessibility APIs.
53 switch (GetRole()) { 53 switch (GetRole()) {
54 case ui::AX_ROLE_LINE_BREAK:
54 case ui::AX_ROLE_SLIDER: 55 case ui::AX_ROLE_SLIDER:
55 case ui::AX_ROLE_STATIC_TEXT: 56 case ui::AX_ROLE_STATIC_TEXT:
56 case ui::AX_ROLE_TEXT_AREA: 57 case ui::AX_ROLE_TEXT_AREA:
57 case ui::AX_ROLE_TEXT_FIELD: 58 case ui::AX_ROLE_TEXT_FIELD:
58 return true; 59 return true;
59 default: 60 default:
60 return false; 61 return false;
61 } 62 }
62 } 63 }
63 64
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 if (GetRole() == ui::AX_ROLE_STATIC_TEXT) 711 if (GetRole() == ui::AX_ROLE_STATIC_TEXT)
711 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size()); 712 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size());
712 713
713 int len = 0; 714 int len = 0;
714 for (size_t i = 0; i < InternalChildCount(); ++i) 715 for (size_t i = 0; i < InternalChildCount(); ++i)
715 len += InternalGetChild(i)->GetStaticTextLenRecursive(); 716 len += InternalGetChild(i)->GetStaticTextLenRecursive();
716 return len; 717 return len;
717 } 718 }
718 719
719 } // namespace content 720 } // namespace content
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/automation.idl ('k') | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698